Let us now proxy the secured web service using SOAPProxy
passing in the authentication credentials from a properties file:
esbcontent/META-INF/jboss-esb.xml
file in Source mode.<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>
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 "/> <property name="file" value="/http.properties"/> <property name="clientCredentialsRequired" value="false"/> </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 shown:
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>].