Matching: dp:url-open X
HermannSW 2700006U54 Tags:  dp:url-open timeout ascii_art brainteaser datapower http2rawtcp xslt 3,255 Views
After having given a 1st hint to the dribble and having received no further submissions I provided the workaround soultion:
The discussion following provided even more insight into the workaround.
Finally the "best" workaround setup was identified -- making sure that all open connections timeout at the time wanted.
I also created an ASCII art representation of the dribble-workaround DataPower configuration:
HermannSW 2700006U54 Tags:  binary datapower dp:url-open with email smtp send attachment xslt 5 Comments 10,244 Views
In this developerWorks DataPower forum posting the question was raised how to make DataPower send emails with (binary) attachments.
Technote "Sending HTML data using IBM WebSphere DataPower SOA Appliance SMTP url-open extension function" from June this year
is a first step. There we can learn that MIME="true" is necessary to do anything more than sending just a normal text email.
Next looking up InfoCenter for url-open (SMTP URLs) tells us that we have to create the raw MIME message ourselves (as in the technote above).
MIME=true | false
Stylesheet smtp.xsl (5.1 KB) just demonstrates how to do that.
Even more, it provides function mime:sendBodyWithAttachment() for easily sending an email with attachment.
This function makes use of function mime:split64() for ensuring that the base64 encoded (binary) attachment data has at most 76 characters per line (MIME spec requirement).
The attachment sent with the email is retrieved from my private website via another dp:url-open() GET request, see this slide on getgif.xsl:
Please see these two Webcasts on "Non-XML Data Processing in WebSphere DataPower SOA Appliances Stylesheets" for details on binary data processing:
Using coproc2 to execute smtp.xsl returns "sent".
The email got sent to my private email address.
This screenshot of my webmail client proves that sending the email with attachment really worked:
Last, but not least, I want to use this posting for a graphical experiment.
Since the code listings available in this blog are not as "nice" as those in developerWorks forum I took a screenshot of the
terminal with syntax highlighted listing of smtp.xsl. Since best display in this blog is for pictures of width exactly 400 pixels
I had to zoom out a little ... the resulting screenshot is a 400x1770 pixel(!) .gif image.
Good that I have a 24'' monitor in my office and a 1920x1200 graphic card for working in "Left" instead of "Normal" view ... :-)
HermannSW 2700006U54 Tags:  attachment xslt stylesheet archive dp:url-open zip manifest datapower 4,098 Views
provides the single-stylesheet implementation of "unzip -l" command -- nice!