Skip to Content
0

Attachment issue in REST to SOAP

Aug 17, 2017 at 01:45 PM

142

avatar image
Former Member

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

messagelog.png (137.5 kB)
sxmb-moni.png (30.8 kB)
10 |10000 characters needed characters left characters exceeded

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

0
Former Member
Manoj K

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

attahmntname.png (171.0 kB)
0
* Please Login or Register to Answer, Follow or Comment.

4 Answers

avatar image
Former Member Aug 18, 2017 at 07:36 AM
0

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


multipartbean.png (23.0 kB)
Show 7 Share
10 |10000 characters needed characters left characters exceeded

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

0
Former Member
Manoj K

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

dynamicconfig.png (67.7 kB)
0

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

0
Former Member
Manoj K

Yes corect image is the name

0

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

0
Former Member
Manoj K

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

0
Show more comments
avatar image
Former Member Aug 18, 2017 at 07:54 AM
0

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


sxmb-moni-18.png (90.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Aug 18, 2017 at 08:06 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Manoj K Aug 17, 2017 at 06:02 PM
0

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

Show 5 Share
10 |10000 characters needed characters left characters exceeded
Former Member

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

0

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

pimon.png (15.4 kB)
0
Former Member
Manoj K

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

0
Former Member
Manoj K

Yes here it is

<SOAP:Body>

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

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

cid: att-a34ead2083d611e790e60000018ad26a@sap.com

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

</sap:Payload>

</sap:Manifest>

</SOAP:Body>

0

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

soap.png (24.2 kB)
0