• 添加评论
  • 编辑
  • 更多操作 v
  • 隔离此条目

评论 (6)

1 XIntegration50 发表了评论 永久链接

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?
 
Thanks,
Venkat.

2 XIntegration50 发表了评论 永久链接

Hi Herman,

 
Adding some more information. I want trying to see if I can create export.zip 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.
 
Thanks,
Venkat.

3 HermannSW 发表了评论 永久链接

Hi, you can access the XML Management interface from within a stylesheet (https://www.ibm.com/developerworks/community/blogs/HermannSW/entry/accessing_xml_management_interface_from_within_a_stylesheet38), 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 发表了评论 永久链接

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 ?
 
Thanks,
Venkat.

5 HermannSW 发表了评论 永久链接

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 "file.zip" you can open that file with an archive manager.

6 XIntegration50 发表了评论 永久链接

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 export_xxxx.zip 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.

 
Thnaks,
Venkat

添加评论 添加评论