Skip to main content

Soap Information

Header Attributes Usage

Note

The npm package can be used to create SOAP requests. For more detailed information, click Soap Npm Package

For Soap requests, a usage can be made as in the figure below.

  • You can add the following field to the request:

  • The namespace specified in the overrideRootElement is added to root tags as a prefix.

  • With the $attributes specified with attributesKey, the desired attributes are given in the header.

image

Example:

  • In Security, attributes can be added with $attributes as follows.

  • The written wsse namespace information is also added to the first level elements.

image

Http Headers

Bearer Token Usage

PackageVersion
symphony@stechquick/symphony@0.3.4
symphony-cli@stechquick/symphony-cli@0.5.30
  • In SOAP usages, when it is necessary to use httpHeaders within requests, the following usage can be applied.
  • An example, In the SOAP request, the httpHeaders parameter is added as an Authorization key-value pair.
               httpHeaders: { 
"Authorization": "eyJhbGciOU5ENVNpZGNvIn0"
}

image

  • It can also be used by retrieving it from the incoming request in the following way.

image

Ltpa Token Usage

  • The following code structure can be used to obtain the Ltpa Token.
  • The LTPA token can be obtained by adding the "$value" parameter. Example usage is provided below.

image

  • The example code block, demonstrating the usage of Security, Consumer Context, and Ltpa Token within the Soap Header, is as follows:
        let soapHeader = {
"wsse:Security": {
attributes: {
"soapenv:mustUnderstand": "0",
"xmlns:soapenc": "http://schemas.xmlsoap.org/soap/encoding/",
"xmlns:wsse": "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
"xmlns:xsd": "http://www.w3.org/2001/XMLSchema",
"xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance"
},
"wsse:BinarySecurityToken": {
attributes: {
"wsu:Id": "SecurityToken-2a7b3896-4586-4eda-b836-1c6b3fcc032e",
"EncodingType": "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary",
"ValueType": "wsst:LTPA",
"xmlns:wsu": "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd",
"xmlns:wsst": "http://www.ibm.com/websphere/appserver/tokentype/5.0.2"
},
"$value": Array.isArray(sym.request.headers.ltpatoken)
? sym.request.headers.ltpatoken[0]
: sym.request.headers.ltpatoken
}
},
"p:consumerContext": {
attributes: {
"xsi:type": "p:BranchContextType",
"xmlns:xsi": "http://www.w3.org/2001/XMLSchema-instance",
"xmlns:p": "http://isbank.com/Technical/EA/Header/Schema/V1"
},
"lang": "tr",
"consumerCode": "NAR.BKTUIALA",
"channelCode": "branch",
"ipAddress": sym.request.body.ipAddress,
"workstationName": sym.request.body.workstationName,
"organizationUnitCode": sym.request.body.organizationUnitCode
}
};

Array Usage

PackageVersion
symphony@stechquick/symphony@0.3.3
symphony-cli@stechquick/symphony-cli@0.5.30
  • The example usage for an array within SOAP requests is provided below. Let the request be as follows
    {
"customerNumber": ["163288722","163141033"],
"includeAccounts":true
}

  • In Symphony, the following usage can be applied for this request.
  let soapBody = {
"tns:customerNumber": sym.request.body.customerNumber,
"tns:includeAccounts": sym.request.body.includeAccounts,
};