|
Axis
should (and does, I believe) do the right thing with this.
You
need to make sure you have the correct typeMapping registered for the Qualified
Name (QName) "{namespace}beanStruct".
The
namespace would be defined in the XML, in your case as "xmlns="my-namespace" in
an element above <beanStruct>.
You
would then need a type mapping registered in the client (or in the wsdd for the
server).
There
is an API for this in the Call object (for the client). WSDL2Java
generated stubs should have this type mapping registered
automatically.
--
Tom
Jordahl
-----Original Message-----
From: Chris Forbis [mailto:[EMAIL PROTECTED]] Sent: Tuesday, November 12, 2002 11:00 AM To: [EMAIL PROTECTED] Subject: Why is xsd:type and namespace required for BeanDeserilizer for co mplex types? Why are xsd:type and xmlns: required
for BeanDeserializer for complex types? The reason I ask this is many soap
servers seem to not care about these fields being provided but axis will fault
without them. (Gets a SAX Exception
in BeanDeserializer) An example below shows part of a
soap message that works on some soap servers, but not on axis, it seems the
reason is axis does not assume what the type should be (even thought it know
what is must be in order to be a valid soap
message) Not Working Complex
Type <beanStruct> <pid
xsi:type="xsd:long">0</pid> <description xsi:type="xsd:string">Test desc</description> <id xsi:type="xsd:long">12345</id> </beanStruct> Working Complex
Type <beanStruct xsi:type="ns2:TestBean"
xmlns:ns2="http://testserver001.someplace.com/TestAxisServices"> <pid
xsi:type="xsd:long">0</pid> <description xsi:type="xsd:string">Test desc</description> <id xsi:type="xsd:long">12345</id> </beanStruct> The main reason for me asking this
is we have some soap clients that will not populate this data because they think
it should be optional, and they don't give a way to set
it. Thoughts? Comments?
(Should I break open the axis code an "fix" it J
) Or heck is this entire message
for not because some build after 1.0 changes this
behavior? Thanks Chris |
