You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Matt Robinson <ma...@flightcentre.com> on 2005/03/02 07:22:52 UTC

Using Axis to wrap an XML response in it's required class

Hello.

I am interacting with a .NET based web service and have used the Apache Axis WSDL2Java emitter to generate the required classes.

One of the operations (authenticate) takes a user and password and returns a string.  However this string is actually XML that describes a User Profile, which is defined as a complex type in the WSDL.

There is a UserProfile.java class that was automatically created by the Apache Axis WSDL2Java emitter.  Is there an AXIS tool for taking this XML string and 'wrapping' it in the corresponding class?  There are no methods in the class to do this.

Or do I have to parse this myself? 

Kind Regards,

Matt Robinson


Re: Using Axis to wrap an XML response in it's required class

Posted by Anne Thomas Manes <at...@gmail.com>.
Rather than returning a string, the authenticate operation should
return a UserProfile element, and Axis should automatically map the
UserProfile element to the UserProfile class.

Anne


On Wed, 02 Mar 2005 16:22:52 +1000, Matt Robinson
<ma...@flightcentre.com> wrote:
> Hello.
> 
> I am interacting with a .NET based web service and have used the Apache Axis WSDL2Java emitter to generate the required classes.
> 
> One of the operations (authenticate) takes a user and password and returns a string.  However this string is actually XML that describes a User Profile, which is defined as a complex type in the WSDL.
> 
> There is a UserProfile.java class that was automatically created by the Apache Axis WSDL2Java emitter.  Is there an AXIS tool for taking this XML string and 'wrapping' it in the corresponding class?  There are no methods in the class to do this.
> 
> Or do I have to parse this myself?
> 
> Kind Regards,
> 
> Matt Robinson
> 
>