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 PunchOutSetupRequest Handlers | Implementing PunchOutSetupRequest Handler Services
 
Implementing PunchOutSetupRequest Handler Services
Once the PunchOutSetupRequest handler service is created, you must implement its functionality.
*To implement a PunchOutSetupRequest 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 in the WmcXML12 package 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 in the WmcXML12 package 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, 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. Initialize resources of the shopping cart engine for the buyer session.
For the buyer session, initialize any resources that the shopping cart system needs. If the shopping cart system requires a unique ID to identify a buyer session it is initializing, use the server sessionID. If authentication fails, set the serviceError output record with a meaningful message using the error reporting utility in this package, and exit from the PunchOutSetupRequest handler successfully. Do not terminate by throwing exceptions or by Exiting with failure.
5. Get and store the cXML-specific buyer session data.
Use the helper services getBuyerCookie, getFrom, and getPunchOutURL in the wm.b2b.cxml.utils.protocol folder to obtain the BuyerCookie field, the From field, and the PunchOutURL of the cXML message header. These fields are needed to complete the punchout process later. The BuyerCookie and From fields are needed in the PunchOutOrderMessage. The PunchOutURL is the URL of the Ariba Buyer to which the PunchOutOrderMessage is form posted when the buyer checks out.
To store the cXML specific buyer session data, use any of the following methods:
*If your shopping cart system can store buyer session metadata, store the BuyerCookie, the PunchOutURL, and the From field data in the shopping cart system for later retrieval.
*If your shopping cart system cannot store buyer session metadata, you can store the buyer session metadata using the session object of Integration Server. You can use the helper services in wm.b2b.cxml.shared.session to do this. For more information, see Using the Persistence Utility and wm.b2b.cxml.shared.session.
In addition, you can use the persistence utility in the wm.b2b.cxml.utils.persistence.session folder in the WmAribaSupplier package, which is provided with Ariba Supplier OnRamp.
Alternatively, if you want to store the session data in an external data store, you must implement services to create, read, and delete the buyer session metadata into the persistent store. These services should implement the service specifications of saveBuyerSessionDataSpec, getBuyerSessionDataSpec, and removeBuyerSessionDataSpec described in wm.b2b.cxml.utils.persistence.spec. For more information, see Using the Persistence Utility.
*You may pass these fields as GET input fields in all the catalog pages returned to the buyer, or as hidden form fields embedded in all the catalog pages returned to the buyer. However, keep in mind that these fields need to be passed in every catalog page until the buyer checks out.
6. Create the catalog URL for the buyer session and return the URL in the catalogURL output parameter. The format of the catalog URL can be anything meaningful to distinguish buying sessions. Typically, this is a URL with a sessionID GET input field.
Note:
If the URL contains special characters such as space characters, the URL should be HTML encoded before it is returned by the handler service.