Skip to Content
0

ABAP - Proxy Call - Content-Transfer-Encoding: base64

Nov 08, 2016 at 04:16 PM

252

avatar image

Hi,

We have developed and ABAP client proxy that sends payload and a pdf document as attachment to the PI system. The pdf attachment is base64 encoded using the "cl_http_utility" class method. However, when the message end up in PI system, the HTTP header of the PDF attachment Content-Transfer-Encoding is coming as "binary" instead of "base64". Did anybody able to change this to base64 before sending to PI?

Thanks,

Vijay K

10 |10000 characters needed characters left characters exceeded

You explained how you calculate the base64 of the PDF, but could you explain how you embed the base64 in the message that you transmit to the web service? (which kind of proxy is it by the way?)

0

Hi Sandra!

I guess that attachment is added to ABAP client proxy message using IF_WSPROTOCOL_ATTACHMENTS interface:

https://blogs.sap.com/2006/04/19/xi-rfc-or-abap-proxy-abap-proxies-with-attachments/

Regards, Evgeniy.

1

Hello Sandra,

That is exactly how I added the proxy to the call, as Evgeniy mentioned.

VJ

1
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Evgeniy Kolmakov Nov 10, 2016 at 05:23 AM
0

Vijay!

I've already seen similar questions before but I couldn't find the way to set "Content-Transfer-Encoding" HTTP header in PI.

I can just suggest to send attachment in binary format (without encoding to Base64) or extend your source message structure and put Base64 encoded string in payload instead of using attachment.

Maybe other respective members will assist.

Regards, Evgeniy.

Show 1 Share
10 |10000 characters needed characters left characters exceeded

The requirement from the partner is base64.

I understand this solution Evgeniy. However, this would require me to develop something in Java, may be an adapter module, which I do not want to add to the design due to the maintenance and support issues. Ultimately, if SAP could not help then that is my only fall back option.

If ABAP could set that for us, it would be seem-less all the way.

VJ

0