PALATINELABSDocsENES

Pages

↑↓ to moveEnter to openEsc to close

SOAP package guide

Send SOAP requests and read complete or selected XML responses.

Version 2.16.2. Installed versions can differ. Examples are illustrative and not tested.

Jump to actions

Packages

Prerequisites

Install the package on the Run Device with a compatible Mercury; no desktop application is needed. Get the address, SOAP version, operation, namespace, action and parameter names from the service contract. WSDL only finds the address; it builds no client and reads no operations or parameters. Nested or custom data needs a raw envelope.

Prepare Dictionary variables of Strings for Operation parameters, Custom headers and Substitutions; JSON text in a String is not a Dictionary.

Only HTTP and HTTPS work. Local and private addresses are blocked: for your own network, turn on allowInternalNetwork. Redirects are refused, also for WSDL. Basic sign-in goes only with the SOAP request, never the WSDL. Use HTTPS; the HTTP exception is under allowInsecureConnection.

Relative paths start in the Run working folder; the account needs access to the WSDL, certificate and output files. WSDL files over 64 MB are refused, and WSDL or selected response XML over 16,777,216 characters fails. A DTD in parsed WSDL or a selected response fails; external XML is not loaded. The whole response comes back as text and is not checked as XML. Save as XML writes the whole body, also for an HTTP fault, and replaces an existing file: use a test file for the example.

Two settings use the same two choices with different meanings:

SettingcompleteResponseselectedResponse
Parameter detailsBuild the request from Operation and Operation parameters.Send your own XML envelope.
Response scopeReturn the whole reply.Return what the XPath expression selects.

All fields stay visible in both modes. Clear the fields of the mode you do not use.

Actions

SOAP Web Service (soapCommand)

Send a known SOAP operation and return the whole reply or a selected part.

Inputs

Only Operation is required in the editor.

Where to send

InputEditor fieldType; defaultUse
wsdlUriOptionConnect to WSDL byWsdlSourcedefault uriuri⁠: WSDL URI and the uri address; file⁠: WSDL file and the uriFile address. The WSDL is read only when that address is blank.
wsdlUriWSDL URIStringdefault ""WSDL URL, such as https://api.example.com/calc?wsdl⁠, in uri mode without Address location.
uriAddress locationStringdefault ""SOAP address in uri mode; if set, the WSDL is not read.
wsdlFileWSDL fileStringdefault ""Local WSDL in file mode without uriFile⁠, such as samples/calc.wsdl⁠.
uriFileAddress locationStringdefault ""SOAP address in file mode; if set, the WSDL file is not read.
serviceNameServiceStringdefault ""Exact WSDL service name, such as Calculator⁠; blank looks in all services.
portNamePortStringdefault ""Exact WSDL port name, such as CalculatorSoap (a name, not a network port number); blank uses the first usable address. Fails if the port has no usable address.
allowInternalNetworkAllow loopback, link-local, and private network destinationsBooleandefault falseFalse blocks request and WSDL addresses that are loopback, link-local or private; true allows them. Redirects stay refused.

Request

InputEditor fieldType; defaultUse
soapVersionSOAP versionSoapVersiondefault Soap11Soap11⁠: SOAP 1.1 with the SOAPAction header. Soap12⁠: SOAP 1.2 with the action in the content type, if set.
operationOperationStringdefault ""Built request: XML operation name, such as Add⁠. Required in the editor; raw mode sends its envelope instead.
radioValueParameter detailsRequestModedefault completeResponseRequest mode; see Prerequisites.
requestParametersOperation parametersDictionarydefault {}Built request: Dictionary of Strings, such as $parameters$⁠. Keys become flat child elements; values are XML-escaped. Nested XML needs raw mode.
parameterOptionRaw data parametersRawDataSourcedefault textRaw mode: text reads rawData⁠; credential reads the Password of rawDataCV⁠.
rawDataRaw data parametersStringdefault ""Raw text: complete SOAP Envelope and Body, sent as is, without checks.
rawParametersWithCVSubstitutionsDictionarydefault {}Raw mode: Dictionary of String replacements, such as left = 19 for {{left}}⁠. Exact and case-sensitive, without XML escaping.
rawDataCVRaw data credentialCredentialdefault empty CredentialRaw credential: Password holds the complete envelope; Username is ignored. Not sign-in.
wsdlOperationNamespaceNamespaceStringdefault ""Built operation namespace URI. Not read from the WSDL.
wsdlOperationNamespacePrefixPrefixStringdefault nsBuilt request namespace prefix. Blank omits the prefix, but keeps the namespace.
wsdlOperationSoapActionActionStringdefault ""Service action URI. SOAP 1.1 always sends the SOAPAction header, also when blank; SOAP 1.2 sends the action only when set.
wsdlOperationIsXmlDefaultNamespace qualify XML elementsXmlDefaultdefault DefaultBuilt request: Default or True put parameter elements in the operation namespace; False gives them no namespace. The operation element always keeps its namespace.
customHeadersCustom headersDictionarydefault {}Dictionary of String headers, such as $headers$ with X-Trace = sample-42⁠. A content header, such as Content-Type⁠, is set on the body. Not sent when the WSDL is read.
timeoutWait for action to complete(in milliseconds)Numberdefault 60000Milliseconds; 0 or less means no limit. Timeout fails.

