As you may know binary or Non-XML data processing requires "DataGlue" license shown for "show license" CLI command.
XS40 as well as new XG45 (without DIM feature) do not have "DataGlue" license and allow for very limited Non-XML processing capabilities.
One Non-XML feature which is present is "" action.
It converts Non-XML CGI-encoded input (an HTTP POST of HTML form or URI parameters) into equivalent XML message.
One Non-XML feature which is present is "" action.
It converts Non-XML CGI-encoded input (an HTTP POST of HTML form or URI parameters) into equivalent XML message.
In last year's 2nd WSTE Webcast on "Non-XML processing in DataPower stylesheets" slides 15+16 dealt with (very limited) "Non-XML data processing on XS40":
http://www-01.ibm.com/support/docview.wss?uid=swg27022979
http://www-01.ibm.com/support/docview.wss?uid=swg27022979
Last week I joined "German DataPower User group" meeting in Frankfurt and gave a talk on "DataPower attachment processing, Soap With Attachments (SWA) and MTOM".
I plan to make a new WSTE webcast on that later this year.
What I wanted to show today is a "sneak preview" on a cool sample application for attachment processing.
What I wanted to show today is a "sneak preview" on a cool sample application for attachment processing.
Until Thursday two weeks ago I would have said "IMPOSSIBLE" -- but it is possible!
In fact you can process arbitrary binary data on DataPower boxes without DataGlue license.
These are the restrictive conditions:
These are the restrictive conditions:
* you do not get "Transform Binary" action
* you cannot do WTX mappings
* you cannot use Contivo FFD dp:input-mapping or dp:output-mapping
* you cannot do WTX mappings
* you cannot use Contivo FFD dp:input-mapping or dp:output-mapping
* you have to pay a performance penalty for the attachment processing overhead compared to a single "Transform Binary" action.
OK, so what is the secret on how to do binary data processing without DataGlue?
It is DataPower attachment processing and the cool features of DataPower Attachment protocol described in Infocenter:
http://publib.boulder.ibm.com/infocenter/wsdatap/4mt/index.jsp?topic=%2Fcom.ibm.dp.xs.doc%2Fxmlfirewalldevelopersguide.xs40121.htm&resultof=%22attachment%22%20%22attach%22%20%22protocol%22
The details will follow in WSTE webcast, but you can already play with this service export (from a 3.8.1.20 box, verified on 4.0.2 box):
The details will follow in WSTE webcast, but you can already play with this service export (from a 3.8.1.20 box, verified on 4.0.2 box):
This is a demonstration of complete sample application "binary-reverse" -- it just reverses any (binary) input data and returns that.
This works on boxes without DataGlue license like XS40, but on other boxes as well.
The 0x00 bytes at begin, in the middle and at the end of sample input file are only present "to make it more difficult" ...
This is sample output from 2nd service in export presented last Monday in Frankfurt.
Here you can see how to convert binary input data to base64 or hexbin encoded representation for "normal"
stylesheet processing, as well as how to return arbitrary binary data from a stylesheet generated base64 string:
This works on boxes without DataGlue license like XS40, but on other boxes as well.
The 0x00 bytes at begin, in the middle and at the end of sample input file are only present "to make it more difficult" ...
$ cat -v 0in0put0 ; echo |
This is sample output from 2nd service in export presented last Monday in Frankfurt.
Here you can see how to convert binary input data to base64 or hexbin encoded representation for "normal"
stylesheet processing, as well as how to return arbitrary binary data from a stylesheet generated base64 string:
$ od -tcx1 te0t |
Here I tried to show the flow of "binary-reverse" sample application together with ALL intermedite contexts -- follow the arrows to follow the flow.
Please click on the image to open the BIG screenshot showing all the details!
The most important setting to make above service work is to enable "Non-XML Processing" for the rule(!) -- click for BIG screenshot: