Implementing a Punchout Ordering System without Trading Networks
Introduction
This chapter describes how to configure Ariba Supplier OnRamp Adapterto support a punchout site that does not use Trading Networks. Specifically, this chapter describes the following configuration tasks:
- Specifying the cXML document receive service-that is, the service that receives cXML documents from Ariba Buyer.
- Specifying the InvoiceDetailRequest URL - that is, the URL where the InvoiceDetailRequests are sent from the supplier.
- Specifying the following cXML document
handlers:
- OrderRequest
- PunchOutSetupRequest
- ProfileRequest.
- MasterAgreementRequest
- Defining PunchOutOrderMessage mapping.
- Specifying the service for creating and testing PayloadIDs.
- Specifying SharedSecrets.
- Specifying Digital Signatures.
Other configuration tasks that are common to all punchout systems (with or without Trading Networks) are described in other chapters, as follows:
| For information about this task | See... |
|---|---|
| Enabling the storage of OrderRequest messages. | Storing OrderRequest Messages |
| Enabling the logging of events | Enabling Logging |
| Specifying customized services to listen to and process events that occur during various stages of punchout ordering. | Listening to and Processing Punchout Process Events |
Opening the Ariba Supplier OnRamp Adapter Configuration Screen
About this task
You configure Ariba Supplier OnRamp Adapter using the Ariba Supplier OnRamp Adapter Configuration screen, which is accessed from Integration Server Administrator.
To open the Ariba Supplier OnRamp Adapter Configuration screen
Procedure
Configuring cXML Document Receive Service Parameters
About this task
For the defaultProfileRequest handler to correctly include the URL to which supported cXML request transaction should be posted, and to enable the Test Module to function properly, you must configure the receive service parameters.
Using Config, you must specify the host and port to which cXML requests will be posted, as well as the protocol to use.
To set the document receive service parameters
Procedure
Configuring cXML InvoiceDetailRequest Parameters
About this task
For the InvoiceDetailRequest to correctly include the URL to which supported cXML request transaction should be posted, and to enable the Test Module to function properly, you must configure the InvoiceDetailRequest parameters.
Using Config, you must specify the host, port, and service to which cXML InvoiceDetailRequests will be posted, as well as the protocol to use.
To configure the cXML InvoiceDetailRequest parameters
Procedure
| In this field… | Specify… |
|---|---|
| Protocol |
http or https. |
| Hostname | The name of the host. |
| Port | The port number of the host. |
| Service | Remaining part of the URL. |
Creating PunchOutSetupRequest Handlers
A PunchOutSetupRequest handler is a service that you create and implement to set up all of the supplier's resources needed to conduct a punchout buying session. The cXML processing mechanism of Ariba Supplier OnRamp Adapter, built into receiveCXML invokes this handler when buyers send PunchOutSetupRequest messages.
To create and implement a PunchOutSetupRequest handler, you perform the following tasks:
- Create an appropriate service for the handler, using Config.
- Implement the handler's functionality using Ariba Supplier OnRamp Adapter API services.
Creating PunchOutSetupRequest Handler Services
About this task
A PunchOutSetupRequest handler service is invoked with a PunchOutSetupRequest record argument that represents the actual received message. The PunchOutSetupRequest handler is also invoked with an operation argument that represents the PunchOutSetupRequest operation that is being requested (create, inspect, or edit). Depending on the operation being requested, the PunchOutSetupRequest handler must return a catalogURL that represents one of the following:
- For the create operation: a URL to the supplier's catalog, where the buyer can begin shopping for the first time.
- For the inspect operation: a URL to the supplier's catalog, where the buyer can view his or her existing shopping selections.
- For the edit operation: a URL to the
supplier's catalog, where the buyer can edit his or her shopping selections. Note: You may choose not to implement inspect and edit operations. The document receive service receiveCXML reports unimplemented operations to the buyer's Ariba Buyer with an error status in the PunchOutSetupResponse.
The detailed implementation of a PunchOutSetupRequest handler depends on the supplier's systems and resources. Each supplier may have different shopping cart systems, application servers, web servers, and ordering systems. The handler must set up resources for a shopping session and return a URL for a buyer to shop online.
To create a PunchOutSetupRequest handler service, you specify a service name for the handler and the operation for which the handler is used. Ariba Supplier OnRamp Adapter automatically generates a service template for you, with the specification specified in wm.b2b.cxml.guidelines:PunchOutSetupRqstHdlr. In addition,Ariba Supplier OnRamp Adapter registers the service internally so that when receiveCXML receives a PunchOutSetupRequest with the specified operation type, the handler service will be invoked.
To create a PunchOutSetupRequest handler service
Procedure
Implementing PunchOutSetupRequest Handler Services
About this task
Once the PunchOutSetupRequest handler service is created, you must implement its functionality.
To implement a PunchOutSetupRequest handler service
Procedure
Creating OrderRequest Handlers
An OrderRequest handler is a service that you create and implement to receive and process order requests, order updates, and deletions (cancellations). The OrderRequest handler is responsible for mapping the cXML OrderRequest to order requests/ cancellations for the underlying purchasing system. The cXML processing mechanism built into receiveCXML in Ariba Supplier OnRamp Adapter invokes this handler when buyers send OrderRequest messages.
To create and implement an OrderRequest handler, you perform the following tasks:
- Create an appropriate service for the handler, using Config.
- Implement the handler's functionality using the API services of Ariba Supplier OnRamp Adapter.
Creating OrderRequest Handler Services
About this task
An OrderRequest handler is invoked with an OrderRequest record argument that represents
the actual received message. The OrderRequest handler may also have as an input parameter an
attachmentWrapperCollection object, which contains one or more attachment documents that were sent with the
OrderRequest. The OrderRequest handler is also invoked with an operation argument that represents the
OrderRequest operation that is being requested (new,
update, delete).
The OrderRequest must return a status in its serviceError output parameter: If an error was encountered while processing the OrderRequest, the serviceError must be set to indicate the error. If no error was set, the Ariba Supplier OnRamp Adapter core returns a successful OrderResponse. However, the OrderResponse does not indicate an order fulfillment. It only indicates that the OrderRequest was successfully received, and that the request is being processed. This is a limitation of the cXML 1.2 framework, not a limitation of Ariba Supplier OnRamp Adapter.
To create an OrderRequest handler service, you specify a service name for the handler and the operation for which the handler is used. Ariba Supplier OnRamp Adapter automatically generates a service template for you, with the specification specified in wm.b2b.cxml.guidelines:OrderRequestHdlr. In addition, it registers the service internally so that when receiveCXML receives an OrderRequest with the specified operation type, the handler service will be invoked.
To create an OrderRequest handler service
Procedure
Implementing OrderRequest Handler Services
About this task
Once the OrderRequest handler service is created, you must implement its functionality.
To define an OrderRequest handler service
Procedure
Creating MasterAgreementRequest Handlers
About this task
A MasterAgreementRequest handler is a service that you create and implement to receive and process new MasterAgreementRequests, updates, and deletions (cancellations). The MasterAgreementRequest handler is responsible for mapping the cXML Master Agreement to MasterAgreementRequests/cancellations for the underlying system. The cXML processing mechanism of Ariba Supplier OnRamp Adapter, built into the wm.b2b.cxml:receiveCXML service, invokes the handler when buyers send MasterAgreementRequest messages.
This section describes how to configure Ariba Supplier OnRamp Adapter to support the MasterAgreementRequest document types in a supplier's site that does not use Trading Networks.
To create and implement a MasterAgreementRequest handler
Procedure
- Create an appropriate service for the handler, from the Ariba Supplier OnRamp Adapter Configuration screen.
- Implement the handler's functionality using the Ariba Supplier OnRamp Adapter API services.
Creating MasterAgreementRequest Handler Services
About this task
A MasterAgreeementRequest handler is invoked with a Master Agreement record argument
that represents the actual received message. The MasterAgreeementRequest handler is also invoked with an
operation argument that represents the Master Agreement operation that is being requested (new, update,
delete).
The Master Agreement must return a status in its serviceError output parameter. If an error was encountered while processing the MasterAgreeementRequest, the serviceError must be set to indicate the error. If no error was set, Ariba Supplier OnRamp Adapter returns a response with the status code of 200 that indicates that the MasterAgreementRequest was successfully received, and that the request is being processed.
To create a MasterAgreementRequest handler service
Procedure
Implementing MasterAgreementRequest Handler Services
About this task
Once the MasterAgreementRequest handler service is created, you must implement its functionality.
To define a MasterAgreementRequest handler service
Procedure
Setting the Default ProfileRequest Handler
About this task
A ProfileRequest is a document that a buyer sends to a supplier to find out what kind of cXML request transactions that the supplier accepts. Upon receiving a ProfileRequest, the supplier must return a ProfileResponse indicating which cXML transactions he supports.
The Ariba Supplier OnRamp Adapter package includes a default ProfileRequest handler that dynamically queries the Configuration Module for the list of handlers currently registered, and returns a list of transactions current supported. For more information, see pub.ariba.supplier.handlerImpl:defaultProfileRequestHandler.
To set the default ProfileRequest handler
Procedure
Mapping PunchOutOrderMessages
When a buyer has finished shopping at a supplier's web site and performs a checkout, the contents of the shopping cart must be sent back to the Ariba Buyer using a PunchOutOrderMessage. The PunchOutOrderMessage must be encoded and sent to the buyer's web browser according to the following Ariba specifications:
- The PunchOutOrderMessage must be embedded in the checkout page in HTML format, either as a URL encoded input value named cXML-urlencoded or as a base64-encoded input value named cXML-base64.
- The target of the checkout page form must be the punchout URL sent by the buyer's procurement application in the PunchOutSetupRequest.
Ariba Supplier OnRamp Adapter provides a utility on cXML to assist you in mapping the shopping cart data into a PunchOutOrderMessage, encoding the PunchOutOrderMessage and returning a checkout web page. Using this utility, you can define a service that your shopping cart system can invoke to help create the PunchOutOrderMessage.
This utility enables you to:
- Create a mapping service to map shopping cart data to the PunchOutOrderMessage.
- Specify how to format the PunchOutOrderMessage as URL encoded or base64-encoded.
- How to embed an encoded PunchOutOrderMessage into an HTML web page (optional).
The following subsections describe how to use this utility.
Methods of Mapping PunchOutOrderMessages
Before using the mapping utility, you must determine how you want to pass shopping cart data from the shopping cart engine to the flow or Java service, and how that service will return the PunchOutOrderMessage to the shopping cart engine. Choose one of the following methods of doing this:
-
Using the Client API
Using a client API to integrate a catalog system, you can create a record representing the shopping cart. Then, using the client API, you can invoke a PunchOutOrderMessage service that you define using the Configuration Module to map data between the shopping cart record and the PunchOutOrderMessage. The PunchOutOrderMessage will then be available in the pipeline as a string field (PunchOutOrderMessageString) formatted the way you specified. For the procedure to do this, see Passing Shopping Cart Data Using the Client API.
-
Using HTTP Form Posting
Alternatively, you can use HTTP form posting to pass shopping cart data from the shopping cart system to a PunchOutOrderMapping service that you define using the Configuration Module. Using HTTP form posting, your shopping cart creates an XML string containing the shopping cart. The shopping cart system posts the XML string as a name=value form parameter to the PunchOutOrderMapping service. The PunchOutOrderMessage, formatted the way you specified, is returned in the HTTP response body. For the procedure to do this, see Passing Shopping Cart Data Using HTTP Form Posting.
Passing Shopping Cart Data Using the Client API
To pass shopping cart data using the client API, you perform the following tasks:
- Create a PunchOutOrderMessage mapping service that maps the shopping cart to a record that you create to represent the shopping cart.
- Use the generated mapping service for your shopping cart system integration using the client API.
Creating PunchOutOrderMessage Mapping Services
About this task
To create a PunchOutOrderMessage mapping service for use with the client API
Procedure
Using Generated PunchOutOrderMessage Handler Services with the Client API
After you generate a mapping service for your PunchOutOrderMessage handler, you use this service for your shopping cart system integration using the client API.
Using the client API, create a record called ShoppingCart to correspond to the shopping cart record you defined in your PunchOutOrderMessage mapping service. For example, if you defined a simple record representing shopping cart items and totals such as the following:

