on 03-30-2012 3:58 PM
I have a FILE-XI-SOAP scenario.
My requirement is to FTP a txt file and then zip it and encode it in base64 format and send it to SOAP receiver.
please suggest different possible ways to achieve this.
Hi,
>>>My requirement is to FTP a txt file and then zip it and encode it in base64 format and send it to SOAP receiver
a) as the last mapping create a java mapping class which will encode in base64 and zip the content
b) send it to the SOAP receiver
Regards,
Michal Krawczyk
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
While creating Java class for mapping in eclipse I got following errors
The type StreamTransformation is deprecated
- Access restriction: The type StreamTransformation is not accessible due to restriction on required library C:\Program Files\Java\jre1.5.0_11\lib\ext
\com.sap.xpi.ib.mapping.lib.jar
Access restriction: The type DynamicConfiguration is not accessible due to restriction on required library C:\Program Files\Java\jre1.5.0_11\lib\ext
\com.sap.xpi.ib.mapping.lib.jar
I have imported following jar files on my local machine from XI server
com.sap.xpi.ib.mapping.lib.jar
com.sap.aii.utilxi.core.jar
Note: I am on PI 7.1
Your java class has to extends AbstractTransformation in PI 7.1. Refer these links. I'm sure you don't follow the right syntax for PI 7.1
http://wiki.sdn.sap.com/wiki/display/XI/Using+PI+7.1+API+for+Java+mapping
https://wiki.sdn.sap.com/wiki/display/XI/Sample+JAVA+Mapping+code+using+PI+7.1+API
http://www.objectbiz.com/post/5249313454/sap-pi-java-mapping-from-7-0-to-7-1
Check this blog for File Zipping:
http://www.saptechnical.com/Tutorials/XI/ZippingFiles/demo2.htm
And then, you can use Encoding in Soap Adapter. Take a look to this document (page 17):
ModuleName: localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean
Parameter: XMBWS.TransferEncoding
Value: base64
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Referring to above solution i have one query
a) is it possible to use loacalejbs/AF_Modules/PayloadZipbean in SOAP receiver channel.
I tried with below configuration
File Sender Channel-to pick the file
SOAP receiver Channel – PayloadZipbean – zip file
localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean-encode
But I am getting below mentioned error in communication channels
File Sender
Error: com.sap.engine.interfaces.messaging.api.exception.MessagingException: XIAdapterFramework:GENERAL:com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of PayloadZipbean.
SOAP Receiver
Message processing failed. Cause: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of PayloadZipbean.
Error "Object not found in lookup of PayloadZipbean" is resolved by changing the order of modules in Channel and correcting the names of modules. Module Name is case sensitive hence there was no lookup found for PayloadZipbean, replace this with PayloadZipBean and it working fine now.
I am using PayloadZipBean and XISOAPAdapterBean in SOAP receiver channel with details as
Module Name AF_Modules/PayloadZipBean
Type Local Enterprise Bean
Module Key Zip
Parameter Name zip.mode
Parameter Value zipAll
Module Name sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean
Type Local Enterprise Bean
Module Key SOAP
Parameter Name XMBWS.TransferEncoding
Paramter Value base64
Although output i am getting is a xml with UTF-8 encoding (default) and not the zipped one with encoding base64.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.