0 Replies Latest reply on Jun 25, 2012 11:42 AM by norstadt

    Proxied webservice has incorrect endpoint

    norstadt

      Hi,

       

      For SOA platform version 5.2.0 I've written a SOAP Proxy action in my ESB which points to an internal web service, but upon deployment, it shows an incorrect endpoint.

       

      This is the config in the jboss-esb.xml:

       

      <action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" name="Web Service Proxy">
           <property name="wsdl" value="internal://jboss.ws:context=ctm-ws,endpoint=CTMProxy"/>
      </action>
      

       

       

      The web service is deployed in a war file and the following console output is shown upon deployment:

       

      2012-04-30 12:02:50,826 INFO  [org.jboss.wsf.framework.management.DefaultEndpointRegistry] register: jboss.ws:context=ctm-ws,endpoint=CTMProxy

      2012-04-30 12:02:50,828 WARN  [org.jboss.wsf.common.management.AbstractServerConfig] Unable to calculate 'WebServiceSecurePort', using default '8443'

      2012-04-30 12:02:50,830 INFO  [org.jboss.wsf.stack.cxf.DescriptorDeploymentAspect] Add Service

      id=CTMProxy

      address=http://jboss-soa:8080/ctm-ws/ctmproxy

      implementor=com.ctm.ws.CTMProxyService

      invoker=org.jboss.wsf.stack.cxf.InvokerJSE

      mtomEnabled=false

       

       

      The ESB module is in a esb file and the following console output is shown upon deployment:

       

      2012-04-30 12:03:02,011 INFO  [org.jboss.soa.esb.actions.soap.proxy.SOAPProxy] mapped element [{urn:xsd:ctmproxy/Cancel}CTM_Message] to operation [{urn:wsdl:ctmproxy}submitCancel]

      2012-04-30 12:03:02,036 INFO  [org.jboss.soa.esb.actions.soap.proxy.SOAPProxy] mapped binding [{urn:wsdl:ctmproxy}CTMProxySOAPBinding] to transport [org.jboss.soa.esb.actions.soap.proxy.HttpSOAPProxyTransport] with endpoint address: [http://blah.com]

       

       

      I would expect the endpoint address to be that of the web service, i.e. http://jboss-soa:8080/ctm-ws/ctmproxy. When I access the proxied wsdl (at http://jboss-soa:8080/ctm-esb/http/CTM/CTMProxyService?wsdl) it loads and displays the correct wsdl. But when I initiate a request, an unknown host error occurs:

       

      java.net.UnknownHostException: blah
      
      .com
      
      
       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:195)
       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
       at java.net.Socket.connect(Socket.java:529)
       at java.net.Socket.connect(Socket.java:478)
       at java.net.Socket.<init>(Socket.java:375)
       at java.net.Socket.<init>(Socket.java:249)
       at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:80)
       at org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:122)
       at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
       at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
       at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
       at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
       at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
       at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
       at org.jboss.soa.esb.actions.routing.http.HttpRouter.process(HttpRouter.java:150)
       at org.jboss.soa.esb.actions.soap.proxy.HttpSOAPProxyTransport.process(HttpSOAPProxyTransport.java:130)
       at org.jboss.soa.esb.actions.soap.proxy.SOAPProxy.process(SOAPProxy.java:412)
       at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:649)
       at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:603)
       at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:433)
       at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:550)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
       at java.lang.Thread.run(Thread.java:662)
      

       

      The url of http://blah.com is defined in the wsdl file in the web service war module:

       

      <wsdl:service name="CTMProxyService">
         <wsdl:port name="CTMProxy" binding="tns:CTMProxySOAPBinding">
            <soap:address location="http://lgim.com&quot;/http://blah.com"/>
         </wsdl:port>
      </wsdl:service>
      

       

      But once deployed, the wsdl at (http://jboss-soahttp://jboss-soa) has this::8080/ctm-ws/ctmproxy?wsdl

       

      <wsdl:service name="CTMProxyService">
         <wsdl:port binding="tns:CTMProxySOAPBinding" name="CTMProxy">
            <soap:address location="http://jboss-soa:8080/ctm-ws/ctmproxy"/>
         </wsdl:port>
      </wsdl:service>
      

       

      Sending request directly to the web service are successful.

       

      Any ideas?