Hi,


Lets say I have a class

############################################################################
package com.fw.webservice;

import java.io.Serializable;


public class Data implements Serializable {
        private String id;
        private String lat;
        private String lon;
        private String time;
        
        public Data(String lat,String lon, String time){
                setLat(lat);
                setLon(lon);
                setTime(time);
        }
        
        public void setId(String id){
                this.id = id;
        }
        
        public void setLat(String lat){
                this.lat = lat;
        }
        public void setLon(String lon){
                this.lon = lon;
        }
        public void setTime(String time){
                this.time = time;
        }
        
        public String getLat(){
                return lat;
        }
        public String getLon(){
                return lon;
        }
        public String getTime(){
                return time;
        }
        public String getId(){
                return id;
        }
}


############################################################################
Axis returns  looks like

 <data>
                 <id>1</id>     
             <lat>42.2323</lat>

             <lon>80.2323</lon>

             <time>2006-09-22</time>
</data>


Question:
How can I add attribute to the data tag? So it looks like the following:

<data id=1>              
             <lat>42.2323</lat>

             <lon>80.2323</lon>

             <time>2006-09-22</time>
</data>


Thanks in advance for all your help.

Golam



-----Original Message-----
From: Paul Fremantle [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 27, 2007 12:46 PM
To: [EMAIL PROTECTED]
Subject: Re: Customize tags

Oh I'm sorry if I was wrong!!!

Paul

On 9/27/07, Deepal jayasinghe <[EMAIL PROTECTED]> wrote:
> Hi Golam ,
> Just add the following tag into your services.xml
>
> <schema elementFormDefaultQualified="false"/>
>
>
> Thanks
> Deepal
> >
> > Hi,
> >
> >
> >
> > Axis2 generates:
> >
> >
> >
> > <ax24:data type="com.fw.webservice.Data">
> >
> > <ax24:lat>43.40391</ax24:lat>
> >
> > <ax24:lon>-80.04648</ax24:lon>
> >
> > <ax24:time>2006-07-28 00:40:02.0</ax24:time>
> >
> > </ax24:data>
> >
> >
> >
> >
> >
> > What I want is:
> >
> >
> >
> > <data>
> >
> >             <lat>42.2323</lat>
> >
> >             <lon>80.2323</lon>
> >
> >             <time>2006-09-22</time>
> >
> > </data>
> >
> >
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[EMAIL PROTECTED]

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to