cancel
Showing results for 
Search instead for 
Did you mean: 

How to read attachment from sender abap proxy in PI using java code

former_member189440
Participant
0 Kudos

Hi,

Can you please help me out with a piece of java code where i need to get the attachment from abap porxy and send it to SOAP reciver adapter.

Thanks and Regards

Arun Kumar

Points will be rewarded.

Accepted Solutions (1)

Accepted Solutions (1)

iaki_vila
Active Contributor
0 Kudos

Hi Arun,

In a graphical mapping you can access attachments within a UDF through the GlobalContainer parameter:

GlobalContainer globalContainer = container.getGlobalContainer();

InputAttachments inputAttachments = globalContainer.getInputAttachments();

You have also a complete Java code in this thread http://scn.sap.com/thread/1341089 , you should see Yugapreetha T answer.

This option is availabe in SAP PI >= 7.1 version

Regards.

former_member189440
Participant
0 Kudos

Hi,

I need the full code to keep in udf as i tried the above link, but still i am gettng errror in mapping.

iaki_vila
Active Contributor
0 Kudos

Hi,

Could you give us the exception?

Have you marked this in the Operation Mapping?

Could you put any trace.addinfo in the code in order to detect where could be the problem?

I just found Yugapreetha T's  blog about this issue, but no java code is posted but there explains more about this theme. ( http://scn.sap.com/people/yugapreetha.t/blog/2009/08/24/read-the-attachments-of-the-input-xi-message...)

Regards.

former_member189440
Participant
0 Kudos

Hi,

Issue was solved by my self,

Thanks for your value input.

Regards

Arun .

iaki_vila
Active Contributor
0 Kudos

I'm glad,  you could resolve the problem. If you want you could post the exactly solution in order to can help more people in the future .

Regards

0 Kudos

hey uday how did you resolve this issue. Please guide me. M working with outbound soap & Inbound proxy sync scenario. M having hard time converting attachment received from sync proxy converting it to base64 & map it to target field of soap. Apprreciate your help

JaySchwendemann
Active Contributor

Recognizing this is an old thread, but since you seem to be active in SCN, I may note that some people may find it offensive if you ask for help, seemingly find a solution (maybe based on that help, maybe not) and come back here to say you solved by yourself WITHOUT sharing the solution.

Please share

Cheers

Jens

Answers (0)