Comentarios (7)

1 XIntegration50 ha hecho un comentario el Enlace permanente

Hi Hermann,

When we do an export from control panel, DP server creates an export zipped file in the local:///export folder. Do we have any way to perform the same with the base64 resp that we get from SOMA export call?

2 XIntegration50 ha hecho un comentario el Enlace permanente

Hi Herman,

Adding some more information. I want trying to see if I can create as like DP using SOMA . In my case I am calling XML mgmt ip using xslt ( NOT using cURL or something like that ).
I know it might be better to save the base64 encoded text as a file and use the same while importing but if it is zip that can be copied and saved to some repository for version tracking.

3 HermannSW ha hecho un comentario el Enlace permanente

Hi, you can access the XML Management interface from within a stylesheet (, and then use dec.xsl technique from above to return the .zip file -- that is the one service returning a .zip export. Hermann

4 XIntegration50 ha hecho un comentario el Enlace permanente

Hi Hermann,

I mentioned in my above comments that I want to do SOMA from within stylesheet and create an export .zip as like datapower does . So I created do-export SOMA and got base-64 encoded text back. I created a file name with .zip extension with the Set-file SOMA action and gave the content that I got while creating the file .the file created with .zip extn. but doesn't seem to be valid. I am not sure if I have to convert it to binary ( as like dec.xsl above ) but if I convert to binary I cannot use dp:set-file. Can you please suggest an idea ?

5 HermannSW ha hecho un comentario el Enlace permanente

Sorry, I do nozt understand why you wnat to use dp:set-file. What you said is that you want a .zip export returned. You can achvieve this by adding the "call do-export by SOMA from withing stylesheet" to dec.xsl above. Then you will have the base64 encoded .zip as you said. Now all you have to do above if replace the <xsl:value> line by <xsl:value select="dp:binary-decode($b64)"/>. So assuming that the base64 encoded .zip is stored in $b64 variable, this modification will return the "real" .zip file. So if you redirect the output into a "" you can open that file with an archive manager.

6 XIntegration50 ha hecho un comentario el Enlace permanente

Hi Herman, Sorry I forgot to mention one step, I am planning to use only SOAP UI and send a request to import and export. So, a user might say export from 'env1' domain and import to 'env2' domain, in this case I want to create file in local or temp folder and them continue importing to targeted domain or user may perform single import or export action. Once export or export/import is done, user copies this export to CVS manually ( I am trying to see if we can call CVS APIs from datapower ) for versioning. Some times user may copy .zip export from CVS system into datapower and only requests import action to 'env2', in this case I have to able to read .zip file and import it. For this reason I am trying to create a .zip file within xsl. Please correct me if you think my approach is wrong.


7 AdityaKaranam ha hecho un comentario el Enlace permanente

Hi HermannSW, I tried decoding base64 data using 'dp:decode' extension but am getting Junk value at the end of every line which reads " ", Is there any way through which this could be avoided?

Here's the XSL I'm using:
<xsl:template match="/">
<xsl:variable name="InputData" select="."></xsl:variable>
<xsl:variable name="DecodedData" select="dp:decode($InputData,'base-64')"></xsl:variable>
<xsl:value-of select="$DecodedData"></xsl:value-of>
And here's how my decoded base64 data looks like:
DEE|^~\&|Hello akkarana|GA0000||C PROCESSOR|20010316||ORU^R01|20010422GA03|T|2.3|||NE|AL|1|ASCII|A^b^c^d^e^f
BHO|1||E3302^^^^MR~100000316^^^MRN^MR||Rajesh^Ramayan^KUmar^JR^^^L||20001007|M||2106-3^Brown^HL70005|123 Lemontree St^APT3B^TGSA^GA^30210^^M^^GA067||(678)3535352D313231325E50524E
BJF|1|P|comment after PD1
As you can see there's ' ' at the end of every line. Could you please help me out on this?
Thanks in Advance!
Aditya :-)

Añadir un comentario Añadir un comentario