Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / July 2004

Tip: Looking for answers? Try searching our database.

Axis response deserialization

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brad King - 14 Jul 2004 17:12 GMT
I'm calling an Axis web service (from a .Net client) that returns an array
of a complex type. The complex type wrapper appears to have been generated
with all members intact from the wsdl using "add web reference", but the
response classes never contain any data, whereas I know the response XML
does have data.

I have called a similar service which works fine, but the way the return
type is declared it the WSDL is different. The one that doesn't work uses a
declaration like this for the complex type "Creative":

- <schema elementFormDefault="qualified" targetNamespace="urn:X.Y.Z.com"
xmlns="http://www.w3.org/2001/XMLSchema">
- <complexType name="Creative">
- <sequence>
 <element name="id" type="xsd:int" />
 <element name="adGroupId" type="xsd:int" />
 <element name="headline" nillable="true" type="xsd:string" />
 <element name="description1" nillable="true" type="xsd:string" />
 <element name="description2" nillable="true" type="xsd:string" />
 <element name="destinationURL" nillable="true" type="xsd:string" />
 <element name="displayURL" nillable="true" type="xsd:string" />
 <element name="deleted" type="xsd:boolean" />
 <element name="disapproved" type="xsd:boolean" />
 </sequence>
 </complexType>
 </schema>

thanks for any help on this.
John Jenkins - 16 Jul 2004 21:32 GMT
Hi Brad,
           when you say you know the response XML does have data, are you
looking at the soap passed back over the wire using a trace tool? This could
point to a problem with Deserialization of the XML into a object instances.
Have you also tried wrapping the definition of the array of complex types
into a new vlass?

> I'm calling an Axis web service (from a .Net client) that returns an array
> of a complex type. The complex type wrapper appears to have been generated
[quoted text clipped - 24 lines]
>
> thanks for any help on this.
Dino Chiesa [Microsoft] - 17 Jul 2004 22:19 GMT
Brad,
the wire trace will likely show a namespace disagreement.

If you can get the trace of what works, as well as what does not work, and
post them both, some people on this group may be able to point out the
problem.

-Dino

> Hi Brad,
>             when you say you know the response XML does have data, are you
[quoted text clipped - 32 lines]
> >
> > thanks for any help on this.
Brad King - 27 Jul 2004 20:56 GMT
Thanks, yes namespaces indeed. The return complex type was inadvertantly put
in it's own namespace by the developer on the Axis server side.

> Brad,
> the wire trace will likely show a namespace disagreement.
[quoted text clipped - 46 lines]
> > >
> > > thanks for any help on this.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.