13.9.18. Using the SOAPProxy Action

A SOAPProxy action is:
  • both a producer and consumer of web services.
  • all that is required is a property pointing to the external wsdl.
  • a way to allow the WSDL to be automatically transformed (via the optional wsdlTransform property.)
  • a way to ensure that SOAP is not tied to HTTP. The WSDL is read, and if an HTTP transport is defined, that will be used.
  • a way to optionally apply HttpRouter properties as overrides if you are using HTTP.
If the WSDL specifies an HTTP transport, then any of the HttpRouter properties can be applied.

Table 13.35. 

Property Description Required
A <smooks-resource-list> xml config file allowing for flexible wsdl transformation.
The character set the original wsdl (and imported resources) is encoded in UTF-8. It will be transformed to UTF-8 if it is a supported encoding by the underlying platform.
Example of an HttpRouter property, useful when domain name matching is important for SSL certs.
Apache Commons HTTPClient properties file, useful when proxying to a web service via SSL.
Whether the Basic Auth credentials are required to come from the end client, or if the credentials specified inside file can be used instead. Default is "true".
The original wsdl url whose WS endpoint will get re-written and exposed as new wsdl from the ESB. Depending upon the <definitions><service><port><soap:address location attribute's protocol (for example "http"), a protocol-specific SOAPProxyTransport implementation is used.
The value can reference a location based on five different schemes:
  • http://
    When you want to pull wsdl from an external web server.
    Example: http://host/foo/HelloWorldWS?wsdl
  • https://
    When you want to pull wsdl from an external web server over SSL.
    Example: https://host/foo/HelloWorldWS?wsdl
  • file://
    When your wsdl is located on disk, accessible by the ESB JVM.
    Example: file:///tmp/HelloWorldWS.wsdl
    Note: Three slashes in the example above. This is so we can specify an absolute versus relative file path.
  • classpath://
    When you want to package your wsdl inside your ESB archive.
    Example: classpath:///META-INF/HelloWorldWS.wsdl
    Note the three slashes in the example above. This is so we can specify an absolute versus relative classloader resource path.
  • internal://
    When the wsdl is being provided by a JBossWS web service inside the same JVM as this ESB deployment.
    Example: internal://jboss.ws:context=foo,endpoint=HelloWorldWS


    This scheme should be used instead of http or https in the usage described above. This is because on server restart, Tomcat may not yet be accepting incoming http/s requests, and thus cannot serve the wsdl.

Example 13.16. Sample Configuration: Basic scenario

<action name="proxy" class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy">
    <property name="wsdl" value="http://host/foo/HelloWorldWS?wsdl"/>

Example 13.17. Sample Configuration: Basic Authentication and SSL

<action name="proxy" class="org.jboss.soa.esb.actions.soap.proxy.SOAPProxy">
    <property name="wsdl" value="https://host/foo/HelloWorldWS?wsdl"/>
    <property name="endpointUrl" value="https://host/foo/HelloWorldWS"/>
    <property name="file" value="/META-INF/httpclient-8443.properties"/>
    <property name="clientCredentialsRequired" value="true"/>