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 />

The productTransform.xsl template looks for two different patterns:<br />

● When a tag is encountered, it will change it into a <br />

tag and then decode the original tag’s value. dp:decode() is an extension function that will<br />

perform the base-64 decoding.<br />

● When a tag is encountered, it will use the str:tokenize() function to tokenize the<br />

list of benefits (delimited by semicolons) into a small XML tree.<br />

● An identity transform is found at the end of the template, which will match anything else<br />

that hasn’t explicitly been matched, and copy it to the output document.<br />

Partial Listing of file: productTransform.xsl<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

__9. In the soapUI request window, load the request from c:\labs\requests\soapMsg.xml.<br />

__10. Click the green submit button to POST the message to ProductServiceProxy, then inspect the<br />

response. Notice that the tag was replaced with a tag, and<br />

that its contents are no longer base-64 encoded. Also, the benefits list was properly expanded<br />

into a multi-element group.<br />

__11. If you’ve gotten everything working properly, you can save your configuration by clicking the<br />

Save Config link in the top of the browser window.<br />

Page 48 WebSphere Lab Jam

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

Saved successfully!

Ooh no, something went wrong!