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

    problem with the soapClient by a http listener

    jhaz1

      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:

      runtest:
       [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);
       remotingClient.connect();
      
       // 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) {
       remotingClient.disconnect();
       }
       }
      


      JBoss-esb configuration:
      <service category="TestService" name="test_Webservice_test"
       description="Webservice test">
       <listeners>
       <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"/>
       </listeners>
       <actions>
       <action name="soapui-client-test"
       class="org.jboss.soa.esb.actions.soap.SOAPClient">
       <property name="wsdl"value="http://www.test.com/test.wsdl" />
       <property name="responseAsOgnlMap" value="true" />
       <property name="SOAPAction" value="doSearch"/>
       </action>
       </actions>
       </service>
      </code>