12 Replies Latest reply on Apr 17, 2009 8:39 AM by Simon Desbonnets

    A problem about soapAction and wsdl in JBossESB

    Dong Jinli Newbie

      Hello. I am using JBossESB4.3 GA .
      Now I want to invoke a webService using SoapAction, and the wsdl of the webService is generated by axis2 under tomcat.
      The endpoint of my wsdl is like 'http://127.0.0.1:8181/axis2/services/AddService' .
      But when my SoapAction analyzed the wsdl, it get the endpoint as 'http://127.0.0.1:80/axis2/services/AddService'.
      The port changed from 8181 to 80 automatically, and I failed to invoke the service.

      I find that the format of my wsdl has some difference with the wsdl which is generated by JBossESB using spring.
      I wonder if the SoapAction in JBossESB doesn't support the wsdl coming from axis2 ?
      Or I need to do some configurations?


      Thanks in advance.
      djl.

      The following is my error report

      10:46:48,573 INFO [STDOUT] Retrieving document at 'http://localhost:8181/axis2/services/AddService?wsdl'.
      10:46:49,058 INFO [SchemaUtils] Loading schema types from [http://localhost:8181/axis2/services/AddService?wsdl]
      10:46:49,058 INFO [SchemaUtils] Getting schema http://localhost:8181/axis2/services/AddService?wsdl
      10:46:49,104 INFO [SchemaUtils] schema for [http://cn.dareway.com/xsd] contained [{}] namespaces
      10:46:50,839 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceSOAP11Binding
      10:46:50,839 INFO [WsdlImporter] Importing binding {http://cn.dareway.com}AddServiceSOAP11Binding
      10:46:51,073 INFO [Soap11HttpBindingImporter] importing endpoint http://127.0.0.1:80/axis2/services/AddService
      10:46:51,292 INFO [Soap11HttpBindingImporter] importing operation add
      10:46:51,354 INFO [Soap11HttpBindingImporter] importing operation mul
      10:46:51,354 INFO [Soap11HttpBindingImporter] importing operation sub
      10:46:51,354 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceHttpBinding
      10:46:51,354 INFO [WsdlImporter] Missing importer for {http://cn.dareway.com}AddServiceHttpBinding
      10:46:51,354 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceSOAP12Binding
      10:46:51,354 INFO [WsdlImporter] Importing binding {http://cn.dareway.com}AddServiceSOAP12Binding
      10:46:51,354 INFO [Soap12HttpBindingImporter] importing endpoint http://127.0.0.1:80/axis2/services/AddService
      10:46:51,370 INFO [Soap12HttpBindingImporter] importing operation add
      10:46:51,370 INFO [Soap12HttpBindingImporter] importing operation mul
      10:46:51,370 INFO [Soap12HttpBindingImporter] importing operation sub
      10:46:51,370 INFO [WsdlImporter] Finding importer for {http://cn.dareway.com}AddServiceHttpBinding
      10:46:51,370 INFO [WsdlImporter] Missing importer for {http://cn.dareway.com}AddServiceHttpBinding
      10:46:51,511 INFO [STDOUT] Progress: 1 - Caching definition from url [http:// 127.0.0.1:8181/axis2/services/AddService?wsdl]
      10:46:52,870 INFO [HttpClientSupport$Helper] Initializing SSL
      10:46:53,401 WARN [HttpMethodBase] Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
      10:46:53,417 INFO [STDOUT] Progress: 1 - Loading definition from cache
      10:46:53,448 INFO [STDOUT] Retrieving document at 'http:// 127.0.0.1:8181/axis2/services/AddService?wsdl'.
      10:46:53,464 INFO [SchemaUtils] Loading schema types from [http:// 127.0.0.1:8181/axis2/services/AddService?wsdl]
      10:46:53,464 INFO [SchemaUtils] Getting schema http://localhost:8181/axis2/services/AddService?wsdl
      10:46:53,511 INFO [SchemaUtils] schema for [http://cn.dareway.com/xsd] contained [{}] namespaces
      10:46:55,917 WARN [ActionProcessingPipeline] Unexpected exception caught while processing the action pipeline: header: [ To: JMSEpr [ PortReference < <wsa:Address jms://localhost:1099/queue/quickstart_webservice_consumer1_esb/>,
       <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : localhost/>,
      <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>,
      <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:persistent : true/>, <wsa:ReferenceProperties jbossesb:acknowledge-mode : AUTO_ACKNOWLEDGE/>,
      <wsa:ReferenceProperties jbossesb:transacted : false/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> > ]
      MessageID: 24da086a-7f0a-4f56-a4ee-0bf590bc279e RelatesTo: jms:correlationID#24da086a-7f0a-4f56-a4ee-0bf590bc279e ]
      org.jboss.soa.esb.actions.ActionProcessingException: Failed to invoke SOAP Endpoint: 'http:// 127.0.0.1:80/axis2/services/AddService ' - 'add'.
       at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:443)
       at org.jboss.soa.esb.actions.soap.SOAPClient.process(SOAPClient.java:395)
       at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
       at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.net.SocketException: Connection reset
       at java.net.SocketInputStream.read(SocketInputStream.java:168)
       at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
       at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
       at org.apache.commons.httpclient.HttpParser.readRawLine(Unknown Source)
       at org.apache.commons.httpclient.HttpParser.readLine(Unknown Source)
       at org.apache.commons.httpclient.HttpConnection.readLine(Unknown Source)
       at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.readLine(Unknown Source)
       at org.apache.commons.httpclient.HttpMethodBase.readStatusLine(Unknown Source)
       at org.apache.commons.httpclient.HttpMethodBase.readResponse(Unknown Source)
       at org.apache.commons.httpclient.HttpMethodBase.execute(Unknown Source)
       at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(Unknown Source)
       at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(Unknown Source)
       at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
       at org.apache.commons.httpclient.HttpClient.executeMethod(Unknown Source)
       at org.jboss.soa.esb.actions.soap.SOAPClient.invokeEndpoint(SOAPClient.java:435)
       ... 6 more
      


        • 1. Re: A problem about soapAction and wsdl in JBossESB
          Dong Jinli Newbie

          Hi,

          Nobody else has encountered this problem?
          Or this is the question of SOAP instead of JBossESB?

          Thanks for any reply.

          • 3. Re: A problem about soapAction and wsdl in JBossESB
            Dong Jinli Newbie

            I have sent it to you, thanks in advance.

            • 4. Re: A problem about soapAction and wsdl in JBossESB
              Dong Jinli Newbie

              Hi,kevin

              Sorry to bother you, but I want to know if you have received my e-mail?
              Or I have sent it to a wrong address?


              Thanks. djl

              • 5. Re: A problem about soapAction and wsdl in JBossESB
                Kevin Conner Master

                Sorry, I haven't received anything. Can you try resending?

                • 6. Re: A problem about soapAction and wsdl in JBossESB
                  Dong Jinli Newbie

                  Hi,kevin

                  I resent it to you two days ago. Have you received it?
                  I think that your e-mail is 'Kevin.Conner@jboss.com', isn't it?


                  Thanks. djl

                  • 7. Re: A problem about soapAction and wsdl in JBossESB
                    Kevin Conner Master

                    That is the correct email address but I have not seen anything come through. Can you get onto the #jbossesb IRC channel on freenode?

                    • 8. Re: A problem about soapAction and wsdl in JBossESB
                      Dong Jinli Newbie

                      Hi,
                      Here is my WSDL file.

                      <wsdl:definitions xmlns:axis2="http://test" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:ns0="http://test/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://test"><wsdl:documentation>
                       This service is to add two intergers.
                       </wsdl:documentation>
                      <wsdl:types>
                       <xs:schema xmlns:ns="http://test/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://test/xsd">
                       <xs:element name="changePassWord">
                       <xs:complexType>
                       <xs:sequence>
                       <xs:element name="id" nillable="true" type="xs:string" />
                       <xs:element name="oldP" nillable="true" type="xs:string" />
                       <xs:element name="newP" nillable="true" type="xs:string" />
                       </xs:sequence>
                       </xs:complexType>
                       </xs:element>
                       <xs:element name="changePassWordResponse">
                       <xs:complexType>
                       <xs:sequence>
                       <xs:element name="return" nillable="true" type="xs:string" />
                       </xs:sequence>
                       </xs:complexType>
                       </xs:element>
                       <xs:element name="changePassWord2">
                       <xs:complexType>
                       <xs:sequence>
                       <xs:element name="id" nillable="true" type="xs:string" />
                       <xs:element name="oldP" nillable="true" type="xs:string" />
                       <xs:element name="newP" nillable="true" type="xs:string" />
                       </xs:sequence>
                       </xs:complexType>
                       </xs:element>
                       <xs:element name="changePassWord2Response">
                       <xs:complexType>
                       <xs:sequence>
                       <xs:element name="return" nillable="true" type="xs:string" />
                       </xs:sequence>
                       </xs:complexType>
                       </xs:element>
                       </xs:schema>
                      </wsdl:types>
                      
                      <wsdl:message name="changePassWord2Message">
                       <wsdl:part name="part1" element="ns0:changePassWord2" />
                      </wsdl:message>
                      <wsdl:message name="changePassWord2Response">
                       <wsdl:part name="part1" element="ns0:changePassWord2Response" />
                      </wsdl:message>
                      <wsdl:message name="changePassWordMessage">
                       <wsdl:part name="part1" element="ns0:changePassWord" />
                      </wsdl:message>
                      <wsdl:message name="changePassWordResponse">
                       <wsdl:part name="part1" element="ns0:changePassWordResponse" />
                      </wsdl:message>
                      <wsdl:portType name="ESBServicePortType">
                       <wsdl:operation name="changePassWord2">
                       <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:changePassWord2Message" wsaw:Action="urn:changePassWord2" />
                       <wsdl:output message="axis2:changePassWord2Response" />
                       </wsdl:operation>
                       <wsdl:operation name="changePassWord">
                       <wsdl:input xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" message="axis2:changePassWordMessage" wsaw:Action="urn:changePassWord" />
                       <wsdl:output message="axis2:changePassWordResponse" />
                       </wsdl:operation>
                      </wsdl:portType>
                      <wsdl:binding name="ESBServiceSOAP11Binding" type="axis2:ESBServicePortType">
                       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
                       <wsdl:operation name="changePassWord2">
                       <soap:operation soapAction="urn:changePassWord2" style="document" />
                       <wsdl:input>
                       <soap:body use="literal" />
                       </wsdl:input>
                       <wsdl:output>
                       <soap:body use="literal" />
                       </wsdl:output>
                       </wsdl:operation>
                       <wsdl:operation name="changePassWord">
                       <soap:operation soapAction="urn:changePassWord" style="document" />
                       <wsdl:input>
                       <soap:body use="literal" />
                       </wsdl:input>
                       <wsdl:output>
                       <soap:body use="literal" />
                       </wsdl:output>
                       </wsdl:operation>
                      </wsdl:binding>
                      <wsdl:binding name="ESBServiceSOAP12Binding" type="axis2:ESBServicePortType">
                       <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
                       <wsdl:operation name="changePassWord2">
                       <soap12:operation soapAction="urn:changePassWord2" style="document" />
                       <wsdl:input>
                       <soap12:body use="literal" />
                       </wsdl:input>
                       <wsdl:output>
                       <soap12:body use="literal" />
                       </wsdl:output>
                       </wsdl:operation>
                       <wsdl:operation name="changePassWord">
                       <soap12:operation soapAction="urn:changePassWord" style="document" />
                       <wsdl:input>
                       <soap12:body use="literal" />
                       </wsdl:input>
                       <wsdl:output>
                       <soap12:body use="literal" />
                       </wsdl:output>
                       </wsdl:operation>
                      </wsdl:binding>
                      <wsdl:binding name="ESBServiceHttpBinding" type="axis2:ESBServicePortType">
                       <http:binding verb="POST" />
                       <wsdl:operation name="changePassWord2">
                       <http:operation location="changePassWord2" />
                       <wsdl:input>
                       <mime:content type="text/xml" />
                       </wsdl:input>
                       <wsdl:output>
                       <mime:content type="text/xml" />
                       </wsdl:output>
                       </wsdl:operation>
                       <wsdl:operation name="changePassWord">
                       <http:operation location="changePassWord" />
                       <wsdl:input>
                       <mime:content type="text/xml" />
                       </wsdl:input>
                       <wsdl:output>
                       <mime:content type="text/xml" />
                       </wsdl:output>
                       </wsdl:operation>
                      </wsdl:binding>
                      <wsdl:service name="ESBService">
                       <wsdl:port name="ESBServiceSOAP11port_http" binding="axis2:ESBServiceSOAP11Binding">
                       <soap:address location="http://10.2.0.176:8181/axis2/services/ESBService" />
                       </wsdl:port>
                       <wsdl:port name="ESBServiceSOAP12port_http" binding="axis2:ESBServiceSOAP12Binding">
                       <soap12:address location="http://10.2.0.176:8181/axis2/services/ESBService" />
                       </wsdl:port>
                       <wsdl:port name="ESBServiceHttpport" binding="axis2:ESBServiceHttpBinding">
                       <http:address location="http://211.87.226.219:80/axis2/services/ESBService" />
                       </wsdl:port>
                      </wsdl:service>
                      </wsdl:definitions>
                      


                      I'm wondering if it is the problem with the version of soapui-client.
                      In JBossESB the version of soapui-client is v1.7.1, and the Web Service testing tool SoapUI is using the v2.0.2.
                      But I don't have the problem in the tool SoapUI.

                      If the soapui-client needs update?



                      • 9. Re: A problem about soapAction and wsdl in JBossESB
                        Newbie

                        I am facing the same problem now. Did you get a solution to the problem ?

                        In fact the port is changing from any given port to 80.

                        • 10. Re: A problem about soapAction and wsdl in JBossESB
                          Kevin Conner Master

                          Unfortunately I had missed the follow up on the forum and have not looked into this. I am still willing to help resolve any issues however, and will take a look at this again.

                          • 11. Re: A problem about soapAction and wsdl in JBossESB
                            Tom Fennelly Master

                            Did you try loading the WSDL in soapUI client and making the invocation on the operation directly i.e. taking JBossESB out of the equation completely?

                            • 12. Re: A problem about soapAction and wsdl in JBossESB
                              Simon Desbonnets Newbie

                              Hi,

                              I had the same problem today: my wsdl was on port 8081 but when Jboss was sending soap messages, the endpoint port was 80 and the message connection refused follows.

                              I didn't really understood what I did but I solved my problem.
                              I suppose that it's not a Jboss problem.
                              I did my test with Axis2 and I saw that the port was wrong in the wsdl. By reading again the previous post we can see in the wsdl file

                              <wsdl:port name="ESBServiceHttpport" binding="axis2:ESBServiceHttpBinding">
                               <http:address location="http://211.87.226.219:80/axis2/services/ESBService" />
                               </wsdl:port>


                              So the wsdl is wrong (port 80). After restarting my tomcat server and made few changes in the axis2.xml file (on port and disable soap12 and REST) my problem was solved.

                              maybe it will help someone...