0 Replies Latest reply on Jan 3, 2008 8:27 AM by Joris Hazenberg

    problem with the soapClient by a http listener

    Joris Hazenberg Newbie

      I have the following problem:
      I have a esb that calls with the org.jboss.soa.esb.actions.soap.SOAPClient a webservice. When I call this service by putting a message on the listener queue, everything goes well. But when I call this service by a http protocol the it goes wrong. I get the following message:

       [echo] Send ESB message that triggers webservice call
       [java] Calling JBoss Remoting Listener using locator URI: http://localhost:8666
       [java] Exception in thread "main" java.lang.RuntimeException: Throwable occurred.
       [java] at org.jboss.soa.esb.poc.webservice_address1.test.SendEsbMessage.main(SendEsbMessage.java:104)
       [java] Caused by: java.lang.NullPointerException
       [java] at org.jboss.soa.esb.poc.webservice_address1.test.SendEsbMessage.sendMessageToJBRListener(SendEsbMessage.java:72)
       [java] at org.jboss.soa.esb.poc.webservice_address1.test.SendEsbMessage.main(SendEsbMessage.java:101)

      The reason of the null pointer exception is that remotingClient.invoke(message) returns null (see test code below). I can't get this right, please help.

      test code:
      Client remotingClient = null;
       try {
       remotingClient = new Client(locator);
       // Deliver the message to the listener...
       Object response = remotingClient.invoke(message);
       System.out.println("JBR Class: " + response.getClass().getName());
       System.out.println("Response from JBoss Remoting Listener '"
       + locatorURI + "' was '" + response + "'.");
       } finally {
       if (remotingClient != null) {

      JBoss-esb configuration:
      <service category="TestService" name="test_Webservice_test"
       description="Webservice test">
       <jms-listener name="JMS-Gateway" busidref="testHttpChannelQueue" is-gateway="true" maxThreads="1" />
       <jbr-listener name="Http-Gateway" busidref="Http-3" is-gateway="true" maxThreads="1"/>
       <jms-listener name="JMS-ESBListener" busidref="testEsbChannelQueue" maxThreads="1"/>
       <action name="soapui-client-test"
       <property name="wsdl"value="http://www.test.com/test.wsdl" />
       <property name="responseAsOgnlMap" value="true" />
       <property name="SOAPAction" value="doSearch"/>