We have lots of services and want to write scripts for regular export and import tasks and not planning to automate completely.I have SOMAs for import and export that performed succesfully with curl, I want to automate exporting a bit.
Usually when we export using SOMA we get base64 text embed in soap response. I want to strip this base64 and save it in a different file as manual creation might be erroenous sometimes. Want to combine these two tasks into a single batch file but I have few questions below.
1) I have challenge to strip base64 from response as linux ( using Cygwin ) cannot go by msg but by lines ( grep, egret etc ).
2) I want to fetch base64 on successful transaction only but how to check whether call is success or failure ?
3) Is this batch file creation a good process or should I go with URL-OPEN in stylesheet ?
4) With url-open is there a way to bypass ssl proxy profile as like cURL? DP expects cert for SOMA calls and fails the transaction.
Pinned topic Challenges with SOMA
HermannSW 2700006U546276 Posts
Re: Challenges with SOMA2013-07-16T07:32:53ZThis is the accepted answer. This is the accepted answer.
1) You can get the .zip from SOMA response by tail+sed+base64 commands:
tail -1 ex.xml | sed "s/^.*<dp:file>\(.*\)<\/dp:file>.*$/\1/g" | base64 -d >ex.zip
Or you can do decoding on DataPower box:
3) Is a matter of your organization policy or taste -- you can script on Linux/Cygwin, or you can do it on DataPower
4) Why bypass, see posting "Accessing XML Management interface from within a stylesheet":Updated on 2013-07-16T07:33:51Z at 2013-07-16T07:33:51Z by HermannSW