cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP <-> PI <-> SOAP with Attachments

Former Member
0 Kudos

Hello Experts

I have a scenario, where I send a DocumentName in a request to PI. PI makes a webservice call, retrieves the document (.pdf) and sends it back to requester. I just wanted to confirm, if I should be using Java Mapping anywhere to read the .pdf file before sending it to requester?

Also, would using a HTTP GET or a REST adapter be a good idea?

Any pointers would be greatly appreciated.

Thanks

Jaya

Accepted Solutions (1)

Accepted Solutions (1)

former_member184720
Active Contributor
0 Kudos

Hi Jaya - Nice to see you here

I think you can use the SOAP axis framework to get the file and send it back to requester.

Have a look at the below blog if it helps..

http://scn.sap.com/community/pi-and-soa-middleware/blog/2012/01/05/michals-pi-tips-exchange-rates-fr...

Answers (3)

Answers (3)

Former Member
0 Kudos

Thanks Amit and Hareesh for your inputs. My scenario is working fine.

1. However the name in the attachments received from target system are not being retained. I used the code snippet from blog: in my response mapping (Sys2 -> Sys1) and it doesn't seem to help. Any pointers?

Former Member
0 Kudos

Thanks Hareesh (It was nice to see you here ) and Amit and my apologies for not getting back sooner.

There is a small change in requirement at my end. it would be SOAP <-> PI <-> REST (with attachments). REST Call: SAP PI receives a .pdf file in response and SAP PI will need to send the same file as-is (reading the file in PI is not required) to source system. Need your pointers on REST call with attachments and how this could be handled.

Thanks in advance.

Former Member
0 Kudos

Hello,

U can use pointers provided above, but do remember that in PI there is a limitation in the length of a URL which u can create for calling rest web services using soap axis protocol.

Regarding passing attachments, i think my reply would still be valid (but u have to check the same)

Thanks

Amit Srivastava

Former Member
0 Kudos

Hello,

>>PI makes a webservice call, retrieves the document (.pdf) and sends it back to requester

How WS is sending pdf file? as an attachment?

>>I just wanted to confirm, if I should be using Java Mapping anywhere to read the .pdf file before sending it to requester?

I think while sending response to sender system either using JM or UDF u can read that pdf attachment (coming from receiver system) and set the same in ur response (never tried in sync scenarios but i think it will work).

@Hareesh,

I don't think Jaya can use ur approach, becoz Michal's bog clearly mentioned that this kind of approach will be helpful in case of u have static request and i believe document number is dynamic. In addition to that, i am not sure how above approach can be implemented on a receiver side?

Thanks

Amit Srivastava

former_member184720
Active Contributor
0 Kudos

Hi Amit  -

My intension in sharing the above blog was that Axis framework supports HTTP get and the same can be found in the SAP note #1039369 - FAQ XI Axis Adapter

27. Can I call the target service with HTTP GET?

The provided blog has another link which explains how to retrieve the file from a webpage