Axis deserialization of subclasses

A

azimi

Hi

I'm having a problem with deserializing java subclasses with Axis. Let
me explain with an example.

Class ParentClass {
int a;
}

Class SubClass extends ParentClass {
int b;
}

....

SubClass sc = new SubClass();
// sendClass is defined to take a ParentClass as parameter in the WSDL
sendClass(SubClass);

// --- Everythings works well until this point, i.e. my apache server
receives the SubClass with the extra "int b"-member, eventhough
sendClass is defined to take ParentClass as paramater.

// Problem:
// getClass is defined to return ParentClass in the WSDL
SubClass sc2 = getClass("sc"); // getClass returns SubClass if
parameter == "sc"

// This is where Axis complains since it doesn't expect the extra
member "int b" and thereby no SubClass is expected.

Any ideas is highly appreciated.

I've tested axis 1.3, 1.4 and axis2, they all throw me exceptions.

Cheers
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,143
Latest member
DewittMill
Top