Skip to main content
Version: 2.18.x.x LTS

SoapDataSource

The SoapDataSource is used to send an XML document as a SOAP message to some web service. When the answer is received, an iterator XPath expression is used to define the elements in the body of the message over which the SoapDataSource loops. For each of these elements multiple XPath expressions are evaluated to extract the data fields.

Configuration

NameType, usage constraints, defaultsDescription
servicerequired: paraVal
default: none
type: SoapConnectionPool
Defines the web service to use.
bodyoptional: paraList
default: none
type: list of strings
Defines the body of the SOAP request which is sent to the web service. The strings of the list are concatenated and parsed into an XML document which is appended to the SOAP message's body.
soapActionoptional: paraVal
default: unused
type: string
Specifies the value of the SOAPAction header.
iteratoroptional: paraVal
default: //return
type: xpath
Defines the nodes in the SOAP body over which the SoapDataSource iterates. The current node in the XPath expression is the SOAP message's body.The default value //return can be used for JAX-WS services which name their return element return.
datarequired: paraMap
default: none
type: string/xpath
Defines the event's data fields using XPath queries. The current node in the XPath queries is the node the iterator expression points to.
xpathNamespacesoptional: paraMap
default: none
type: string/string (uri)
Register namespace prefixes to the specified URIs. Those prefixes are used to parse the XPath expressions. The URIs specified have to match the URIs in the XML document.

Example

<dataSource type="SoapDataSource">
<dp:paraVal name="service" value="${inst.soapService}" />
<dp:paraVal name="soapAction" value="queryPerson" />
<dp:paraList name="body">
<value><![CDATA[
<msgns:queryPerson xmlns:msgns="http://www.adnovum.ch/nevisdp/testWs">
<person>
<email>*@adnovum.ch</email>
</person>
</msgns:queryPerson>]]>
</value>
</dp:paraList>
<dp:paraVal name="iterator" value="//return" />
<dp:paraMap name="data">
<value name="id" value="./id/text()" />
<value name="firstname" value="./firstName/text()" />
<value name="lastname" value="./lastName/text()" />
<value name="email" value="./email/text()" />
</dp:paraMap>
</dataSource>

With namespaces for XPath expressions

<dataSource type="SoapDataSource">
<dp:paraVal name="service" value="${inst.soapService}" />
<dp:paraVal name="soapAction" value="queryPerson" />
<dp:paraList name="body">
<value><![CDATA[
<msgns:queryPerson xmlns:msgns="http://www.adnovum.ch/nevisdp/test" />
]]>
</value>
</dp:paraList>
<dp:paraMap name="xpathNamespaces">
<value name="ns" value="http://some/uri/to/something" />
</dp:paraMap>
<dp:paraVal name="iterator" value="//ns:loginId" />
<dp:paraMap name="data">
<value name="id" value="./text()" />
</dp:paraMap>
</dataSource>