Problem deserializing with Apache Axis

F

fridobansho

Hi,

I am receiving a SOAP envelope (v1.1) from an ASP page and processing
it with a Java client using Apache Axis 1.2.1 and the JDK version
1.5.0_06. The WSDL/schema uses nested types for some of the data
structure, these types are anonymous when defined.
From the WSDL a set of Java source files are generated using the
WSDL2Java tool, this works fine and produces a set of source files
that compile and appear to work, mostly.

The problem comes when deserializing the part of the data structure
using the nested and anonymous types. The BeanDeserializer goes down
through this structure and populates the objects with data from the
SOAP response until a certain point. For some reason as it is coming
back up through the object structure setting the object members of the
deserialized objects it suddenly misses out a number of objects and
throws a NullPointerException at
org.apache.axis.encoding.ser.BeanPropertyTarget.set(BeanPropertyTarget.java:
135).

The problems start at the element that first makes use of anonymous
types, below this element are a couple of array type elements, all
using anonymous types. I have tried editing the schema to make these
named types rather than anonymous but it has had no effect. All issues
appear to center around these types, if the top level element in this
anonymously typed segment is removed the deserializing works correctly
and the object structure is populated properly (apart from missing an
element).

While trying to determine what the problem is I have used Axis version
1.4 and changed the anonymous types to named types, both with no
effect.

I have tried reading around on the net about any problems related to
complex types and deserialization problems and saw some problems with
arrays of arrays and with type declarations, the first could be
applicable but the examples of the second gave completely different
stack traces.

I am hoping that someone has seen this before and possibly knows of a
fix/workaround which doesn't involve removing the element from the
returned XML. If any more detail is needed then I will try to provide
it where I can.

Thanks

David Hague
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top