When proxying a web service it is often necessary to consider the security requirements of the HTTP transport of the proxied service; with the SOAPProxy
action there are two alternatives for specifying the basic authentication credentials of that connection:
SOAPProxy
action will specify them directlyThis behavior is controlled through the inclusion of the
clientCredentialsRequired
property on the action. By default this property has the value true
, requiring that all necessary credentials will be provided by the client of the ESB service, however setting this to false
will cause the SOAPProxy
action to ignore any client credentials in favor of those within its HttpClient
properties file.
The following is a sample configuration when using this property:
<action class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy" name="proxy-action"> <property name="wsdl" value="internal://jboss.ws:context=BookServiceSecured,endpoint=BookServiceSecured"/> <property name="file" value="/http.properties"/> <property name="clientCredentialsRequired" value="false"/> </action>
In JBoss Developer Studio expand the esbcontent
folder of Chapter8
. You will see there is another war file named webservice-secured.war
. This is the service that we will use in the next section:
webservice.war
file to "webservice.war.bak".Create a filter, as shown in that section, then continue to complete the details.