Correspondendo a: action X
HermannSW 2700006U54 Marcações:  fetch binary datapower action xslt non-xml url-open 1 Comentário 17.462 Visualizações
In developerWorks DataPower Forum thread "FETCH action datapower stylesheet equivalent."
Suresh pointed out that document() function is the equivalent of a FETCH action in a stylesheet for fetching XML data.
The equivalent for a FETCH action in the general case is
since it allows fetching of binary/Nox-XML data (advanced tab of FETCH action) by
it was demonstrated how to process binary (Non-XML) data returned by a
These postings showed that DataPower internal encoding is UTF-8:
So in case the Non-XML document returned (binaryNode) is UTF-8 encoded further processing can easily be done by the method proposed in this posting:
The advantage of dp:decode(_,'base-64') is that it does a UTF-8 validation and preventes negative effects.
I cannot give a more complete example until having access to my boxes in the IBM network which I do not have (and do not want to have :-) ) by my cell phone or the Internet terminal in our youth hostel in most nordic German town List on North Sea island Sylt ...
(just back from this jogging run: http://www.gmap-pedometer.com/?r=3762144)
HermannSW 2700006U54 Marcações:  url-open fetch encoding non-xml datapower action xslt binary 1 Comentário 7.019 Visualizações
Just back from today's run http://www.gmap-pedometer.com/?r=4573904 at the beach and through the dunes I wanted to update my yesterday's posting on "FETCH action stylesheet equivalent".
What I found out is:
Last week I gave a talk on "Non-XML data processing in DataPower stylesheets" at German DataPower Usergroup:
There I also showed how to deal with Non-XML Non-UTF-8 data.
I will give a series of WSTE webcasts on this topic soon.
This allows processing of eg. ISO-8859-1 encoded data returned by a <dp:url-open ... response="binaryNode"> call.
HermannSW 2700006U54 Marcações:  upload convert-http swaform form action datapower file xslt http 4.323 Visualizações
There was an interesting problem on developerWorks DataPower forum.
A "windows-1250" encoded HTTP form posted data to DataPower inclusive an uploaded file.
That file data got converted to UTF-8 because that is the DataPower internal encoding
Now that file data should be store in a database via <dp:url-open ...>, but not in UTF-8 but its original encoding.
While there is a solution for this kind of problem (slides 6-8 in this WSTE webcast)the conversion to and from UTF-8 are overhead at least.
In addition the filename of the file uploaded is not available by DataPower convert-http action.
One solution is making use of swaform tool which even is able to deal with binary file data in file upload fields (see slide 16 of this WSTE webcast).
Another solution is making use of stylesheet fileupload.xsl attached in this posting:
<EDIT>had to fix pointed to posting and add modified link here -- forum software migration broke original posting</EDIT>
You pass in the base64 encoded Non-XML data received at DataPower from the HTTP form post and the field name of the file upload field (eg. FICHIER).
Then you get back something like this:
Now you can access the filename and pass the file content unmodified by <dp:url-open target="..." data-type="base64" ...>.
In addition a convert-http action may be used to process the other HTTP form fields
(or you enhance fileupload.xsl to do that processing in addition -- no need for convert-http then).