axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Forbis <chris.for...@veritas.com>
Subject RE: Why is xsd:type and namespace required for BeanDeserilizer fo r co mplex types?
Date Tue, 12 Nov 2002 17:04:14 GMT
Looks like axis will generate this "bad" code as well, but will not read
it...
 
For example
<beanStruct>
   <pid xsi:type="xsd:long">0</pid>
   <description xsi:type="xsd:string">Test desc</description>
   <id xsi:type="xsd:long">12345</id>
</beanStruct>
is what my "bad" client is doing. Axis will also generate the EXACT code
above for responses if you change the following in the server config.  (but
it can not read in on the server, that seems like a bug somehow)
  <parameter name="sendMultiRefs" value="false"/>
  <parameter name="sendXsiTypes" value="false"/>
 
 
 
On the namespacing on the line above
<ns:echoTestBean xmlns:ns="
urn:http://testserver.someplace.com:8080/axis/services/AText ">
is the line above...  And that is a valid NS for the method it is calling,
but axis places the TestBean class in the following namespace:
urn:http://testserver.someplace.com/axis/services/AText
 
Seems like axis "forgets" the 8080, this also makes the wsdl a little odd to
read, but it all looks like it works (except for this issue :-) )
 
Thanks
Chris
 
-----Original Message-----
From: Tom Jordahl [mailto:tomj@macromedia.com] 
Sent: Tuesday, November 12, 2002 11:48 AM
To: 'axis-user@xml.apache.org'
Subject: RE: Why is xsd:type and namespace required for BeanDeserilizer fo r
co mplex types?
 
 
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:chris.forbis@veritas.com]
Sent: Tuesday, November 12, 2002 11:00 AM
To: axis-user@xml.apache.org
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 :-) )
Or heck is this entire message for not because some build after 1.0 changes
this behavior?
 
Thanks
Chris
 

Mime
View raw message