Show/Hide Toolbars

How to set up Purchase Pre-requisites

Request definition

Set up the request definition according the requirements of the provider. Use the variables to insert purchase data when creating the request during a purchase. The available values are listed next to the Post Format box and are also explained in the Specification of SOA service request and response appendix.

Figure 10, Create a Service Provider - step 2 - SOAP Request definition

Figure 10, Create a Service Provider - step 2 - SOAP Request definition

Mandatory fields

Attribute

Explanation

Request Definition

Man.

Path

Path to the SOA service. Possible to use same arguments as in Post Format below

Man.

Web Service Type

Type of web service, REST or SOAP.

Opt.

Http Request Method

POST

PUT

GET

Opt.

Request Content Type

Select content type. If empty, then content type "text/xml; charset=UTF-8" is used for SOAP

Man.

Service Request Type

XML

Opt.

Decimal Separator

Decimal separator to be used in the request.

Opt.

Advanced SOAP format

If checked the whole SOAP format must be specified including envelope, body and if needed headers.

Man.

Post Format

Post format for the request. See Specification of SOA service request and response.

The Post Format shall have a format that match the Service Request Type.

The {nn} variables will be replaced with data from the database when sending the request. The meaning of each variable is explained next to the Post Format box.

Note:
You can add fixed values to the request, either in a separate fields or as fixed values to the variables. See the example where e.g. the tagId is set to 0.
 
Examples are available in Request and Response examples.

SOAP section

Figure 11, Create a Service Provider - step 2 - Request definition - SOAP section

Figure 11, Create a Service Provider - step 2 - Request definition - SOAP section

Attribute

Explanation

Target Namespace

Target namespace when SOAP protocol is used

Method Name

Method name for SOAP request.

SOAP action

SOAP action. If empty, then SOAP action Target Namespace + Method Name is used.

Response definition

The Response definition translates the incoming response to WebOffice variables.

All fields below are described in detail in Specification of SOA service request and response.

Note:
Each attribute in the response will be analysed in WebOffice.
- If the Rate ID is available this will be used and the amount and date attributes will be ignored.
- If the Rate Amount attribute is set but not the Rate ID then this and the Dates will be used to calculate values that a CWT needs to print a ticket and WebOffice needs to store a purchase.
- If both the Rate ID and the Rate Amount are empty an exception will be generated and saved in the Service Statistics page.

 

Available formats

The response can be sent in 3 formats:

Figure 12, Create a Service Provider - step 3 - SOAP Response definition. Select service Response Type

Figure 12, Create a Service Provider - step 3 - SOAP Response definition. Select service Response Type

Note:
Currently Only the XML format is available

After selecting an option, the section will refresh with additional fields

Important:
It's important to map every field that can be mapped

 

XML definition

Example of a Response Definition in XML format

Figure 13, Create a Service Provider - step 3 - SOAP Response definition Example

Figure 13, Create a Service Provider - step 3 - SOAP Response definition Example

All fields are described in detail in Specification of SOA service request and response

To retrieve e.g. the Response Rate ID attribute from the example above, write //*[local-name()='TariffID'] in the field next to it. The string //*[local-name='***'] represents a function that will try to find an XML element with the name *** in the response.

You must use single quotation marks around the field.

Fields that are available in the response but are not mapped to any of the fields available in the definition are ignored. even if the field name exists. E.g., if the response contains a field that matches the field "Response Rate Amount Attribute" in the example above it will be ignored as it is not mapped.

Important:
The exact names in the response depend on the service provider

See also the Request and Response examples