7 Replies Latest reply on Nov 9, 2006 7:00 PM by thomas.diesler

    jaxrpc interop

    zurchman

      I have a recalcitrant client that seems to insist on stripping the Namespace from the rpc request.

      I'm testing the JBossWS 1.0.3 rpcstyle sample.

      When deployed on Tomcat, the service does not seem to care about the missing namespace. JBossWS throws a SOAP Fault.

      I'm afraid I'm not familiar with the intricacies of method dispatching.

      Is there any way to redeploy this service on JBossWS so that it can tolerate this missing namespace?

      Here's a request from soapui, which includes xmlns:rpc and returns a valid response:

      2006-11-02 14:24:19,597 DEBUG [jbossws.SOAPMessage] Incomming SOAPMessage
      <soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/' 
      xmlns:rpc='http://org.jboss.ws/samples/rpcstyle'>
      <soapenv:Header/>
      <soapenv:Body>
      <rpc:purchase>
      <String_1 xmlns=''>Hello</String_1>
      <String_2 xmlns=''>There</String_2>
      </rpc:purchase></soapenv:Body></soapenv:Envelope>
      2006-11-02 14:24:19,598 DEBUG [org.jboss.ws.soap.SOAPMessageDispatcher] getDispatchDestination: {http://org.jboss.ws/samples/rpcstyle}purchase
      


      And here's the request from the careless client, which results in an Exception:

      2006-11-02 14:24:45,217 DEBUG [org.jboss.ws.server.StandardEndpointServlet] doPost: /jbossws-samples-rpcstyle
      2006-11-02 14:24:45,217 DEBUG [org.jboss.ws.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.soap.SOAPMessageContextImpl@bd0da3
      2006-11-02 14:24:45,218 DEBUG [org.jboss.ws.server.ServiceEndpoint] BEGIN handleRequest: jboss.ws:context=jbossws-samples-rpcstyle,endpoint=TrivialEndpoint
      2006-11-02 14:24:45,219 DEBUG [org.jboss.ws.soap.MessageFactoryImpl] createMessage: [contentType=text/xml]
      2006-11-02 14:24:45,220 DEBUG [org.jboss.ws.soap.SOAPContentElement] setXMLFragment: <String_1 xmlns=''>Kermit</String_1>
      2006-11-02 14:24:45,221 DEBUG [org.jboss.ws.soap.SOAPContentElement] setXMLFragment: <String_2 xmlns=''>Ferrari</String_2>
      2006-11-02 14:24:45,221 DEBUG [jbossws.SOAPMessage] Incomming SOAPMessage
      
      <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
       <SOAP-ENV:Header/>
       <SOAP-ENV:Body>
       <purchase>
       <String_1 xmlns=''>Kermit</String_1>
       <String_2 xmlns=''>Ferrari</String_2>
       </purchase></SOAP-ENV:Body>
       </SOAP-ENV:Envelope>
      2006-11-02 14:24:45,221 DEBUG [org.jboss.ws.soap.SOAPMessageDispatcher] getDispatchDestination: null
      2006-11-02 14:24:45,222 DEBUG [org.jboss.ws.soap.SOAPMessageDispatcher] getDispatchDestination: null
      2006-11-02 14:24:45,222 DEBUG [javax.xml.rpc.soap.SOAPFaultException] new SOAPFaultException [code={http://schemas.xmlsoap.org/soap/envelope/}Client,string=Endpoint {http://org.jboss.ws/samples/rpcstyle}TrivialServicePort does not contain operation meta data for: purchase,actor=null,detail=null]
      2006-11-02 14:24:45,222 ERROR [org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper] SOAP request exception
      javax.xml.rpc.soap.SOAPFaultException: Endpoint {http://org.jboss.ws/samples/rpcstyle}TrivialServicePort does not contain operation meta data for: purchase
       at org.jboss.ws.server.ServiceEndpointInvoker.getDispatchDestination
      ...
      


        • 1. Re: jaxrpc interop
          romeufigueira

          You could try and modify your client to include a line like this.

          envelope.addNamespaceDeclaration(PREFIX,NAMESPACE_URI);


          Where prefix would be "rpc" and NAMESPACE "http://org.jboss.ws/samples/rpcstyle"

          That would add an adicional name space declaration like in your soapui example.



          • 2. Re: jaxrpc interop
            zurchman

             

            You could try and modify your client...


            The client is a "black box" so I'm stuck with trying to configure the service so it won't choke on an empty Namespace.

            Just to clarify, the missing namespace is tolerated if the service is deployed under tomcat50-jwsdp; JBoss 1.0.3 throws a Fault.




            • 3. Re: jaxrpc interop
              thomas.diesler

              This is fixed in jbossws-1.0.3.SP1

              • 4. Re: jaxrpc interop
                zurchman

                 

                "thomas.diesler@jboss.com" wrote:
                This is fixed in jbossws-1.0.3.SP1

                Great!

                But can you tell me how can I get a copy of 1.0.3.SP1?

                I'm a lowly user. It was hard enough trying to find a link to download the 1.0.3.GA release.

                Thanks!


                • 6. Re: jaxrpc interop
                  zurchman

                   

                  "thomas.diesler@jboss.com" wrote:
                  This is fixed in jbossws-1.0.3.SP1

                  Or maybe not.

                  I'm seeing the same behavior with 1.0.3.SP1

                  Do I have to change jboss-xml-binding.jar with this release?

                  2006-11-09 14:02:01,181 DEBUG [org.jboss.ws.server.StandardEndpointServlet] doPost: /jbossws-samples-rpcstyle
                  2006-11-09 14:02:01,181 DEBUG [org.jboss.ws.soap.MessageContextAssociation] pushMessageContext: org.jboss.ws.soap.SOAPMessageContextImpl@5579a1
                  2006-11-09 14:02:01,182 DEBUG [org.jboss.ws.server.ServiceEndpoint] BEGIN handleRequest: jboss.ws:context=jbossws-samples-rpcstyle,endpoint=TrivialEndpoint
                  2006-11-09 14:02:01,183 DEBUG [org.jboss.ws.soap.MessageFactoryImpl] createMessage: [contentType=text/xml]
                  2006-11-09 14:02:01,185 DEBUG [org.jboss.ws.soap.SOAPContentElement] setXMLFragment: <String_1>Kermit</String_1>
                  2006-11-09 14:02:01,185 DEBUG [org.jboss.ws.soap.SOAPContentElement] setXMLFragment: <String_2>Ferrari</String_2>
                  2006-11-09 14:02:01,185 DEBUG [jbossws.SOAPMessage] Incomming SOAPMessage
                  
                  <SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/'>
                   <SOAP-ENV:Header/>
                   <SOAP-ENV:Body>
                   <purchase>
                   <String_1>Kermit</String_1>
                   <String_2>Ferrari</String_2>
                   </purchase>
                   </SOAP-ENV:Body>
                  </SOAP-ENV:Envelope>
                  
                  2006-11-09 14:02:01,186 DEBUG [org.jboss.ws.soap.SOAPMessageDispatcher] getDispatchDestination: null
                  2006-11-09 14:02:01,186 DEBUG [org.jboss.ws.soap.SOAPMessageDispatcher] getDispatchDestination: null
                  2006-11-09 14:02:01,189 DEBUG [javax.xml.rpc.soap.SOAPFaultException] new SOAPFaultException [code={http://schemas.xmlsoap.org/soap/envelope/}Client,string=Endpoint {http://org.jboss.ws/samples/rpcstyle}TrivialServicePort does not contain operation meta data for: purchase,actor=null,detail=null]
                  2006-11-09 14:02:01,196 ERROR [org.jboss.ws.jaxrpc.SOAPFaultExceptionHelper] SOAP request exception
                  javax.xml.rpc.soap.SOAPFaultException: Endpoint {http://org.jboss.ws/samples/rpcstyle}TrivialServicePort does not contain operation meta data for: purchase
                   at org.jboss.ws.server.ServiceEndpointInvoker.getDispatchDestination
                  



                  • 7. Re: jaxrpc interop
                    thomas.diesler

                    Yes, the request might be comming from a careless client that misses to namespace qualify the operation name.

                    If <rpc:purchase> is valid, we dont not have provision for an invalid rpc element.

                    What is fixed in SP1 is, that the namespace can also be defined on the envelope.