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 SOA specifications Purchase Pre-Requisites appendix.
Mandatory field |
Attribute |
Explanation |
---|---|---|
Request Definition |
||
Man. |
Path |
Path to the SOA service. |
Man. |
Web Service Type |
Type of web service, REST or SOAP. |
Opt. |
Http Request Method |
•POST •PUT •GET |
Opt. |
Request Content Type |
Set the content type. If left empty, then the content type “application/x-www-form-urlencoded” is used for REST. NOTE: When using this field, the value MUST start with a leading space! |
Man. |
Service Request Type |
•JSON •XML |
Opt. |
Decimal Separator |
Decimal separator to be used in the request. |
Man. |
Post Format |
Post format for the request. See SOA specifications Purchase Pre-Requisites. |
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: It is possible to add fixed values to the request, either in a separate fields or as fixed values to the variables. See the Request and Response examples where e.g. the parking zone is set to Intertraffic-Amsterdam. |
Response definition
The Response definition translates the incoming response to WebOffice variables.
All fields below are described in detail in SOA specifications Purchase Pre-Requisites.
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 - REST Response definition. Select service Response Type
•After selecting an option, the section will refresh with additional fields
XML definition
Example of a Response Definition in XML format
Figure 13, Create a Service Provider - step 3 - REST Response definition XML Example
JSON definition
Example of a Response Definition in JSON format
All fields are described in detail in SOA specifications Purchase Pre-Requisites
To retrieve e.g. the Response Rate ID attribute from the example above, write //*[local-name()='RateID'] 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
HTTP Status Code
Example of a Response Definition in HTTP format
This definition template is currently not in use.