I'm trying to download file through following schema:
Client <-> DP_int <-> MQ_int <-> MQ_ext <-> DP_ext <-> Endpoint
When sending request, I put headers and params into xml inside xslt (DP_int), pass it througt MQ, then set headers and params and send it to the endpoint (DP_ext).
When processing response, I use binary xslt transform with simple ffd for input-mapping:
<?xml verison="1.0" encoding="UTF-8"?>
If it's a text file everything is fine. Response body passed correctly into xml, but if it's a binary file, only beginning of the body (up to the first zero byte) passed into xml.
<xsl:copy-of select="$body"/> <!-- 1 -->
<!-- <xsl:copy-of select="dp:binary-encode($body)"/> 2 -->
<!-- <xsl:copy-of select="dp:radix-convert($body, 16, 64)"/> 3 -->
1. only beginning of the body (up to the first zero byte) passed into xml
2. only beginning of the body (up to the first zero byte) passed into xml
3. Invalid character for input '16' string passed into xml
This topic has been locked.
2 replies Latest Post - 2012-11-05T12:29:35Z by SystemAdmin
Pinned topic Download file over http through Datapower and MQ
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-11-05T12:29:35Z at 2012-11-05T12:29:35Z by SystemAdmin
HermannSW 2700006U544131 PostsACCEPTED ANSWER
Re: Download file over http through Datapower and MQ2012-10-29T18:57:44Z in response to SystemAdminThere are two WSTE webcasts on basics and advanced in Non-XML data processing in DataPower stylesheets:
Please go through these, there are many samples, and all are contained in "Samples file" attachment.
You will get more detailed explanation by the attached audio recording.
You may find many Non-XML examples here, too:
Btw, the reson for termination at first 0x00 byte is that it is not a valid XML character.
The webcasts will show you that you may run into stability issues if not dealing with Non-XML data securly.
SystemAdmin 110000D4XK6772 PostsACCEPTED ANSWER
Re: Download file over http through Datapower and MQ2012-11-05T12:29:35Z in response to SystemAdminThanksfor quick response, Hermann.
These samples were very helpful. I've suceeded in downloading even quite large binary files.
The other option I need to configure is file transfer over ftp. Will create a new thread "Download file over ftp through Datapower and MQ" fo that.