23.02.2013 Views

TEC Workbook - IBM

TEC Workbook - IBM

TEC Workbook - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>IBM</strong> Software<br />

3.2.11 DataPower Contexts<br />

While configuring the various actions (sign, transform, etc.), you may have noticed that each action<br />

declares an input and an output context. In the case of a transform action, the input context will be the<br />

document that is fed to the transformer, and the results of the transformation will be written to the output<br />

context.<br />

Some actions may only have an input context. For example, the verify action has an input context, but no<br />

output context; the signature verification either passes or fails. In contrast, some actions may only have<br />

an output context. The fetch action can fetch an XML document from a local file or a remote server, and<br />

the fetched document becomes the output context. Contexts are referred to by the following names:<br />

● INPUT – represents the original message as it arrived from the client.<br />

● OUTPUT – represents the outbound message which will be forwarded to the destination. In<br />

the case of client-to-server processing, the OUTPUT context represents what will be sent<br />

to the backend server. In the case of server-to-client processing, the OUTPUT context<br />

represents what will be returned to the client.<br />

● NULL – indicates that the output is not needed. In other words, the output from the action<br />

is sent to the bit bucket.<br />

● PIPE – indicates that the output of the action should be piped into the input of the next<br />

action. In this case, the input context of the next action must also specify PIPE.<br />

● Named context – in this case, you can assign a name to a context and use it at a later<br />

point in the processing rule. For example, a transform action can be configured with an<br />

input context of INPUT and an output context of newRequest. Later in the processing<br />

rule, another action can use newRequest as the input context.<br />

__1. Click on the magnifying glass in front of the transform action.<br />

The XML document shown in the window shows what will be fed into the transform action as the context<br />

document. In this case, the message with the digital signature will be the input context to the<br />

transformation.<br />

__2. Click on the magnifying glass after the transform action (in front of the sign action).<br />

The input to the schema validate action is the results of the prior transform action. In the content section,<br />

notice that the digital signature has been removed.<br />

Page 62 WebSphere Lab Jam

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!