cancel
Showing results for 
Search instead for 
Did you mean: 

Name zip file and zipped file in File Receiver

peter_wallner2
Active Contributor
0 Kudos

Dear experts,

I have a "RFC to File"-scenario. So I have a File Receiver and the received XML needs to be zipped. I have a XSLT mapping that hands over a dynamic file name to the File Receiver. Now when I use the PayloadZipBean my resulting ZIP-file gets the dynamic name. But the zipped XML gets the name "untitled.xml". But I also want the zipped file to get the dynamic name!

I had a look at Stefan Grube's blog /people/stefan.grube/blog/2007/02/20/working-with-the-payloadzipbean-module-of-the-xi-adapter-framework

and also at the WIKI http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=tru...

Do you know if there is any way I can avoid writing my own adapter module? I would like to stay with SAP standard modules!

If not, will the module described in that WIKI also work with a File Receiver instead of a Mail Receiver? (I think it should)

Thank you for any ideas and best regards,

Peter

Accepted Solutions (1)

Accepted Solutions (1)

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Follow instructions given Note 965256 - XI 3.0 Adapter Framework Zip Module

You need to use MessageTransformBean to get filename for your contents inside zip file. See stefan's blog.

In addition to your payloadZipBean, you have to do the following MessageTransformBean

Details

Module Name: AF_Modules/MessageTransformBean
Type : Local Enterprise Bean
Module Key: contentType

Module configuration

Module Key:contentType         
Parameter Name:Transform.ContentType
Parameter Value:text/xml; charset="UTF-8"; name="file.xml"

Edited by: Baskar Gopal on Apr 13, 2011 12:14 PM

peter_wallner2
Active Contributor
0 Kudos

Hello Baskar Gopal,

Thank you for your answer. Your solution works as far as I can set the name of the file in the ZIP archive to "file.xml".

But getting the dynamic name there does not work.

I will write this module now using Eclipse. I am working with PI 7.0. I think I will need the "aii_map_api.jar" to generate the JAR-file.

But where do I need to place the JAR - file in order to make the module work?

Do you know?

Thank you again for your help!

Best regards,

Peter

Former Member
0 Kudos

U have to include jar files required for adapter module development in ur project under NWDS

http://wiki.sdn.sap.com/wiki/display/XI/Where%20to%20get%20the%20libraries%20for%20XI%20development

Refer this link for adapter module development:

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e674...

Once u r done with development u have to deploy this module on PI server, there are two ways to do this

1) using NWDS

2) Using JSPM

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=232030258

Thanks

Amit

peter_wallner2
Active Contributor
0 Kudos

Hello Amit Sri,

thank you for your help. I did get a lot further and I already created my EAR file with Eclipse.

But now I am stuck: I do not have the Netweaver Development Studio. I checked the link

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=232030258

but in any case there I need the NWDS (which I do not have).

Is there any way to get my adapter module working once I have the EAR file but now Netweaver Development Studio?

Thank you again for your help!

Best regards,

Peter

former_member200962
Active Contributor
0 Kudos

You have to create a SDA file out of the EAR file (I used the NWCE tool provided along-with the NWDS application)...then deploy the same using JSPM tool....take help of your Basis team for deployment using JSPM

If you have the S-user with authorization to download software from service market place then you can download the NWDS tool to directly deploy the EAR file into the PI server.

peter_wallner2
Active Contributor
0 Kudos

Hello Amit, Hello Abhishek Salvi,

Thank you again for your advice and the links to the NWDS. I downloaded it and everything went well until the deployment.

I followed How-to-Guide: http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/c0b39e65-981e-2b10-1c9c-fc3f8e674...

Then I got the error: The DOCTYPE declaration in the ejb-jar.xml deployment descriptor is missing.

I looked at thread:

I am using PI 7.0, JDK version 1.4.12.

My local JDK Version 1.5.0_22, NWDS 7.1.

Could the JDK version on the server be a problem? Or NWDS 7.1 and PI 7.0?

I used all the libraries mentioned on this page under PI 7.0:

http://wiki.sdn.sap.com/wiki/display/XI/Where%20to%20get%20the%20libraries%20for%20XI%20development

When I create the Enterprise Bean I have to specify "Component and Local Interfaces", e.g. "com.sap.aii.af.lib.mp....."

But in my PI system I cannot find JAR files with the name "aii.af.lib.mp..."

Could that be the problem?

Do I have to specify different "Component and Local Interfaces" when creating the Enterprise Bean?

Thank you again for any help!

Best regards,

Peter

Edited by: Peter Wallner on Apr 21, 2011 10:13 AM

peter_wallner2
Active Contributor
0 Kudos

I will download NWDS 7.0 next week and try again. I will post updates here.

peter_wallner2
Active Contributor
0 Kudos

I solved the problem by downloading NWDS 7.0 with Solution Manager.

I followed

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/f013e82c-e56e-2910-c3ae-c602a67b9...

and

http://wiki.sdn.sap.com/wiki/pages/viewpage.action?pageId=140640480

to create the EAR file. I deployed it using the Visual Administrator --> Cluster --> Services --> Deploy

Best regards,

Peter

Answers (0)