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 MasterAgreementRequest Handlers | Implementing MasterAgreementRequest Handler Services
 
Implementing MasterAgreementRequest Handler Services
Once the MasterAgreementRequest handler service is created, you must implement its functionality.
*To define a MasterAgreementRequest 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, .
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 MasterAgreementRequest to the format of the MasterAgreement system and submit the MasterAgreement to the MasterAgreement system. This is implementation dependent. If you encounter a problem while processing the MasterAgreementRequest, set the serviceError output record with a meaningful message using the reporting utility of Ariba Supplier OnRamp error and exit from the MasterAgreementRequest handler successfully. Do not terminate by throwing exceptions or by Exiting with failure.
5. Clear the shopping cart and remove the buyer session.