I am trying to consume a 3rd party web service. When JBossWS parses the response, an
ArrayIndexOutOfBoundsException is thrown from the JBoss XML binding code. I have
generated stubs using the wstools command.
I'm guessing this is a bug? I would love to help debug it but I'm kinda lost..
I'm not sure what namespace-to-package name conversion should be going on when the
SOAP response is parsed since the mapping is already done in a jaxrpc-mapping.xml file.
And the jaxrpc-mapping isn't parsed each time a response is sent, right?
WS Response:
| <?xml version="1.0"?>
| <SOAP-ENV:Envelope
|
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
|
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
| <SOAP-ENV:Body
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
| xmlns:NS2="Gridlogix.EnNET.Types">
| <NS1:GetObjectResponse xmlns:NS1="Gridlogix.EnNET.Types.IEnNET">
| <return xsi:type="NS2:GlxObject">
| <Identifier xsi:type="NS2:GlxIdentifier">
| <Name xsi:type="xsd:string">Servers</Name>
| <DisplayName xsi:type="xsd:string"></DisplayName>
| <Index xsi:type="xsd:int">0</Index>
| <Scope xsi:type="NS2:GlxMemberScope">msPublic</Scope>
| <ClassID xsi:type="xsd:string">BACServerList</ClassID>
| <TypeID xsi:type="xsd:int">1464013352</TypeID>
| </Identifier>
| <ObjectCount xsi:type="xsd:int">5</ObjectCount>
| <PropertyCount xsi:type="xsd:int">4</PropertyCount>
| <MethodCount xsi:type="xsd:int">7</MethodCount>
| <DefaultProperty xsi:type="xsd:string"></DefaultProperty>
| <Interfaces xsi:type="xsd:string">
| IBACServerList,IPersistable
| </Interfaces>
| <ListClass xsi:type="xsd:string">GlxServer</ListClass>
| </return>
| </NS1:GetObjectResponse>
| </SOAP-ENV:Body>
| </SOAP-ENV:Envelope>
|
jaxrpc-mapping looks like this:
| <?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping
version='1.1'
xmlns='http://java.sun.com/xml/ns/j2ee'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee
http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
| <package-mapping>
| <package-type>com.gridlogix.webservices</package-type>
| <namespaceURI>Gridlogix.EnNET.Types</namespaceURI>
| </package-mapping>
| <package-mapping>
| <package-type>com.gridlogix.webservices</package-type>
| <
namespaceURI>http://www.gridlogix.com/WebServices/</namespaceURI>
| </package-mapping>
| <java-xml-type-mapping>
| <java-type>com.gridlogix.webservices.GlxVersionInfo</java-type>
| <root-type-qname
xmlns:typeNS='Gridlogix.EnNET.Types'>typeNS:GlxVersionInfo</root-type-qname>
| <qname-scope>complexType</qname-scope>
| <variable-mapping>
| ....
|
And the WSDL looks like this:
| <?xml version="1.0" encoding="utf-8"?>
| <definitions
xmlns="http://schemas.xmlsoap.org/wsdl/"
|
xmlns:xs="http://www.w3.org/2001/XMLSchema" name="IEnNETService"
|
targetNamespace="http://www.gridlogix.com/WebServices/"
|
xmlns:tns="http://www.gridlogix.com/WebServices/"
|
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
|
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
|
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
| xmlns:ns1="Gridlogix.EnNET.Types">
| <types>
| <xs:schema targetNamespace="Gridlogix.EnNET.Types"
xmlns="Gridlogix.EnNET.Types">
| <xs:complexType name="GlxRem">
| <xs:sequence/>
| </xs:complexType>
| .....
|
Finally.. the stack trace...
| java.rmi.RemoteException: Call invocation failed; nested exception is:
| org.jboss.ws.WSException: org.jboss.ws.core.binding.BindingException:
org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to parse source: 21
| at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:536)
| at org.jboss.ws.core.jaxrpc.client.CallImpl.invoke(CallImpl.java:277)
| at org.jboss.ws.core.jaxrpc.client.PortProxy.invoke(PortProxy.java:151)
| at $Proxy277.getObject(Unknown Source)
| at com.enernoc.eea.dpm.web.TestServiceServlet.doGet(TestServiceServlet.java:57)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:690)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
| at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
| at java.lang.Thread.run(Thread.java:619)
| Caused by: org.jboss.ws.WSException: org.jboss.ws.core.binding.BindingException:
org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to parse source: 21
| at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:250)
| at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:97)
| at org.jboss.ws.core.soap.DOMContent.transitionTo(DOMContent.java:77)
| at
org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
| at
org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:171)
| at
org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:263)
| at org.jboss.ws.core.EndpointInvocation.getReturnValue(EndpointInvocation.java:197)
| at org.jboss.ws.core.CommonClient.syncOutputParams(CommonClient.java:499)
| at org.jboss.ws.core.CommonClient.invoke(CommonClient.java:387)
| at org.jboss.ws.core.jaxrpc.client.CallImpl.invokeInternal(CallImpl.java:517)
| ... 24 more
| Caused by: org.jboss.ws.core.binding.BindingException:
org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to parse source: 21
| at
org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:111)
| at
org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:62)
| at
org.jboss.ws.core.binding.DeserializerSupport.deserialize(DeserializerSupport.java:60)
| at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:180)
| ... 33 more
| Caused by: org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: Failed to
parse source: 21
| at
org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:65)
| at
org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:103)
| ... 36 more
| Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: 21
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:179)
| at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:126)
| at
org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:61)
| ... 37 more
| Caused by: java.lang.ArrayIndexOutOfBoundsException: 21
| at org.jboss.xb.binding.Util.xmlNamespaceToJavaPackage(Util.java:229)
| at org.jboss.xb.binding.Util.xmlNameToClassName(Util.java:310)
| at
org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtCharactersHandler.unmarshal(RtCharactersHandler.java:83)
| at
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:985)
| at
org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.endElement(SundayContentHandler.java:246)
| at
org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.endElement(SaxJBossXBParser.java:296)
| at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
| at org.apache.xerces.xinclude.XIncludeHandler.endElement(Unknown Source)
| at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source)
| at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
| at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
| at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
| at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
| at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
| at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:175)
| ... 39 more
|
Thanks in advance...
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156806#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...