cancel
Showing results for 
Search instead for 
Did you mean: 

Trying to retrieve attachment in SOAP receiver channel PI 7.31

Former Member
0 Kudos

I have a scenario where a synchronous proxy sender channel is sending a request to PI 7.31 and that request is forwarded to a web service in a soap receiver channel. The web service returns both an xml part in the soap body and an attachment in the http body. I would like to have the attachment swaped into the actual response message but I get this error:

SOAP: call failed: java.io.IOException: invalid syntax in MIME header:   ; HTTP 200 OK

I have set up the module tab on the soap receiver channel in this way:

Processing sequence:

sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean

AF_Modules/PayloadSwapBean (module key = swap)

!!!  Please note, that the PayloadSwapBean is last in the sequence because it is supposed to be used on the response and not the request.

Module Configuration:

swap      ->    swap.keyName     -> Content-id

swap     ->     swap.keyValue     -> <Attachment>

I have used these values because I have been told that the response looks something like this:

--_NextPart_000_0002_01C3E1CC.3BB37320 

Content-transfer-encoding: binary

Content-type: text/xml; charset=utf-8;

Content-id: <TIBCO_START_PART>

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope/'><soapenv:Header/> <soapenv:Body>

<ns0:FileDownloadResponseEnvelope xmlns:ns0="urn:nl:edsn:service:filedownloadresponse:env:1">

    <ns0:EDSNBusinessDocumentHeader>

………

    </ns0:FileDownloadResponseContent>

</ns0:FileDownloadResponseEnvelope></soapenv:Body></soapenv:Envelope>

--_NextPart_000_0002_01C3E1CC.3BB37320

Content-transfer-encoding: binary

Content-type: application/octet-stream

Content-id: <Attachment>

"2013-04-24T19:41:23Z","10546","5060131240060","8712423010208"

"2013-03-01","2013-04-01......

--_NextPart_000_0002_01C3E1CC.3BB37320--

In an attempt to see the whole http body I have tried to call the web service from SOAPUI but I get a (different) error message from the web service and no attachment.

How can I attack this challenge and do you have any comments on my configuration in PI?

Any comments would be highly appreciated!

Best regards

Mikael

Accepted Solutions (0)

Answers (1)

Answers (1)

udo_martens
Active Contributor
0 Kudos

Hi Mikael,

it is may be easier to pick the attachment in mapping time: http://scn.sap.com/people/yugapreetha.t/blog/2009/08/24/read-the-attachments-of-the-input-xi-message...

/Udo

Former Member
0 Kudos

Thanks for the reply Udo.

However right now my biggest concern is how I can see the whole http body of the response. I tried to use SAP's TCPGateway but the response is encrypted.

Do you know how I can see the full http body of the response in clear text? SAP Basis tried to set the adapters to debug mode but invain.

udo_martens
Active Contributor
0 Kudos

Hi Mikael,

Do you know how I can see the full http body of the response in clear text?

If you call the webservice with soapUI or Firefox Poster, all fields / parameter / header are visible.

/Udo