cancel
Showing results for 
Search instead for 
Did you mean: 

Attachment issue in REST to SOAP

PS23
Participant
0 Kudos
767

HI

Rest to PRoxy synchronous scenario wherein we need to send an image (jpg) to PO 7.5 and then teh same is uploaded in ECC system.

The current flow is already running in PI7.31 with advantco rest adapter .

System details :PO7.5 Sp7.

Error: INstead of image name xxx.jpg visible in ecc sxmb_moni as an atachment, it appears as cid:att-27478460833611e7a2d00000011ec322@sap.com

Am currently testing the same interface in new PO box.

Thanks

manoj_khavatkopp
Active Contributor
0 Kudos

Hi ,

Can you please provide the screenshot of the "SOAP Body" before mapping in PI monitoring ? Where you can see the actual Attachment name.

Br,

Manoj

PS23
Participant
0 Kudos

Thanks Manoj for replying,pfa,

attahmntname.png (this shows th atachment name which is received n PO)

As i see logs are not visible no due to some system refresh, i wil b able to provide more logs tomorrow.

attahmntname-pi.png (actual attachment that is receive in PI)

Thanks

Accepted Solutions (0)

Answers (4)

Answers (4)

PS23
Participant
0 Kudos

Hi Manoj

I see basically two problems:

1. content type of payload in PO is Content Type: application/jason it should be Content Type: application/xml;

which is why the mainDocument in sxmb_moni of ECc is not read by proxy program

2.Attachment name coming as

cid:att-67481d7583e711e7ce450000011ec322@sap.com ( image/jpeg ) than its attachment name.in PO

Thanks

PS23
Participant
0 Kudos

Hi Manoj

Attacment name doesnt comes: as attachment.jpg in PO

Also format is application/json of message entering in PO and not getting transformed in application/xml;

bean is working fine stil i don see any change in manifest file

sxmb-moni-18.png

PS23
Participant
0 Kudos

HI Manoj

I tried with the bean , below observation

1.mesage log in PO confirm bean is not exceuted in sender rest-

2.I don see attachment.jpg name in manifest

multipartbean.png

manoj_khavatkopp
Active Contributor
0 Kudos

When Bean is executed you need to see the SOAP Dynamic Configuration part not the Mainfest part.

PS23
Participant
0 Kudos

Thanks Manoj

Attach is the dynamic config. But i don see any changes still the Content-description is cid:xxx@sap.com and Application/json is the mainDocument format.

dynamicconfig.png

manoj_khavatkopp
Active Contributor
0 Kudos

Was the attachment name image.jpg ? because i can see that in dynamic config.

PS23
Participant
0 Kudos

Yes corect image is the name

manoj_khavatkopp
Active Contributor
0 Kudos

So read the name via Dynamic Config UDF and set it back as attachment name via implementing OutputAttachment interface right .

PS23
Participant
0 Kudos

Hi Manoj

Thanks for the reply.

I understand Dynamic config code will take care of change of name of attachment but why is then OutputAttachment Interface code is requierd.?

Thanks

manoj_khavatkopp
Active Contributor
0 Kudos

Hi ,

Now your issue is the attachment name in SXMB_MONI is not the correct one because the REST adapter has changed this to cid:....@sap.com .

Now you need to read the attachment name via dynamic config and then set it to attachment via OutPutAttachment by doing this the attachment name in SXMB_MONI will appear correctly.

Br,

Manoj

manoj_khavatkopp
Active Contributor
0 Kudos

Hi,

This is the default behaviour of rest/soap/http/ws adapter you need to use udf where you access attachmentid and assign it back via outputattachment method. But i doudt if again the receiver soap adapter causes nusiance.

Br,

Manoj

PS23
Participant
0 Kudos

Hi Manoj

Can any bean help here?

But Soap (XI)adapter works perfect with advantco where even i don see any attachment handling feature in adapter configuration. BUt the receiver channel is same in PI and PO.

Thanks

manoj_khavatkopp
Active Contributor
0 Kudos

No there is no way you can handle it via standard module.

Can you please provide me the screenshot like below from PI monitoring.

Br,

Manoj

PS23
Participant
0 Kudos

HI Manoj

After comparing it with ongoig PI flow i see below differences and similarity.

1. Message header is same in pi/po in msg monitirng.

2.Attachment name in PI is attachment.jpg whereas in PO it is the link: CID:xxxx@sap.com

3.in PI/PO msg monitoring PI:

Payload in PI: Content Type: application/xml;charset=utf-8; charset=UTF-8

Payload in PO:Content Type: application/json; charset=utf-8

what can be the reason of the POint 3.

Thanks

PS23
Participant
0 Kudos

Yes here it is

<SOAP:Body>

<sap:Manifest xmlns:sap='http://sap.com/xi/XI/Message/30' xmlns:xlink='http://www.w3.org/1999/xlink'><sap:Payload xlink:type='simple' xlink:href='cid:payload-a351105983d611e7c4160000018ad26a@sap.com'>

<sap:Name>MainDocument</sap:Name>

<sap:Type>Application</sap:Type>

</sap:Payload><sap:Payload xlink:type='simple' xlink:href='cid:payload-a351105a83d611e7bea00000018ad26a@sap.com'>

<sap:Name>cid:att-a34ead2083d611e790e60000018ad26a@sap.com</sap:Name>

<sap:Type>ApplicationAttachment</sap:Type>

</sap:Payload>

</sap:Manifest>

</SOAP:Body>

manoj_khavatkopp
Active Contributor
0 Kudos

Currently i dont have access to 7.5 SP07 nor with Advantaco rest adapter so i cant help you directly hence i am testing with SOAP adapter with attachment and cross checking with your REST scenario.

I can see the attachment name in soap mainfest paylaod . Don't you see the actual attachment name being passed in soap mainfest ? If not then try adding MulitPartHeaderBean in your sender Rest channel as first module and then provide that screenshot.

Br,

Manoj