What is the use of the APIAccessRequestHeader with Connect Web Services for SOAP version 1.4?
Environment
Oracle Cloud Service - all releases
Connect Web Services for SOAP - version 1.4
Resolution
The APIAccessRequestHeader is an optional header meant to be used when launching multiple, consecutive requests.
With the new Connect Web Services for SOAP version, all responses will return a custom header "APIResponseHeader", shown as follows:
<soapenv:Header>
<n0:APIAccessResponseHeader xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:n0='urn:messages.ws.rightnow.com/v1_4'>
<n0:Token>EYJHBGCIOIJIUZI1NIJTRHNDETYMVKZS0WYJM0M2Z</n0:Token>
<n0:NextRequestAfter>0</n0:NextRequestAfter>
</n0:APIAccessResponseHeader>
</soapenv:Header>
The Token identifies the current or existing connection to optimize QoS connection among other competing connections and needs to be provided in the subsequent API request.
The NextRequestAfter indicates the time (in milliseconds) that should elapse before you make the next request.
Similarly, there is a custom header introduced in the request: "APIAccessRequestHeader" that will hold the token element.
<n0: APIAccessRequestHeader>
<no:Token>EYJHBGCIOIJIUZI1NIJTRHNDETYMVKZS0WYJM0M2Z</n0:Token>
</n0: APIAccessRequestHeader>
This is an optional custom header, but omitting it may lead to degraded performance and errors, even if it seems to test well without it.
As mentioned above, the token value received in the response header should be passed in the subsequent request header.
The token value should not be tampered with, as any change in the token value will result in an error.
Launching the associated WSDL in a browser will provide sample code for the use of this header.