Sign-in

InputEditor fieldType; defaultUse
authenticationModeAuthentication modeSoapAuthdefault NoAuthenticationNoAuthentication or Basic⁠. Basic uses the Username of basicUserName and the Password of basicPassword⁠.
basicUserNameUsernameCredentialdefault empty CredentialBasic: Credential Username is the service username (such as sample-reader); Password is ignored.
basicPasswordPasswordCredentialdefault empty CredentialBasic: the Credential Password holds the service password; Username is ignored.

Response

InputEditor fieldType; defaultUse
outputFileLocationSave as XMLStringdefault ""Optional path, such as samples/reply.xml⁠. Saves the whole body before the HTTP status is checked, so also a SOAP fault. Creates missing folders and replaces an existing file.
scopeResponse scopeResponseScopedefault completeResponseResponse mode; see Prerequisites.
xpathExpressionXPath expressionStringdefault ""Selected response: XPath 1.0, such as //*[local-name()="AddResult"]⁠. Only prefixes declared on the root element work; use local-name() for deeper declarations or a default namespace.
xmlOutputSelect XML outputXmlOutputdefault valuesSelected response: values for node text, innerXML for child markup, outerXML for whole nodes. Markup always returns a List, whatever Return content as says.
contentReturnAsReturn content asContentReturnAsdefault StringSelected values: String joins the hits with the delimiter; List returns one String per hit. Ignored for the whole response and for markup.
delimiterDelimited values usingStringdefault NoneSelected values as String: None joins without a separator, Custom uses Custom delimiter; other text is the separator, such as , ⁠.
customDelimiterCustom delimiterStringdefault ""For delimiter=Custom, the exact separator between selected values, such as ~ ⁠.

Certificates

InputEditor fieldType; defaultUse
certificateFileClient certificateStringdefault ""Optional certificate, such as samples/client.cer⁠, used only when Keystore file is blank. For a client private key, use a PKCS#12 keystore.
keystoreFileKeystore fileStringdefault ""PKCS#12 file with the client private key, such as samples/client.pfx⁠; wins over Client certificate. The Run account must be able to use the key.
keystorePasswordKeystore passwordCredentialdefault empty CredentialThe Credential Password unlocks the PKCS#12 file; Username is ignored. Empty Password for a file without a password.
allowInsecureConnectionAllow an insecure connectionBooleandefault falseFalse checks server certificates; true accepts any server certificate. Basic sign-in over HTTP works only with this and Allow loopback, link-local, and private network destinations turned on, and only when every address of the host is loopback or private IPv4 (RFC 1918). IPv6 unique-local and link-local addresses do not count; public HTTP with Basic is refused.

Outputs

OutputTypeMeaning
responseAnyA String for the whole response or joined selected values, or a List of Strings for a list or markup selection. Bind to a matching variable or Any.
statusNumberHTTP status of a successful response, for example 200⁠. A status that is not 2xx fails the step; you cannot catch it as an output.

Example

A test calculator at https://api.example.com/calc accepts Add(a,b) and returns AddResult=42 for 19 and 23. Create Dictionary $parameters$ with String a=19, b=23. Set:

Bind response to String $answer$ and status to Number $status$.

For WSDL lookup, clear uri and set wsdlUri=https://api.example.com/calc?wsdl, serviceName=Calculator, portName=CalculatorSoap. For a file, set wsdlUriOption=file, wsdlFile=samples/calc.wsdl, and leave uriFile blank. The WSDL must contain that service and port address.

For your own XML, set radioValue=selectedResponse, parameterOption=text, and put this envelope in rawData. Set rawParametersWithCV=$subs$, a Dictionary with String left=19. The replacement must already be safe XML.

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <ns:Add xmlns:ns="https://example.com/calc">
      <ns:a>{{left}}</ns:a><ns:b>23</ns:b>
    </ns:Add>
  </soap:Body>
</soap:Envelope>

Expected result

$status$ is 200 and $answer$ is 42. With Response scope=completeResponse, response is the whole XML as a String. With selected values and Return content as=List, it is a List of Strings. No XPath hits gives an empty List or an empty String, in the same shape.

The step fails, with no outputs, on an HTTP fault (500 too; Save as XML still keeps the fault body), a WSDL without the address, a DTD in parsed XML, an invalid XPath, a blocked address, a redirect or a network error.

Back to actions