Handling the Server Side of a B2B XML Multiple Status Query

LANSA

Handling the Server Side of a B2B XML Multiple Status Query
Example 217 - Rating: advanced
The Things that Make Up this ExampleTo Execute this Example

In example 215 Handling the Client Side of a B2B XML Multiple Status Query the client side of an XML based order status query is demonstrated by using the standard www.lansa.com server to handle the server side of the transaction.



This example demonstrates how the server side of this query might be implemented.

It does this by reusing the example 215 client side of the transaction, but in such a way that it switches to execute function SET217S to handle the server side of the transaction (circled in red)::



The main SET component in this example is function SET217S. SET217S handles the processing of a new order.





Detailed Notes and Suggestions

The major part of this example is the interaction between function SET217S and the JSM. There are 4 major interactions between function SET217S and the JSM:
Step 1SET217S asks the JSM to load the HTTPCLIENT service.
Step 2SET217S asks the JSM to read the incoming order details (in XML format) and transform them into an RDML working list.
Step 3SET217S asks the JSM to write a XML formatted order status details back to the requester.
Step 4SET217S asks the JSM to unload the HTTPCLIENT service

At execution time functions SET215G and/or SET215W from example 215 are reused so that order status checks can be input via a green screen or via a web form. This is very simple to do. Instead of sending their order details to www.lansa.com they send them instead to the server where function SET217S is installed:





Steps 2 and 3 are the most interesting because they involve transformations into and out of XML.



In this step function SET217S assembles and executes a JSM command to RECEIVE and transform the XML from the Client.

The JSM command used looks like this:

RECEIVE HANDLER(IXML) XSL(set217_orderstatus_request_in) SERVICE_LIST(S_214ORDN)

When executed by the JSM it causes an RDML working list to be transformed into XML:





See the source of function SET217S for exact details of each command keyword and how they are used to control the JSM.



In this step function SET217S assembles and executes a JSM command to SEND and transform the XML from the query server.

The JSM command used looks like this:

SEND HANDLER(IXML) XSL(set217_orderstatus_response_out) SERVICE_LIST(S_214ORDN,S_214STAT,S_214COST,S_214SDAT,S_214IOST,S_214ERRO)

When executed by the JSM it causes the incoming XML to be transformed and the information parsed into the function.





Keywords
Example 217JSM
JSMWeb Service
InternetXML
B2B