13.9.5. SOAPClient


The SOAPClient action uses the Wise Client Service to generate a JAXWS client class and call the target service.
<action name="soap-wise-client-action" class="org.jboss.soa.esb.actions.soap.wise.SOAPClient">
    <property name="wsdl" value="http://host:8080/OrderManagement?wsdl"/>
    <property name="SOAPAction" value="http://host/OrderMgmt/SalesOrder"/>
    <property name="wise-config">
        <wise-property name="wise.tmpDir" value="/tmp" />
        <wise-property name="wise.jaxb.bindings" value="some.xjb,additional.xml" />
    </property>
</action>
Table 13.30. SOAPClient Optional Properties
Property Description
wsdl
The WSDL to be used.
operationName
The name of the operation as specified in the webservice WSDL.
SOAPAction
The endpoint operation, now superseded by operationName.
EndPointName
The endpoint invoked. Webservices can have multiple endpoints. If it's not specified, the first name in wsdl will be used.
SmooksRequestMapper
Specifies a Smooks config file to define the Java-to-Java mapping defined for the request.
SmooksResponseMapper
Specifies a Smooks config file to define the Java-to-Java mapping defined for the response.
serviceName
A symbolic service name used by Wise to cache object generation and/or use already generated object. If it isn't provided, Wise uses the servlet name of wsdl.
username
Username used if the webservice is protected by BASIC Authentication HTTP.
password
Password used if the webservice is protected by BASIC Authentication HTTP.
smooks-handler-config
It's often necessary to be able to transform the SOAP request or response, especially in header. This may be to simply add some standard SOAP handlers. Wise supports JAXWS SOAP Handler, both custom or a predefined one based on Smooks.
Transformation of the SOAP request (before sending) is supported by configuring the SOAPClient action with a Smooks transformation configuration property.
custom-handlers
It's also possible to provide a set of custom standard JAXWS SOAP Handler. The parameter accept a list of classes implementing SoapHandler interface. Classes have to provide a fully qualified name and be separated by semi-columns.
LoggingMessages
It's useful for debugging purposes to view the SOAP messages sent and the response received. Wise achieves this goal using a JAX-WS handler which prints all messages exchanged on System.out. Boolean value.
wise-config
A list of wise-property elements that can be used to configure Wise client. The wise-property element consists of name and value attributes. A special ESB property wise.jaxb.bindings can be used to specify JAXB customizations. It accepts a comma -eparated list of resource names included in the ESB archive.

Important

If there is a SOAP fault and HTTP 500 error in the web service being called, the JBoss Enterprise SOA Platform's SOAP user interface client will do the following:
  1. Print "WARN [SOAPClient] Received status code '500' on HTTP SOAP (POST) request to..."
  2. Ignore the fault and just continue to the next action.
A number of quick starts demonstrating how to use this action are available in the JBoss Enterprise SOA Platform's samples/quickstarts directory.
Use the soapUI Client Service to construct and populate a message for the target service. This action then routes that message to that service. See http://www.soapui.org/.
The SOAP operation parameters are supplied in either of these two ways:
  1. As a map instance set on the default body location (Message.getBody().add(Map))
  2. As a map instance set on in a named body location (Message.getBody().add(String, Map)), where the name of that body location is specified as the value of the "get-payload-location" action property.
The parameter Map itself can also be populated in one of two ways:
  1. With a set of objects that are accessed (for SOAP message parameters) using the OGNL framework.
  2. With a set of String based key-value pairs(<String, Object>), where the key is an OGNL expression identifying the SOAP parameter to be populated with the key's value.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.