Ariba Supplier OnRamp 7.1 | webMethods Ariba Supplier OnRamp Documentation | webMethods Ariba Supplier OnRamp Installation and User’s Documentation | Implementing a Punchout Ordering System without Trading Networks | Creating OrderRequest Handlers | Implementing OrderRequest Handler Services
 
Implementing OrderRequest Handler Services
Once the OrderRequest handler service is created, you must implement its functionality.
*To define an OrderRequest handler service
1. If the supplier requires the buyer to be authenticated, ensure that the SharedSecret validation option is enabled in cXML. For more information, see .
2. If the supplier requires the buyer to be authenticated using Digital Signature, ensure that the Digital Signature, Signature Type, and Signature Encoding options are enabled in cXML. For more information, see Configuring Digital Signature Validation.
3. Get the buyer information from the cXML message header and verify that the sender is a valid buyer. To do this, perform the following steps:
a. Use the helper service wm.b2b.cxml.utils.Protocol:getFrom to obtain the From and Sender fields from the cXML message header, or obtain those fields by manually mapping them from the cXML message.
b. The credentials are represented as record list elements in the from and sender fields. Use the helper service wm.b2b.cxml.utils.protocol:getCredential to extract the credential record with the desired type by mapping the Credential record list field in the from record returned by getFrom to the Credentials record list input field for the getCredential service.
Note:
In cXML 1.2.011, one or more credentials may be sent in a cXML request to represent the buyer. A buyer may belong to a particular Ariba Marketplace and have an additional credential for that marketplace. The credential would have a type set to marketplace. When a buyer is represented by multiple credentials, you typically use the credential without the type field set to determine who the buyer is. For a detailed discussion of credentials, see the cXML User's Guide Version 1.2.
c. Get the sender's identity and domain and make sure it is a valid buyer. You may have a resource file which contains a list of buyers to look up.
4. Write Java code or flow code to map the OrderRequest to the ordering system's format and submit the order to the order system.
This is implementation dependent. If you encounter a problem while processing the OrderRequest, set the serviceError output record with a meaningful message using the reporting utility of Ariba Supplier OnRamp error and exit from the OrderRequest handler successfully. Do not terminate by throwing exceptions or by Exiting with failure.
5. Check if the attachmentWrapperCollection object to see if it is present. If so, extract the attachment documents and process them accordingly, using the attachmentWrapper API. For more information, see Using the Attachment Utility.
This is implementation dependent. If you encounter a problem while processing the OrderRequest, set the serviceError output record with a meaningful message using the error reporting utility of Ariba Supplier OnRamp and exit from the OrderRequest handler successfully. Do not terminate by throwing exceptions or by Exiting with failure.
6. Clear the shopping cart and remove the buyer session.