In your client code you would create a record with this structure and populate its fields.
The generated client API code will invoke the PunchOutOrderMessage mapping service you created. The mapping service will return the PunchOutOrderMessage string in an output variable named PunchOutOrderMessageString. Using the client API, you extract the PunchOutOrderMessage.
Passing in an HTML Template
Using the client API, you can also pass in a string representing an HTML checkout page template that you want the mapping service to embed the PunchOutOrderMessage into. If you pass an HTML template into your mapping service, the mapping service will replace all occurrences of the string "%value PunchOutOrderMessageString" with the encoded PunchOutOrderMessage. You can use this feature to embed a URL encoded or base64 encoded hidden form field in an HTML form.
To use this feature, simply pass in the HTML template as a string input parameter template into the mapping service. The HTML template will be returned in the PunchOutOrderMessageString output parameter.
Passing Shopping Cart Data Using HTTP Form Posting
About this task
To use HTTP form posting to map PunchOutOrderMessages
Procedure
Using Generated Mapping Services with the HTTP Form Post
About this task
Using HTTP form post, a catalog system can use the PunchOutOrderMessage mapping service that you define. To use the mapping service for your shopping cart system integration, using HTTP form post, perform the following steps:
To use a generated mapping service with HTTP form posting
Procedure
Results
Passing in an HTML Template
You can also pass in a string representing an HTML checkout page template that you want the mapping service to embed the PunchOutOrderMessage into.
If you pass in an HTML template into your mapping service, the mapping service will
replace all occurrences of the string "%value
PunchOutOrderMessageString" with the encoded PunchOutOrderMessage. You can use this feature to
embed a URL encoded or a base64-encoded hidden form field in an HTML form.
To use this feature, simply pass in the HTML template as a string input parameter template in your HTML form post. The HTML template will be returned as the HTTP response content.
Correlating OrderRequests with PunchOutOrderMessages
After the buyer sends an OrderRequest to the supplier, and the order in the PunchOutOrderMessage is approved, the OrderRequest has to be correlated to the shopping session. Currently, the PunchOutOrderMessage does not have explicit fields to pass supplier session IDs back to the Ariba Buyer. Consequently, the OrderRequest does not include any supplier session ID. Ariba suggests that this information (sessionIDs) be sent from the supplier to the buyer in the SupplierAuxilaryPartID in ItemOut element(s) in the PunchOutOrderMessage. The ItemOut element(s) must be returned from the buyer to the supplier in the OrderRequest message.
Configuring cXML Message Parameters
Ariba Supplier OnRamp Adapter uses the following fields when it validates incoming requests for proper credentials and when it creates and sends responses:
-
PayloadID
The cXML field PayloadID appears in all cXML messages; it uniquely identifies the cXML message. When Ariba Supplier OnRamp Adapter returns cXML responses, it generates a unique PayloadID for the response messages. To generate a PayloadID, you can use the built-in PayloadID service or you can implement a custom service to generate it for you.
-
SharedSecret
When Ariba SN forwards cXML requests from Ariba Buyers, it inserts a SharedSecret in the request's Header (in the Sender Credential). The SharedSecret is a password that the supplier chooses and configures on Ariba SN. As a supplier, you should verify that all incoming requests contain this SharedSecret. If not, the cXML request should not be processed. Ariba Supplier OnRamp Adapter provides a built-in mechanism for verifying the SharedSecret of all incoming cXML requests. You can optionally disable this feature if you want to perform tests without it. For more information on SharedSecret, see Configuring Shared Secret Validation.
-
DigitalSignature
When Ariba SN forwards cXML requests from Ariba Buyers, it inserts a Digital Signature (optional) in the request (in the Sender Credential). As a supplier, you should verify that all incoming requests contain this Digital Signature. If not, the cXML request should not be processed. Ariba Supplier OnRamp Adapter provides a built-in mechanism for verifying the Digital Signature of all incoming cXML requests. You can optionally disable this feature if you want to perform tests without it. For more information on DigitalSignature, see Configuring Digital Signature Validation.
To perform these tasks, you use cXML. In addition, this enables you to:
- View the version of cXML that you are using.
- View the name of the Document Type Definition (DTD) file that you are using. A DTD file is a text file that describes the syntax and order of cXML documents.
Specifying Services for Generating PayloadIDs
About this task
To generate a PayloadID, you can use the built-in payloadID service or you can implement a custom service to generate it for you.
To specify the PayloadID service
Procedure
- Start Integration Server Administrator.
- In the IBM webMethods Adapter for Ariba Supplier OnRamp menu, select cXML. The cXML Message Fields page appears, showing the cXML version and the DTD file you are using.
- Specify whether to use the default service for generating your payloadID (ns.pub.ariba.supplier.cxml.spec:createPayloadIDSpecin the package WmAribaSupplier) or a custom service that you provide, and click the Update button.
- To view a PayloadID that the service creates, click the Test button. The PayloadID is displayed on the screen.