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 Scott Kurinskas <Sc...@Siebel.com> on 2005/08/13 00:43:05 UTC

[AXIS2 - 0.9] Problems deserializing a complex type using classes generated by WSDL2Java

Hi -

When deserializing the SOAP response below, the following exception is
raised.  I'm using the classes generated via WSDL2Java, and have
narrowed the problem down to the following line in the generated Stub
class:

org.apache.axis2.context.MessageContext  _returnMessageContext =
_call.invokeBlocking(_operations[0], _messageContext);

Using TCPMON is can verify that I'm receiving a response, and given that
I've had no issues invoking this service with AXIS 1.2, I'm confident
the response is valid.  I'm stumped as to why AXIS2 would have issues
with a response that is a complex type.

Thoughts?  
Thanks,
Scott

Exception:
xception in thread "main" java.lang.ExceptionInInitializerError
	at
org.apache.axis2.om.impl.llom.OMElementImpl.addAttribute(OMElementImpl.j
ava:464)
	at
org.apache.axis2.om.impl.llom.builder.StAXBuilder.processAttributes(StAX
Builder.java:126)
	at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.constructNo
de(StAXSOAPModelBuilder.java:278)
	at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.createOMEle
ment(StAXSOAPModelBuilder.java:171)
	at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.next(StAXSO
APModelBuilder.java:302)
	at
org.apache.axis2.om.impl.llom.OMElementImpl.getNextSibling(OMElementImpl
.java:268)
	at
org.apache.axis2.om.impl.llom.traverse.OMChildrenQNameIterator.next(OMCh
ildrenQNameIterator.java:100)
	at
org.apache.axis2.om.impl.llom.OMElementImpl.getFirstChildWithName(OMElem
entImpl.java:233)
	at
org.apache.axis2.soap.impl.llom.SOAPEnvelopeImpl.getHeader(SOAPEnvelopeI
mpl.java:58)
	at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.parseHeader
s(StAXSOAPModelBuilder.java:129)
	at
org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder.<init>(StAX
SOAPModelBuilder.java:92)
	at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:78)
	at
org.apache.axis2.transport.TransportUtils.createSOAPMessage(TransportUti
ls.java:44)
	at
org.apache.axis2.clientapi.TwoChannelBasedSender.send(TwoChannelBasedSen
der.java:49)
	at
org.apache.axis2.clientapi.InOutMEPClient.invokeBlocking(InOutMEPClient.
java:154)
	at
companyyahoo.sca.CompanyYahooServiceXMLStub.query(CompanyYahooServiceXML
Stub.java:75)
	at
companyyahoo.sca.client.CompanyYahoocClient.main(CompanyYahoocClient.jav
a:38)
Caused by: java.lang.NullPointerException
	at java.util.regex.Matcher.getTextLength(Unknown Source)
	at java.util.regex.Matcher.reset(Unknown Source)
	at java.util.regex.Matcher.<init>(Unknown Source)
	at java.util.regex.Pattern.matcher(Unknown Source)
	at
org.apache.axis2.om.impl.llom.OMAttributeImpl.<clinit>(OMAttributeImpl.j
ava:52)
	... 17 more

Response document
<?xml version="1.0" encoding="utf-8"?>
   <soap:Envelope
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wsse
curity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssec
urity-utility-1.0.xsd"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Header>
 
<wsa:Action>urn:siebel:Yahoo:CompanyYahoo#queryResponse</wsa:Action>
 
<wsa:MessageID>uuid:d9783241-22fd-4059-9f02-c8818ee8e3d0</wsa:MessageID>
 
<wsa:RelatesTo>uuid:d5a53a2a-0fb7-434d-b148-6dd5d5300bc2</wsa:RelatesTo>
 
<wsa:To>http://schemas.xmlsoap.org/ws/2004/03/addressing/role/anonymous<
/wsa:To>
         <wsse:Security>
            <wsu:Timestamp
wsu:Id="Timestamp-0626676a-6911-43fe-8d27-10d5d8292b96">
               <wsu:Created>2005-08-12T22:11:21Z</wsu:Created>
               <wsu:Expires>2005-08-12T22:16:21Z</wsu:Expires>
            </wsu:Timestamp>
         </wsse:Security>
      </soap:Header>
      <soap:Body>
         <s1:queryResponse xmlns:s1="urn:siebel:Yahoo:CompanyYahoo"
xmlns:s2="urn:siebel:Yahoo:CompanyYahoo:tbo">
            <s2:Company>
               <s2:Name>Siebel Systems, Inc.</s2:Name>
               <s2:StockTickerSymbol>SEBL</s2:StockTickerSymbol>
               <s2:Id>1-12539</s2:Id>
               <s2:ModId>2</s2:ModId>
            </s2:Company>
            <s2:Company>
               <s2:Name>Siebel Systems</s2:Name>
               <s2:StockTickerSymbol>SEBL</s2:StockTickerSymbol>
               <s2:Id>1-13HBS</s2:Id>
               <s2:ModId>0</s2:ModId>
            </s2:Company>
         </s1:queryResponse>
      </soap:Body>
   </soap:Envelope>

_______________
Siebel
IT'S ALL ABOUT THE CUSTOMER
Visit www.siebel.com

This e-mail message is for the sole use of the intended recipient(s) and contains confidential and/or privileged information belonging to Siebel Systems, Inc. or its customers or partners. Any unauthorized review, use, copying, disclosure or distribution of this message is strictly prohibited. If you are not an intended recipient of this message, please contact the sender by reply e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation.