4 Replies Latest reply on Mar 16, 2006 12:16 PM by anniexie

    Exception with INOUT-Mode in a document\literal-Webservice

    mugwump

      I'm getting a strange exception when I try to return a SOAPElement in a document\literal webservice:

      11:00:52,564 INFO [AxisServlet] java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType. The java type javax.xml.soap.SOAPElement does not match the mode inout
      


      We are using the wscompile with the nodatabinding-option, so the signature of the generated port-implementation looks like this:

      public SOAPElement signup(SOAPElement orderElement) throws RemoteException;
      


      The Webservice runs flawless, as long as we don't return anything (public void signup(SOAPElement orderElement) ) - we only get the exception when we switch to inout.

      Here is the relevant part of the wsdl:
      <message name="OrderRequest">
       <part name="request" element="orderTypes:ullOrder" />
       </message>
      
       <message name="OrderResponse">
       <part name="request" element="orderTypes:returnCode" />
       </message>
      
       <portType name="SignupPort">
       <operation name="signup" >
       <input message="tns:OrderRequest" />
       <output message="tns:OrderResponse" />
       </operation>
       </portType>
      
       <binding type="tns:SignupPort" name="SignupBinding">
       <soap:binding style="document"
       transport="http://schemas.xmlsoap.org/soap/http" />
      
       <operation name="signup">
       <soap:operation soapAction="" />
       <input>
       <soap:body use="literal" />
       </input>
       <output>
       <soap:body use="literal"/>
       </output>
       </operation>
       </binding>
      
       <service name="SignupServices">
       <port name="SignupPort" binding="tns:SignupBinding">
       <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
       </port>
       </service>
      
       </definitions>
      


      I found an entry in jira that looks vaguely related:
      http://jira.jboss.com/jira/browse/JBWS-381

      but I'm still wondering about the consequences: Does this mean we won't be able to use document\literal on return-types before 4.0.4 is out?

      Cheers
      stf

        • 1. Re: Exception with INOUT-Mode in a document\literal-Webservi
          mugwump

          ok, sorry guys: The problem had another root in an exception that was catched but not rethrown - the method therefore returned NULL instead of an initialised SOAP-Element, which resulted in the above strange exception. My fault and the fault of the misleading exception...

          cheers
          stf

          • 2. Re: Exception with INOUT-Mode in a document\literal-Webservi
            balrupa

            Could you please tell me how you fixed it .
            I have the same problem. I have jboss4.01 SP3, created doc/lit webservices and used Sun WSDP -wsimport to generate java classes.
            Also used wscompile to generate the mapping .
            I'm getting the following error while trying to access the wsdl file

            21:27:11,545 INFO [AxisServlet] Exception:
            java.lang.IllegalArgumentException: Illegal argument passed to ParameterDesc.setJavaType. The java type org.tempuri.person.AddResponse does not match the mode inout
            at org.jboss.axis.description.ParameterDesc.setJavaType(ParameterDesc.java:269)
            at org.jboss.axis.description.ServiceDesc.syncOperationToClass(ServiceDesc.java:753)
            at org.jboss.axis.description.ServiceDesc.getSyncedOperationsForName(ServiceDesc.java:1187)
            at org.jboss.axis.description.ServiceDesc.loadServiceDescByIntrospectionRecursive(ServiceDesc.java:1045)
            at org.jboss.axis.description.ServiceDesc.loadServiceDescByIntrospection(ServiceDesc.java:972)
            at org.jboss.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:732)
            at org.jboss.webservice.server.InvokerProvider.initServiceDesc(InvokerProvider.java:106)
            at org.jboss.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:388)
            at org.jboss.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:560)
            at org.jboss.axis.deployment.wsdd.WSDDDeployableItem.getNewInstance(WSDDDeployableItem.java:322)
            at org.jboss.axis.deployment.wsdd.WSDDDeployableItem.getInstance(WSDDDeployableItem.java:307)
            at org.jboss.axis.deployment.wsdd.WSDDDeployment.getService(WSDDDeployment.java:526)
            at org.jboss.axis.configuration.FileProvider.getService(FileProvider.java:288)
            at org.jboss.axis.AxisEngine.getService(AxisEngine.java:253)
            at org.jboss.webservice.server.ServiceEndpointServlet.doGet(ServiceEndpointServlet.java:58)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
            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)

            • 3. Re: Exception with INOUT-Mode in a document\literal-Webservi
              thomas.diesler

              This should be fixed in jboss-4.0.4. You can you try the latest Branch_4_0

              • 4. Re: Exception with INOUT-Mode in a document\literal-Webservi
                anniexie

                How did you write a DOC/Literal webs ervice using JBoss4.0.1SP1? There is no JBoss AS guide for this version. The guide for JBoss 4.0.2 and JBoss 4.0.3 only has RPC instruction and sample. I need help on how to create a document/literal web service using JBoss4.0.1. Any help would be really appreciated.