[jboss-user] [JBossWS] - JBossWS Web Service using ArrayList

rksangubotla do-not-reply at jboss.com
Fri Aug 18 05:28:14 EDT 2006


Hi,
Iam trying to develope a web service for a complex data type like java.util.ArrayList.

I have successfully developed the web service using WSTools . But when I try to test it I got the following error:
12:56:39,656 ERROR [SOAPFaultExceptionHelper] SOAP request exception
javax.xml.rpc.JAXRPCException: Cannot create or send response message
        at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:296)
        at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:221)
        at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
        at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
        at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
        at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
        at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
        at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
        at java.lang.Thread.run(Thread.java:595)
Caused by: org.jboss.xb.binding.JBossXBValueFormatException: Java value for XSD boolean type expected to be an instance of java.lang.Boo
lean or java.lang.Number. But the value is of type java.util.ArrayList
        at org.jboss.xb.binding.SimpleTypeBindings.marshal(SimpleTypeBindings.java:1120)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalCharacters(MarshallerImpl.java:995)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalSimpleType(MarshallerImpl.java:471)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementType(MarshallerImpl.java:415)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElement(MarshallerImpl.java:331)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementOccurence(MarshallerImpl.java:311)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:730)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroupSequence(MarshallerImpl.java:920)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalModelGroup(MarshallerImpl.java:860)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalParticle(MarshallerImpl.java:641)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalComplexType(MarshallerImpl.java:608)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementType(MarshallerImpl.java:419)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElement(MarshallerImpl.java:331)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshalElementOccurence(MarshallerImpl.java:311)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshallInternal(MarshallerImpl.java:210)
        at org.jboss.xb.binding.sunday.marshalling.MarshallerImpl.marshal(MarshallerImpl.java:168)
        at org.jboss.ws.jaxb.JBossXBMarshallerImpl.marshal(JBossXBMarshallerImpl.java:146)
        at org.jboss.ws.jaxrpc.encoding.JAXBSerializer.serialize(JAXBSerializer.java:107)
        at org.jboss.ws.soap.SOAPContentElement.getXMLFragment(SOAPContentElement.java:154)
        at org.jboss.ws.soap.SOAPContentElement.expandToDOM(SOAPContentElement.java:802)
        at org.jboss.ws.soap.SOAPContentElement.getChildNodes(SOAPContentElement.java:719)
        at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:211)
        at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:270)
        at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:270)
        at org.jboss.util.xml.DOMWriter.printInternal(DOMWriter.java:270)
        at org.jboss.util.xml.DOMWriter.print(DOMWriter.java:186)
        at org.jboss.util.xml.DOMWriter.printNode(DOMWriter.java:135)
        at org.jboss.ws.server.ServiceEndpoint.postProcessResponse(ServiceEndpoint.java:290)

Anybody faced similar problem. Or can anybody point me to a location when I can find out how to develope web services for Complex Data Type.

My WSDL :

<?xml version="1.0" encoding="UTF-8"?>
<definitions name='Accounting' targetNamespace='http://localhost' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://localhost/types' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://localhost' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
 
  <schema targetNamespace='http://localhost/types' xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/' xmlns:tns='http://localhost/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
   
    
     
    
   
  
 
 
 
  
 
 
  
   
   
  
 
 
  <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
  
   <soap:operation soapAction=''/>
   
    <soap:body namespace='http://localhost' use='literal'/>
   
   
    <soap:body namespace='http://localhost' use='literal'/>
   
  
 
 
  
   <soap:address location='<<I WIll REPLACE the URL HERE>>'/>
  
 


Regards
srk.



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

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



More information about the jboss-user mailing list