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 Chris Forbis <ch...@veritas.com> on 2002/11/12 17:00:29 UTC

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 :-) )
Or heck is this entire message for not because some build after 1.0 changes
this behavior?
 
Thanks
Chris
 

RE: Why is xsd:type and namespace required for BeanDeserilizer for complex types?

Posted by dweber <dw...@asyst-connect.com>.
You should try it without the types, but with the namespaces.  I believe
Axis looks up fields using a qualified name (look at the client stub code in
the constructor for an example of  field descriptor metadata).  I've had
issues with Axis and some complex types, but I don't put them in for simple
types.
  -----Original Message-----
  From: Chris Forbis [mailto:chris.forbis@veritas.com]
  Sent: Tuesday, November 12, 2002 10:00 AM
  To: axis-user@xml.apache.org
  Subject: Why is xsd:type and namespace required for BeanDeserilizer for
complex 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