You need to register each bean, even the beans used internally by other beans.

Suzy Fynes wrote:
Thanks for that!
Just one more question, if there is more than one bean class do I do a
type mapping for each one?

Thanks

-----Original Message-----
From: jayachandra [mailto:[EMAIL PROTECTED]] 
Sent: 02 March 2005 06:08
To: [email protected]
Subject: Re: object as parameter

There is Call.registerTypeMapping method. First register your bean to
some XMLType QName and then use that XMLType in the addParameter. That
should do the job.

e.g.
/* obtain instances of BeanSerializerFactory and
BeanDeserializerFactory as sf and df respecitively
*/
MyXMLType = new QName("http://sample.org/xsd","BeanXMLType");
Call.registerTypeMapping(MyBean.class, MyXMLType,sf,df);
...
...
Call.addParameter(...)
Call.addParameter("BeanParam", MyXMLType, ParameterMode.IN);
Call.addParameter(...)
...

Hope that helps,
Jayachandra

On Tue, 1 Mar 2005 17:02:20 -0000, Suzy Fynes
<[EMAIL PROTECTED]> wrote:
  
 

Hi,

 

Can anyone tell if there is a different approach to adding a java bean
(simple types) as a parameter for an axis web service using a java
    
client.
  
 

For strings and ints the following is used

 

call.addParameter("name", XMLType.XSD_STRING, ParameterMode.IN);

 

what would be used if the parameter is an bean object?

 

Thanks

Suzy
    


  

Reply via email to