We will now modify the current example to use SOAPProxy
:
esbcontent/META-INF/jboss-esb.xml
file in Source mode.<action class="org.jboss.soa.esb.actions.soap.SOAPProcessor" name="JBossWSAdapter"> <property name="jbossws-endpoint" value="BookService"/> <property name="jbossws-context" value="BookService"/> </action>
With this code:
<action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" name="proxy-action"> <property name="wsdl" value="internal://jboss.ws:context=BookService,endpoint=BookService"/> </action>
src
folder, expand it till the SendJMSMessage.java
file is displayed in the tree. Now click Run | Run As | Java Application.The server Console will display the output as below:
INFO [STDOUT] AFTER invoking jbossws endpoint: INFO [STDOUT] [<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header></env:Header><env:Body><ns2:getBooksResponse xmlns:ns2="http://chapter8.samples.esb.soa.jboss.org/"><return>Great Expectations</return><return>Hound Of The Baskervilles</return><return>The Da Vinci Code</return><return>The Immortals Of Meluha</return></ns2:getBooksResponse></env:Body></env:Envelope>].
We used SOAPProxy
to invoke the web service. We used a JMS Queue to send a SOAP message.