3 Replies Latest reply on May 24, 2010 11:41 AM by David Ward

    SoapProxy issue while calling Client Program

    lackki rao Newbie
      I am a beginer to JBOSS ESB, it's really wonderful to work on different features of it .
      pls help me to solve this issue.
        for this i downloaded Galileo , Jboss ESB 4.7 and installed ESB and AS Tools .
      <?xml version="1.0" encoding="UTF-8"?>
      <services>
      <service category="Proxy_Basic" name="Proxy"
      description="Basic WebService Proxy"
      invmScope="GLOBAL">
      <listeners>
      <http-gateway name="Proxy_Basic-GwListener" />
      </listeners>
      <actions mep="RequestResponse">
      <action name="echo-request"
      class="org.jboss.soa.esb.actions.SystemPrintln">
      <property name="message" value="Message before SOAPProxy" />
      </action>
      <action name="proxy"
      class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy">
      <property name="wsdl" value="http://www.webservicex.net/stockquote.asmx?WSDL"/>
      <property name="http.proxyHost" value="XXXX"/>
      <property name="http.proxyPort" value="XXXX"/>
      </action>
      <action name="echo-response"
      class="org.jboss.soa.esb.actions.SystemPrintln">
      <property name="message" value="Message after SOAPProxy" />
      </action>
      </actions>
      </service>
      </services>
      </jbossesb>
      Application deployed succesfully
      mapped operation [{http://www.webserviceX.NET/}GetQuote] to binding [{http://www.webserviceX.NET/}StockQuoteHttpPost]
      mapped soapaction ["http://www.webserviceX.NET/GetQuote"] to binding [{http://www.webserviceX.NET/}StockQuoteSoap]
      could not map binding [{http://www.webserviceX.NET/}StockQuoteHttpPost] to transport with endpoint address: [dummy]
      mapped binding [{http://www.webserviceX.NET/}StockQuoteSoap] to transport [org.jboss.soa.esb.actions.soap.proxy.HttpSOAPProxyTransport] with endpoint address: [http://www.webservicex.net/stockquote.asmx]
      could not map binding [{http://www.webserviceX.NET/}StockQuoteHttpGet] to transport with endpoint address: [dummy]
      mapped binding [{http://www.webserviceX.NET/}StockQuoteSoap12] to transport [org.jboss.soa.esb.actions.soap.proxy.HttpSOAPProxyTransport] with endpoint address: [http://www.webservicex.net/stockquote.asmx]
      but while calling from client program its giving Response Code 500 and
      </pre></p><p><b>root cause</b> <pre>org.jboss.soa.esb.couriers.FaultMessageException: org.jboss.soa.esb.actions.ActionProcessingException: null transport for soapaction [&quot;&quot;], operation [{http://www.webservicex.net/}GetQuote], binding [null]
        • 1. Re: SoapProxy issue while calling Client Program
          lackki rao Newbie
          Here is my Client code but nothing great.
          public class ClientTest
          {
          private static final String SOAP_SAMPLE =
          "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:web=\"http://www.webservicex.net/\">"+
          "<soapenv:Header/>"+
            "<soapenv:Body>"+
            "<web:GetQuote>"+
             "<web:symbol>RHT</web:symbol>"+
             "</web:GetQuote>"+
              "</soapenv:Body>"+
            "</soapenv:Envelope>";
          public static void main(String args[]) throws Exception
          {
          System.out.println("****  REQUEST  URL: " + url);
          PostMethod method = new PostMethod(url);
          method.setRequestHeader("Content-Type", "text/xml;charset=UTF-8");
          //method.addParameter("proxyHost", "10.48.133.184");
          //method.addParameter("proxyPort", "6588");
          //method.addParameter("proxySet", "true");
          //System.setProperty("proxyHost", "10.48.133.184");
          //System.setProperty("proxyPort", "6588");
          //method.
          method.setRequestHeader("SOAPAction", "\"\"");
          //String request = SOAP_SAMPLE;
          System.out.println("****  REQUEST BODY: " + SOAP_SAMPLE);
          method.setRequestEntity( new StringRequestEntity(SOAP_SAMPLE) );
          HttpClient client = new HttpClient();
          InputStream response = null;
          try
          {
          int code = client.executeMethod(method);
          System.out.println("**** RESPONSE CODE: " + code);
          response = method.getResponseBodyAsStream();
          byte[] bytes = StreamUtils.readStream(response);
          System.out.println("**** RESPONSE BODY: " + new String(bytes, method.getResponseCharSet()));
          }
          finally
          {
          method.releaseConnection();
          if (response != null)
          {
          response.close();
          }
          }
          }
          }
          • 2. Re: SoapProxy issue while calling Client Program
            lackki rao Newbie
            org.jboss.soa.esb.couriers.FaultMessageException: org.jboss.soa.esb.actions.ActionProcessingException: null transport for soapaction

            i couldn't find org.jboss.soa.esb.actions.soap.proxy.SOAPProxy class in ESB 4.7 jars, i downloaded all  needed classes from
            but still Iam getting the Same Exception
            Pls help me , is there any mistake in this ..
            • 3. Re: SoapProxy issue while calling Client Program
              David Ward Master

              Lackkie,

               

              First I should note that this is the JBossESB Developer Forum, where we discuss design and architecture of JBossESB.  If you require community assistance in the future, please use the JBossESB User Forum instead.  Another option is to buy a subscription to our SOA Platform, where we can provide you, the customer, with a guaranteed SLA.

               

              However, I will give you a pointer here this time... 

               

              In looking at your test program, I do see this line:

               

              method.setRequestHeader("SOAPAction", "\"\"");

               

              You should either:

              1. Change that SOAPAction to "http://www.webserviceX.NET/GetQuote" instead of empty quotes, as mapped in the log, or
              2. Change your namespace of xmlns:web="http://www.webservicex.net/" to xmlns:web="http://www.webserviceX.NET/", again as mapped in the log.

               

              Best regards,

              David