JBoss SOAPProcessor getMessage Error
vishal.khapre Jun 30, 2008 4:25 PMHi
I am trying to invoke a JBossESB service exposed via web services/JbrProvider. The message object returned by SOAPProcessor.getMessage() is null. (See the output as null).
I am not sure what I am doing wrong here. I can see the input parameters to WebMethod are coming in right (See the output as 1001)..
Can somebody please help?
jboss-esb.xml
<jbossesb xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.0.1.xsd" parameterReloadSecs="5"> <providers> <jms-provider name="JBossMQ" connection-factory="ConnectionFactory" jndi-context-factory="org.jnp.interfaces.NamingContextFactory" jndi-URL="localhost"> <jms-bus busid="ESITestESBChannel"> <jms-message-filter dest-type="QUEUE" dest-name="queue/B" /> </jms-bus> </jms-provider> <jbr-provider name="JBR-Http" protocol="http" host="localhost"> <jbr-bus busid="Http1" port="8765" /> </jbr-provider> </providers> <services> <service category="EchoESB" name="EchoHTTP" description="Echo Test" > <listeners> <jbr-listener name="Http-Gateway" busidref="Http1" is-gateway="true" maxThreads="1"/> <jms-listener name="JMS-ESBListener" busidref="ESITestESBChannel" maxThreads="1" /> </listeners> <actions mep="RequestResponse" > <action name="JBossWSAdapter" class="org.jboss.soa.esb.actions.soap.SOAPProcessor"> <property name="jbossws-endpoint" value="TestWSAction"/> </action> </actions> </service> </services> </jbossesb>
web.xml
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"> <servlet> <servlet-name>TestWSAction</servlet-name> <servlet-class>ncc.esi.esb.TestWSAction</servlet-class> </servlet> <servlet-mapping> <servlet-name>TestWSAction</servlet-name> <url-pattern>/TestWSAction</url-pattern> </servlet-mapping> <login-config> <auth-method>BASIC</auth-method> </login-config> </web-app>
TestWSAction
@WebService(name = "TestWSAction", targetNamespace = "http://webservice_producer/TestWSAction") // @SOAPBinding(style = SOAPBinding.Style.RPC) public class TestWSAction extends AbstractActionLifecycle { @WebMethod public String TestAction(@WebParam(name = "message")String message) { try { System.out.println(SOAPProcessor.JBOSSWS_ENDPOINT); Message esbMessage = SOAPProcessor.getMessage(); System.out.println("ESB MESSAGE:" + esbMessage); System.out.println("ESB WS :" + message); } catch (Exception e) { e.printStackTrace(); System.out.println(e); } return message; } }
Output
16:20:06,563 INFO [STDOUT] jbossws-endpoint 16:20:06,563 INFO [STDOUT] ESB MESSAGE:null 16:20:06,563 INFO [STDOUT] ESB WS :1001