SOAP Parts 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
You can generate a skeleton input for each operation in the Parts WSDL, which contains the following operations:
- addParts
- getParts
- updateParts
- modifyParts
- deleteParts
The updateParts operation modifies existing records. The modifyParts operation modifies existing records and adds a new record if the record doesn't already exist.
For each operation, the following fields are always required in the header:
-
UsernameToken
- category: Security
- schemaLocation
You can add, update, delete, or get parts based on the SOAP interfaces provided. In XML Integration, use this with the parts database to keep data in sync.
For all SOAP APIs, the Failure Response Variables are exceptionCode
and exceptionMessage
.
For all SOAP APIs, the Failure Response Variables are exceptionCode
and exceptionMessage
.
addParts |
Adds a part. It expects input of all the part details and returns the status whether the part was successfully added or not. |
- category
- schemaLocation
- part_number
|
status
|
getParts |
Returns the part details of parts which are searched, based on the given criteria (one or multiple). |
- category
- schemaLocation
- field
- value
- comparator
|
status
parts
|
updateParts |
Updates the details of the specified part number. The return specifies whether the operation was successful. |
- category
- schemaLocation
- part_number
|
status
|
modifyParts
|
The "modifyParts" action will insert or update a part based on the part number. The "modifyParts" action will add a new part if the specified part number does not exist in the Oracle CPQ parts data. When the specified part number exists, the existing part is modified.
|
- category
- schemaLocation
- part_number
|
status
|
Update Example
<bm:modifyParts xmlns:bm="urn:soap.bigmachines.com">
<bm:Parts>
<bm:each_record>
<bm:part_number>part186342</bm:part_number>
<bm:direct_buy>1</bm:direct_buy>
<bm:part_display_number>Part Display 1</bm:part_display_number>
<bm:price>
<bm:USD>10</bm:USD>
</bm:price>
</bm:each_record>
</bm:Parts>
</bm:modifyParts>
|
|
Insert Example
<urn:modify>
<bm:Parts>
<bm:each_record>
<bm:part_number>newpart</bm:part_number>
<bm:direct_buy>1</bm:direct_buy>
<bm:part_display_number>Part Display 1</bm:part_display_number>
<bm:price>
<bm:USD>1</bm:USD>
</bm:price>
</bm:each_record>
</bm:Parts>
</bm:modifyParts>
|
|
deleteParts |
Deletes a specific part. The part(s) deletes are based on one or more specified criteria. |
- category
- schemaLocation
- field
- value
- comparator
|
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 Parts tab.
- Select an API from the drop-down.
- Enter a Part Number.
-
Click Generate Input to retrieve the skeleton.
For more information on the body of the Parts Web Service, and for code examples, see the topic SOAP Parts 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