cancel
Showing results for 
Search instead for 
Did you mean: 

Send attachment with receiver SOAP adapter

Former Member
0 Kudos

Dear Guru's,

We have created a scenario SAP ERP (ABAP Proxy) -> PI 7.0 -> (Webservice) OSB.

In the ABAP Proxy have we attached a file (jpg). In the SXMB_MONI we see first the file (named attach), and second the MainDocument. It seem's this is the wrong sequence.

We tried to correct this with AF_Modules/PayloadSwapBean in the receiver SOAP adapeter, but it does not work.

There are blogs who tells about how to configure the parameters. We did it as follows:

AF_Modules/PayloadSwapBean swap1

AF_Modules/PayloadSwapBean swap2

swap1: swap.keyName = payload-name

swap1: swap.keyValue = attach

swap2: swap.keyName = payload-name

swap2: swap.keyValue = MainDocument

In the communication channel audit log the swap is processed succesfully, but we don't see nothing changing in the message sequence.

Can somebody please help me with this issue?

Kind regard,

Jeroen Jung

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

See my previous message... We give a SOAP envelope to the SOAP Adapter instead of let the adapter create the envelopen.

Former Member
0 Kudos

Hi All,

We found out that the problem is the checkbox in the SOAP Adapter "DO NOT USE SOAP ENVELOPE". If we uncheck the box (which we can not do in our case) then we see in TPCMON, when we grap the message, that the sequence is ok.

We have implemented another solution for this interface. We have added an additional field in the body of the message, type binair, in which we send the attachment data. In future we will try to do it the right way.

Thnx for the suggestions.

Gr. Jeroen

stefan_grube
Active Contributor
0 Kudos

> AF_Modules/PayloadSwapBean swap1

> AF_Modules/PayloadSwapBean swap2

Do you use the swap bean twice?

That does not make sense.

Former Member
0 Kudos

We have also tried it with one time to swap without any result, so we filled:

Processeing Sequence:

AF_Modules/PayloadSwapBean ; Local Enterprise Bean ; swap

Module Configuration:

swap ; swap.keyName ; payload-name

swap ; swap.keyValue ; attach

So what should it be?

Regards,

Jeroen

Former Member
0 Kudos

This is very important and has to be solved very soon!

Anyone any idea, how we can achieve that?

stefan_grube
Active Contributor
0 Kudos

> We have created a scenario SAP ERP (ABAP Proxy) -> PI 7.0 -> (Webservice) OSB.

> In the ABAP Proxy have we attached a file (jpg). In the SXMB_MONI we see first the file (named attach), and second the MainDocument. It seem's this is the wrong sequence.

Don't worry. The SOAP message will created correctly, there is no need to do anything.

Former Member
0 Kudos

Hi Stefan,

The main thing at this moment is to change the sequence of the payload and attachement. PI puts the attachement first and than the payload and in that sequence the receiver application can't deal with it.

This is a multipart related message and in the header it refers to the image (image/jpeg) first instead of the payload (application/xml).

As you can see in the first message we have used PayloadSwap Adapter module in the receiver SOAP Communication Channel to change this sequence and in the Audit Log of the SOAP CC we can see that it does SWAP functionality succesfully but the result is the same and nothing happens.

Here below you can see the result of a http snapper grabber:


POST /EnterpriseContentManagement/ProxyServices/PS_EnterpriseContentManagement_v1 HTTP/1.0
Accept: */*
Host: localhost:8090
User-Agent: SAP-Messaging-com.sap.aii.messaging/1.0505
CallingType: SA
Content-Type: multipart/related; boundary=SAP_00e371ef-3ca3-11df-9503-001f2966194a_END; type="image/jpeg"; start="payload-9A6BAB4B2FE1273DE10000000A503151 @ sap.com"
Content-Length: 939196
SOAPACTION: 

 --SAP_00e371ef-3ca3-11df-9503-001f2966194a_END
content-id: payload-9A6BAB4B2FE1273DE10000000A503151 @ sap.com
Content-Type: image/jpeg

*********binary attachment data************

--SAP_00e371ef-3ca3-11df-9503-001f2966194a_END
content-id: payload-9B6BAB4B2FE1273DE10000000A503151 @ sap.com
Content-Type: application/xml

 <?xml version="1.0" encoding="utf-8"?>

*********XML Message************

--SAP_00e371ef-3ca3-11df-9503-001f2966194a_END--

Do you have an idea how we can switch the sequence of payload and the attachment? Or why the SWAP functionality doesn't have any result?

Kind regards,

Danke

Jeroen Jung

stefan_grube
Active Contributor
0 Kudos

> Do you have an idea how we can switch the sequence of payload and the attachment? Or why the SWAP functionality doesn't have any result?

How does it look, when you do not use SWAP? The same?

Former Member
0 Kudos

Yes, the result is the same. With or without SWAP.

It looks like that SWAP doesn't work and we don't know why!!!