ws-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bill Binole <bil...@Attachmate.com>
Subject RE: Help needed...Passing object as parameter.
Date Tue, 30 Jan 2001 15:35:14 GMT
In order to use the bean serializer your numbers class must conform to a
bean.  Do you have get and set methods for the variables you want to pass?
If you look at the bean serializer code it uses these to marshal the values.

Bill

> -----Original Message-----
> From:	Mahendra Babu [SMTP:babum@geometricsoftware.com]
> Sent:	Tuesday, January 30, 2001 10:24 AM
> To:	soap-user@xml.apache.org
> Cc:	pmarwa@orbit-e.com
> Subject:	Re: Help needed...Passing object as parameter.
> 
> Hi,
> 
> I tried using the BeanSerializer as below,
> 
> SOAPMappingRegistry smr = new SOAPMappingRegistry();
> 
> BeanSerializer beanSer = new BeanSerializer();
> 
> smr.mapTypes( Constants.NS_URI_SOAP_ENC,new
> QName("urn:xml-soap-address-demo", "numbers"),
> 
>                              Numbers.class, beanSer, beanSer);
> 
> 
> 
> I set the values of the member variables x and y as 5 and 6. But when I
> pass
> the parameter, on the
> 
> client side the values of both x and y become 0.
> 
> I have attached the PutAddress.java file and the Numbers.java file with
> this
> mail.
> 
> Thanks,
> 
> Mahendra Babu
> 
> 
> 
> > Shouldn't you be able to accomplish this using  a Bean serializer /
> > deserialzer, similar to the way have in the address book example ?
> >
> > -Priya
> >
> >
> >
> >
> > -----Original Message-----
> > From: Mahendra Babu [mailto:babum@geometricsoftware.com]
> > Sent: Tuesday, January 30, 2001 9:26 AM
> > To: soap-user@xml.apache.org
> > Subject: Help needed...Passing object as parameter.
> >
> >
> > Hi All,
> >
> > In the addressbook example we have an object of AddressBook being passed
> as
> > a parameter.
> >
> > In a similar fashion I am trying to send an object of my class Numbers.
> But
> > the values
> > for the member variables which I set on the client side seem to get lost
> on
> > the server
> > side.
> >
> > Please do advise.
> >
> > The Numbers class is as follows,
> >
> > package samples.addressbook;
> >
> > public class Numbers
> >
> > {
> >
> > private int x;
> >
> > private int y;
> >
> >
> > public Numbers()
> >
> > {
> >
> > }
> >
> > public Numbers(int a, int b)
> >
> > {
> >
> > this.x = a;
> >
> > this.y = b;
> >
> > }
> >
> >
> > public int getX()
> >
> > {
> >
> > return this.x;
> >
> > }
> >
> > public int getY()
> >
> > {
> >
> > return this.y;
> >
> > }
> >
> > public String toString()
> >
> > {
> >
> > return x + " " + y;
> >
> > }
> >
> >
> >
> > Thanks in advance,
> >
> > Mahendra Babu
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> > For additional commands, email: soap-user-help@xml.apache.org
> > << File: Numbers.java >>  << File: PutAddress.java >>  <<
File:
> ATT2056902.txt >> 

Mime
View raw message