6 Replies Latest reply on Jan 4, 2006 9:23 AM by Thomas Diesler

    Array of boolean problem

    Giscard Faria Newbie

      Hi guys, I think I got a BIG problem using Web Service in JBoss, I create a simple interface:

      public void testArrayOfBoolean(boolean[] responses) throws RemoteException;
      


      a simple implementation for this interface
      public void testArrayOfBoolean(boolean[] responses){
       for(int i = 0; i < responses.length; i++)
       System.out.println("RESPONSE[" + i + "]: " + responses);
      }//end testArrayOfBoolean() method
      


      this is the generated wsdl
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name="RfidManagerInterface" targetNamespace="http://www.nec.co.jp/xmlnec/rfidmgr" xmlns:tns="http://www.nec.co.jp/xmlnec/rfidmgr" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
       <types>
       <schema targetNamespace="http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/" xmlns:tns="http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
       <complexType name="booleanArray">
       <sequence>
       <element name="value" type="boolean" minOccurs="0" maxOccurs="unbounded"/></sequence></complexType></schema></types>
       <message name="RfidManagerInterfaceSEI_testArrayOfBoolean">
       <part name="arrayOfboolean_1" type="ns2:booleanArray"/></message>
       <message name="RfidManagerInterfaceSEI_testArrayOfBooleanResponse"/>
       <portType name="RfidManagerInterfaceSEI">
       <operation name="testArrayOfBoolean" parameterOrder="arrayOfboolean_1">
       <input message="tns:RfidManagerInterfaceSEI_testArrayOfBoolean"/>
       <output message="tns:RfidManagerInterfaceSEI_testArrayOfBooleanResponse"/></operation></portType>
       <binding name="RfidManagerInterfaceSEIBinding" type="tns:RfidManagerInterfaceSEI">
       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
       <operation name="testArrayOfBoolean">
       <soap:operation soapAction=""/>
       <input>
       <soap:body use="literal" namespace="http://www.nec.co.jp/xmlnec/rfidmgr"/></input>
       <output>
       <soap:body use="literal" namespace="http://www.nec.co.jp/xmlnec/rfidmgr"/></output></operation></binding>
       <service name="RfidManagerInterface">
       <port name="RfidManagerInterfaceSEIPort" binding="tns:RfidManagerInterfaceSEIBinding">
       <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
      


      this is the deployed wsdl on JBoss
      <?xml version="1.0" encoding="UTF-8" ?>
      - <definitions name="RfidManagerInterface" targetNamespace="http://www.nec.co.jp/xmlnec/rfidmgr" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.nec.co.jp/xmlnec/rfidmgr" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      - <types>
      - <schema targetNamespace="http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      - <complexType name="booleanArray">
      - <sequence>
       <element maxOccurs="unbounded" minOccurs="0" name="value" type="boolean" />
       </sequence>
       </complexType>
       </schema>
       </types>
       <message name="RfidManagerInterfaceSEI_testArrayOfBooleanResponse" />
      - <message name="RfidManagerInterfaceSEI_testArrayOfBoolean">
       <part name="arrayOfboolean_1" type="ns2:booleanArray" />
       </message>
      - <portType name="RfidManagerInterfaceSEI">
      - <operation name="testArrayOfBoolean" parameterOrder="arrayOfboolean_1">
       <input message="tns:RfidManagerInterfaceSEI_testArrayOfBoolean" />
       <output message="tns:RfidManagerInterfaceSEI_testArrayOfBooleanResponse" />
       </operation>
       </portType>
      - <binding name="RfidManagerInterfaceSEIBinding" type="tns:RfidManagerInterfaceSEI">
       <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
      - <operation name="testArrayOfBoolean">
       <soap:operation soapAction="" />
      - <input>
       <soap:body namespace="http://www.nec.co.jp/xmlnec/rfidmgr" use="literal" />
       </input>
      - <output>
       <soap:body namespace="http://www.nec.co.jp/xmlnec/rfidmgr" use="literal" />
       </output>
       </operation>
       </binding>
      - <service name="RfidManagerInterface">
      - <port binding="tns:RfidManagerInterfaceSEIBinding" name="RfidManagerInterfaceSEIPort">
       <soap:address location="http://BRB42603NS:8080/WebServiceInterface/RfidManagerInterface" />
       </port>
       </service>
       </definitions>
      


      This is the error I gotted when try to call the function:

      2005-12-12 10:56:43,281 ERROR [org.jboss.axis.providers.java.RPCInvocation] org.xml.sax.SAXException: Deserializing parameter 'arrayOfboolean_1': could not find deserializer for type {http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/}booleanArray
      org.xml.sax.SAXException: Deserializing parameter 'arrayOfboolean_1': could not find deserializer for type {http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/}booleanArray
      at org.jboss.axis.message.RPCHandler.onStartChild(RPCHandler.java:326)
      at org.jboss.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1168)
      at org.jboss.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
      at org.jboss.axis.message.SOAPElementAxisImpl.publishToHandler(SOAPElementAxisImpl.java:1389)
      at org.jboss.axis.message.RPCElement.deserialize(RPCElement.java:262)
      at org.jboss.axis.message.RPCElement.getParams(RPCElement.java:396)
      at org.jboss.axis.providers.java.RPCInvocation.prepareFromRequestEnvelope(RPCInvocation.java:235)
      at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:103)
      at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
      at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
      at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
      at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
      at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
      at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:200)
      at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:89)
      at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:911)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
      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:81)
      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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      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:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      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)
      2005-12-12 10:56:43,296 ERROR [org.jboss.webservice.server.ServerEngine] Server error: AxisFault
      faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
      faultSubcode:
      faultString: Deserializing parameter 'arrayOfboolean_1': could not find deserializer for type {http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/}booleanArray
      faultActor:
      faultNode:
      faultDetail:
      {http://xml.apache.org/axis/}stackTrace: org.xml.sax.SAXException: Deserializing parameter 'arrayOfboolean_1': could not find deserializer for type {http://www.nec.co.jp/xmlnec/rfidmgr/types/arrays/}booleanArray
      at org.jboss.axis.message.RPCHandler.onStartChild(RPCHandler.java:326)
      at org.jboss.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:1168)
      at org.jboss.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:244)
      at org.jboss.axis.message.SOAPElementAxisImpl.publishToHandler(SOAPElementAxisImpl.java:1389)
      at org.jboss.axis.message.RPCElement.deserialize(RPCElement.java:262)
      at org.jboss.axis.message.RPCElement.getParams(RPCElement.java:396)
      at org.jboss.axis.providers.java.RPCInvocation.prepareFromRequestEnvelope(RPCInvocation.java:235)
      at org.jboss.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:103)
      at org.jboss.axis.providers.java.JavaProvider.invoke(JavaProvider.java:358)
      at org.jboss.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:73)
      at org.jboss.axis.SimpleChain.doVisiting(SimpleChain.java:160)
      at org.jboss.axis.SimpleChain.invoke(SimpleChain.java:123)
      at org.jboss.axis.handlers.soap.SOAPService.invoke(SOAPService.java:560)
      at org.jboss.webservice.server.ServerEngine.invokeInternal(ServerEngine.java:200)
      at org.jboss.webservice.server.ServerEngine.invoke(ServerEngine.java:89)
      at org.jboss.axis.transport.http.AxisServlet.doPost(AxisServlet.java:911)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
      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:81)
      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.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      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:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      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)

      {http://xml.apache.org/axis/}isRuntimeException: true