JB4 can not handle SOAP message but JB3 can
kcp Oct 12, 2005 12:14 PMHi,
I have the following problem: I am using a Webservice from an external provider.
At the moment I am using JB3 to access the Webservice. The interfaces and other java classes were generated from the wsdl using wsdl2java. It its working very well.
Now I am preparing the upgrade to JB4 (4.0.2). So I used wscompile from SUNs webservice developer pack (1.6) and generated the needed java files und the mapping files. The application was successfully deployed with wsdl and mapping file packed into the ear archive.
When I access the webservice JB4 encounters an error while parsing the response soap message.
I get the following exception because JB4 tries to cast to the wrong type:
org.xml.sax.SAXException: Bad types (class [...] TSoapReturnCode -> class [...]TSoapSubscriberResponse)
at org.jboss.axis.message.RPCHandler.onStartChild(RPCHandler.java:334
[...]
The definition of the type in the wsdl is as follows:
[...]
<xs:complexType name="TSoapSubscriberResponse">
<xs:sequence>
<xs:element name="returnCodeArray" type="ns1:TSoapReturnCodeArray"/>
<xs:element name="subscriber" type="ns1:TSoapSubscriber"/>
</xs:sequence>
</xs:complexType>
[...]
whereas the namespace is set to xmlns:ns1="urn:de_bmcag_visoap_model".
In the at the log file appeared the following entry:
org.jboss.axis.encoding.DeserializationContextImpl|Enter:getDeserializer: [class=class de.schlund.j2ee.apps.voip.bnwsocall.ws.impl.TSoapSubscriberResponse,xmlType={urn:de_bmcag_visoap_model}TSoapReturnCode]
The Deserializer and the the xmlType do not match.
I do not unterstand what JB4 is doing here. Especially because JB3 handles the message without any problems. I even tried JB 4.0.3. It can not handle the message either but with another SAXException.
When I take a look at the soap message sent as response the tag can be found at the end. It inclued a href to an entry defined above?
The entry with the id 1 is the an element of type TSoapSubscriberResponse -> the correct return type. Could this backward directed reference be the problem? (And if it is the problem, why for JB4 only?)
Does anyone have an idea? I am grateful for every clue.
Sincerely
Charly