6 Replies Latest reply on Sep 4, 2006 2:16 PM by thomas.diesler

    JBossWS response does not match WSDL message definition; why

    doug.palmer

      Hi

      I have been trying to figure out a fundamental inconsistency with JBossWS. When I deploy a SessionBean as a web service with JBoss-4.0.4 + JBossWS 1.0.2 + EJB3; JBossWS deploys the service and generates a WSDL description of the service.

      In the generated WSDL the output messages are defined with a name INTERFACE-NAME_METHOD-NAMEResponse.

      However, when the service is invoked the message returned from the service is METHOD-NAMEResponse.

      Surely the the message names should be the same? How can we program with web services if JBossWS returns messages that don't conform to the WSDL description of those messages?

      Regards
      Doug

        • 1. Re: JBossWS response does not match WSDL message definition;
          doug.palmer

          Here is an example; the following wsdl was generated by JBossWS for my service:

          <definitions name='CalculatorService' targetNamespace='http://services/jaws' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='http://services/jaws' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
           <types></types>
           <message name='Calculator_add'>
           <part name='int_1' type='xsd:int'/>
           <part name='int_2' type='xsd:int'/>
           </message>
           <message name='Calculator_addResponse'>
           <part name='result' type='xsd:int'/>
           </message>
           <portType name='Calculator'>
           <operation name='add' parameterOrder='int_1 int_2'>
           <input message='tns:Calculator_add'/>
           <output message='tns:Calculator_addResponse'/>
           </operation>
           </portType>
           <binding name='CalculatorBinding' type='tns:Calculator'>
           <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
           <operation name='add'>
           <soap:operation soapAction=''/>
           <input>
           <soap:body namespace='http://services/jaws' use='literal'/>
           </input>
           <output>
           <soap:body namespace='http://services/jaws' use='literal'/>
           </output>
           </operation>
           </binding>
           <service name='CalculatorService'>
           <port binding='tns:CalculatorBinding' name='CalculatorPort'>
           <soap:address location='http://Dogbook.local:8080/test-services/CalculatorBean'/>
           </port>
           </service>
          </definitions>
          


          If I send a request message in tags <Calculator_add> then the service endpoint reports that the porttype does not contain an operation named <Calculator_add>. Instead the service expects tags .

          Similarly, the service will return instead of <Calculator_addResponse> which was described in the wsdl.

          Why does this mismatch exist?

          Regards
          Doug

          • 2. Re: JBossWS response does not match WSDL message definition;
            thomas.diesler

            This is probably not a general issue, otherwise the test clients that consume the server side generated wsdl would fail.

            Please create a JIRA issue and attach a sample deployment (with source) that allows me to reproduce what you are seeing.

            • 3. Re: JBossWS response does not match WSDL message definition;
              doug.palmer

              Ok, the issue is now on JIRA; http://jira.jboss.com/jira/browse/JBWS-1154. I'm guessing that you don't have an issue with it because you write code that responds to the messages you know the service will return. Instead of writing code from the WSDL.

              The WSDL describes the input to this service as so sending a message in <Calculator_add> tags should invoke it. However JBossWS expects tags. Similarly the service should respond with <Calculator_addResponse> tags but it actually responds with tags.

              Regards
              Doug

              • 4. Re: JBossWS response does not match WSDL message definition;
                jason.greene

                 

                "Doug.Palmer" wrote:

                In the generated WSDL the output messages are defined with a name INTERFACE-NAME_METHOD-NAMEResponse.

                However, when the service is invoked the message returned from the service is METHOD-NAMEResponse.

                Surely the the message names should be the same? How can we program with web services if JBossWS returns messages that don't conform to the WSDL description of those messages?


                What gave you this idea? In WSDL 1.1 message names are meaningless.
                Did you read the spec?

                http://www.w3.org/TR/wsdl

                -Jason

                • 5. Re: JBossWS response does not match WSDL message definition;
                  doug.palmer

                   

                  "jason.greene@jboss.com" wrote:


                  What gave you this idea? In WSDL 1.1 message names are meaningless.
                  Did you read the spec?

                  http://www.w3.org/TR/wsdl

                  -Jason


                  I guess I completely missed the point, sorry. I've just read the spec and see I got it wrong.

                  Regards
                  Doug

                  • 6. Re: JBossWS response does not match WSDL message definition;
                    thomas.diesler

                    The operation is called "add"

                     <portType name='Calculator'>
                     <operation name='add' parameterOrder='int_1 int_2'>
                     <input message='tns:Calculator_add'/>
                     <output message='tns:Calculator_addResponse'/>
                     </operation>
                     </portType>