SOAP Exchange Rates API with Web Services 2.0
This topic discusses Web Services 2.0. For information on Web Services 1.0, see
Web Services 1.0.
Overview
Exchange rates are applied to currency attributes in both Configuration and Commerce based on the user’s currency preference (or session / transaction currency preference).
You can generate a skeleton input for each operation in the Exchange Rates WSDL, which contains the following operations:
- modifyExchangeRate
- deleteExchangeRate
- getExchangeRate
For each operation, the following fields are always required in the header:
-
UsernameToken
- category: Security
- schemaLocation
For all SOAP APIs, the Failure Response Variables are exceptionCode
and exceptionMessage
.
modifyExchangeRate |
Allows the user the ability to modify the conversion rate and uplift rate from the base currency to any other supported currency. |
- category
- schemaLocation
- sourceCurrencyCode
- targetCurrencyCode
- conversionRate
Note: The conversionRate is limited to 4 decimal points.
|
status
|
deleteExchangeRate |
Allows the user to delete a conversion rate and/or uplift rate for the specified currency. For example, if its no longer supported. |
- category
- schemaLocation
- targetCurrencyCode
|
status
|
getExchangeRate |
Allows the user to get the value of the conversion rate and uplift rate for the specified currency. This user can then determine if it needs to be updated. |
- category
- schemaLocation
- sourceCurrencyCode
- targetCurrencyCode
|
status
|
Administration
- Click Admin to go to the Admin Home Page.
-
Click Web Services in the Integration Platform section.
The Web Services Test page opens.
- Confirm that the Web Service Version is 2.0.
- Click the Exchange Rates tab.
- Select an API from the drop-down.
-
Click Generate Input to retrieve the skeleton.
For more information on the body of the Exchange Rates Web Service, and for code examples, see the topic SOAP Exchange Rates API with Web Services 1.0. With the exception of the header, the Web Services 1.0 code examples are valid in Web Services 2.0.
For each API, the body of the SOAP XML is the same as it was for Web Services 1.0. This is the information contained between the <soapenv:Body> and </soapenv:Body> tags.
The header, contained between the <soapenv:Header> and </soapenv:Header> header, has changed with Web Services 2.0.
No change |
<soapenv:Header> |
<soapenv:Header> |
New tags |
|
<wsse:Security xmlns:wsse= "http://docs.oasis-open.org/wss/2004/ 01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
|
New user information replaces sessionId |
<bm:userInfo . . . >
<bm:sessionId>
. . . . . </bm:sessionId>
</bm:userInfo>
|
<wsse:UsernameToken wsu:Id="UsernameToken-2">
<wsse:Username/><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"/>
</wsse:UsernameToken>
|
This is now in the URL, with the unique end point specified. |
<bm:category xmlns:bm="urn:soap.bigmachines.com"> Commerce </bm:category> |
Now reflected in the SOAP Server URL field. |
No longer needed |
<bm:xsdInfo
. . . . .
</bm:xsdInfo>
|
|
Ending the new authentication |
|
</wsse:Security>
|
No change |
</soapenv:Header> |
</soapenv:Header> |
Related Topics
See Also