[jboss-user] [JBossWS] - Unmarshalling Exception with Web Service Array Input

sumitsu do-not-reply at jboss.com
Wed Oct 3 14:43:53 EDT 2007


Hi,

I am currently attempting to deploy a web service to JBoss 4.2.1 (using Java 6.0 and JBossWS 2.0.1) where the single input is a custom object which contains (among other fields) an array of other custom objects.  Deployment seems to work correctly, but I get this error when I try to invoke the service:


  | 14:16:44,997 ERROR [SOAPFaultHelperJAXRPC] SOAP request exception
  | org.jboss.ws.WSException: org.jboss.ws.core.binding.BindingException: org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: 
  | Failed to parse source: 
  | Failed to resolve class name for customFields: 
  | No ClassLoaders found for: com.liaison.InboundWebService.messageProcessing.Array
  |         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.getRequestParamValue(EndpointInvocation.java:115)
  |         at org.jboss.ws.core.EndpointInvocation.getRequestPayload(EndpointInvocation.java:135)
  |         at org.jboss.ws.core.server.DelegatingInvocation.getArgs(DelegatingInvocation.java:82)
  |         at org.jboss.wsf.container.jboss42.InvocationHandlerEJB21.getMBeanInvocation(InvocationHandlerEJB21.java:169)
  |         at org.jboss.wsf.container.jboss42.InvocationHandlerEJB21.invoke(InvocationHandlerEJB21.java:144)
  |         at org.jboss.ws.core.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:220)
  |         at org.jboss.wsf.stack.jbws.RequestHandlerImpl.processRequest(RequestHandlerImpl.java:408)
  |         at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleRequest(RequestHandlerImpl.java:272)
  |         at org.jboss.wsf.stack.jbws.RequestHandlerImpl.doPost(RequestHandlerImpl.java:189)
  |         at org.jboss.wsf.stack.jbws.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:122)
  |         at org.jboss.wsf.stack.jbws.EndpointServlet.service(EndpointServlet.java:84)
  |         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:128)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  |         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:241)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  |         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  |         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  |         at java.lang.Thread.run(Thread.java:619)
  | Caused by: 
  | org.jboss.ws.core.binding.BindingException: 
  | org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException:
  | Failed to parse source: 
  | Failed to resolve class name for customFields: 
  | No ClassLoaders found for: com.liaison.InboundWebService.messageProcessing.Array
  |         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)
  |         ... 35 more
  | Caused by: org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalException: 
  | Failed to parse source: 
  | Failed to resolve class name for customFields: 
  | No ClassLoaders found for: com.liaison.InboundWebService.messageProcessing.Array
  |         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)
  |         ... 38 more
  | Caused by: 
  | org.jboss.xb.binding.JBossXBException: 
  | Failed to parse source: 
  | Failed to resolve class name for customFields: 
  | No ClassLoaders found for: com.liaison.InboundWebService.messageProcessing.Array
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:178)
  |         at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:126)
  |         at org.jboss.ws.core.jaxrpc.binding.jbossxb.JBossXBUnmarshallerImpl.unmarshal(JBossXBUnmarshallerImpl.java:61)
  |         ... 39 more
  | Caused by: 
  | org.jboss.xb.binding.JBossXBRuntimeException: 
  | Failed to resolve class name for customFields: 
  | No ClassLoaders found for: com.liaison.InboundWebService.messageProcessing.Array
  |         at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.loadClassForTerm(RtElementHandler.java:1038)
  |         at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.classForNonArrayItem(RtElementHandler.java:1367)
  |         at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.startElement(RtElementHandler.java:693)
  |         at org.jboss.xb.binding.sunday.unmarshalling.impl.runtime.RtElementHandler.startParticle(RtElementHandler.java:89)
  |         at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:504)
  |         at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:323)
  |         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
  |         at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
  |         at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(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:174)
  |         ... 41 more
  | 

I've tried this with JVMs 1.4.2, 5.0, 6.0, as well as with JBoss version 4.0.2 and 4.2.1 and with both WS4EE and JBossWS 1.2.1 and 2.0.1, and I get the same error every time.  (The error from JBoss 4.0.2 + WS4EE is a bit different, but the gist of it is the same, that it can't deserialize the input for the array.)

My WSDL, generated by wscompile, is as follows.  I've removed a few sections which do not seem relevant to the issue:


  | <?xml version="1.0" encoding="UTF-8" ?>
  | <definitions name="LiaisonB2BWebServiceInterface" 
  | 			 targetNamespace="InboundWebService" 
  | 			 xmlns:tns="InboundWebService"
  | 			 xmlns="http://schemas.xmlsoap.org/wsdl/" 
  | 			 xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  | 			 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
  | 	<types>
  | 		<schema targetNamespace="InboundWebService" 
  | 				xmlns="http://www.w3.org/2001/XMLSchema"
  | 				xmlns:tns="InboundWebService" 
  | 				xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
  | 				xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  | 			<complexType name="CustomField">
  | 				<sequence>
  | 					<element name="name" type="string" nillable="true" />
  | 					<element name="value" type="string" nillable="true" />
  | 				</sequence>
  | 			</complexType>
  | 			<complexType name="ServiceRequest">
  | 				<sequence>
  | 					<element name="customFields" type="tns:CustomField" nillable="true" minOccurs="0" maxOccurs="unbounded" />
  | 				</sequence>
  | 			</complexType>
  | 			<complexType name="ServiceStatus">
  | 				<sequence>
  | 					<element name="code" type="string" nillable="true" />
  | 					<element name="subject" type="string" nillable="true" />
  | 				</sequence>
  | 			</complexType>
  | 		</schema>
  | 	</types>
  | 	<message name="MessageEndPoint_processMessage">
  | 		<part name="ServiceRequest" type="tns:ServiceRequest" />
  | 	</message>
  | 	<message name="MessageEndPoint_processMessageResponse">
  | 		<part name="result" type="tns:ServiceStatus" />
  | 	</message>
  | 	<portType name="MessageEndPoint">
  | 		<operation name="processMessage" parameterOrder="ServiceRequest">
  | 			<input message="tns:MessageEndPoint_processMessage" />
  | 			<output message="tns:MessageEndPoint_processMessageResponse" />
  | 		</operation>
  | 	</portType>
  | 	<binding name="MessageEndPointBinding" type="tns:MessageEndPoint">
  | 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc" />
  | 		<operation name="processMessage">
  | 			<soap:operation soapAction="" />
  | 			<input>
  | 				<soap:body use="literal" namespace="InboundWebService" />
  | 			</input>
  | 			<output>
  | 				<soap:body use="literal" namespace="InboundWebService" />
  | 			</output>
  | 		</operation>
  | 	</binding>
  | 	<service name="WebServiceInterface">
  | 		<port name="MessageEndPointPort" binding="tns:MessageEndPointBinding">
  | 			<soap:address location="REPLACE_WITH_ACTUAL_URL" />
  | 		</port>
  | 	</service>
  | </definitions>
  | 

Has anyone else experienced this problem?  I have not been able to find many references to the Exception I'm getting.  Please let me know if so; thanks.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4091198#4091198

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4091198



More information about the jboss-user mailing list