cancel
Showing results for 
Search instead for 
Did you mean: 

SOAP Attachment message successfully in SAP PI - Receiver system failing to see/extract attachment

Former Member
0 Kudos

Hello!! Gurus

We have a SOAP(external vendor) to SOAP (internal 3rd party application) interface

  • SOAP(external vendor) ~ vendor provided WSDL
  • SOAP (internal 3rd party application) ~ PI generated WSDL


We matched the data type to be the same on both sides.


All the sync websercives are working correctly incluing the SOAP attachments being passed in couple of them.


However, the SOAP attachments are not being viewed by the 3rd party application which is receiving the attachment in response.


PI SXMB_MONI is having the attachment available.


Also, if I call this message through SOAP UI - we are unable to see the attachment in SOAP UI same as 3rd party application (PI provided WSDL)


Can you please let me know if this anything we could be missing - we are using the standard SOAP adapter (NO Axis adapter)- keep attachment checked - as mentioned we are able to view attachment - in SXMB_MONI - its only the 3rd party internal (non SAP system) which says its not seeing attachment.


Additionally below is the data type of the field associated to which the attachment is tied to on the SOAP response:

  • SOAP(external vendor) ~ vendor provided WSDL has the data type as:
    • element name="FileAttachmentHandler" type="xs:base64Binary" xmime:expectedContentTypes="application/octet-stream"


  • SOAP (internal 3rd party application) ~ PI generated WSDL
    • element name="FileAttachmentHandler" type="xsd:base64Binary" (do we need to somehow define content type as above ?! - IF so how ?!)


We have a XSLT mapping to handle the attachment as well (see below)

XSLT mapping placed after the message mapping:


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

<ns0:stylesheet version="1.0" xmlns:ns0="http://www.w3.org/1999/XSL/Transform" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:ns2="xsl">

   <ns0:template match="node() | @*">

      <ns0:copy>

         <ns0:apply-templates select="node() | @*"/>

      </ns0:copy>

   </ns0:template>

   <ns0:template match="xop:Include"/>

</ns0:stylesheet>

Sorry for long posting/message query ... Thanks for reading thru it ... Your help is greatly appreciated!!


Thank you,

Ritu


Accepted Solutions (1)

Accepted Solutions (1)

manoj_khavatkopp
Active Contributor
0 Kudos

Ritu,

As you are able to see the attachment in soap ui so i dont think their is something problem with your configuration.

But however what i observe is :


  • SOAP(external vendor) ~ vendor provided WSDL has the data type as:
    • element name="FileAttachmentHandler" type="xs:base64Binary" xmime:expectedContentTypes="application/octet-stream"


as per my experience some of the web service expects the attachment to be converted into base64/binary and sent it to one of the field in the response structure ! you can ask your third party vendor on how they are expecting the attachment ?

If you want the content type to be set as application/octet-stream then you can use MTB module in your receiver soap channel. but i dont think it makes any difference

Br,

Manoj

Former Member
0 Kudos

Hi Manoj

Thank you for your response!!

Just needed help in understanding your suggestions:

  • Firstly - SOAP UI is unable to see the attachments.
    • I am guessing the difference in having the type="xs:base64Binary" xmime:expectedContentTypes="application/octet-stream" as opposed to just defining it as just type="xs:base64Binary"
    • I am hoping to modify the PI build WSDL to somehow have - this included xmime:expectedContentTypes="application/octet-stream"
  • IF we had to pass the attachment in to a field using MTB module - can you please help understand - how this can be implemented in SOAP receiver channel?!
    • Can this be implemented at the mapping level.

The main issue is if I could see the attachments in SOAP UI - I would think everything with PI WSDL is good to handle attachments - BUT the very reason we are not seeing SOAP attachments tell me something incomplete with WSDL as pointed out above.

Please, let me know your thoughts on best possible approach to resolve so that the receiver system can start gettng the attachments - even though we dont see any errors in PI.

Thank you,

Ritu

manoj_khavatkopp
Active Contributor
0 Kudos

So if have not misunderstood your query :

Request message  : external vendor ---(only Data)--------->PI--(only Data)------>internal 3rd party application .


Response message : external vendor <-----(only Data)------PI<---(Data + attachment)---internal 3rd party application .


so that attachment which is coming from internal 3rd party is visible in PI but no to the sender (external vendor )


is my above understanding right ??


  • if so then make sure use have marked keep attachment in both channels.


  • for passing the attachment to one filed in response MTB cant help here it dosen't  has such functionality you need to do go for udf .



Former Member
0 Kudos

Hi Manoj

Here is the actual flow:

Request message  : external vendor ---(only Data)<---------PI--(only Data)<------internal 3rd party application .


Response message : external vendor ----->(only Data)------PI--->(Data + attachment)---internal 3rd party application .


The above attachment is being view in SXMB_MONI its not seen in Internal 3rd party application.


Also, simulated the above flow in SOAP UI instead of being called from internal 3rd party application .- even SOAP UI was not getting the attachment.


Is b'cos the below difference in the data type of the response:

type="xs:base64Binary"xmime:expectedContentTypes="application/octet-stream" as opposed to just defining it as just type="xs:base64Binary"


As the PI build WSDL of the internal application has only type="xs:base64Binary" as I was unable to define the xmime:expectedContentTypes="application/octet-stream"


Please, let me know you thoughts ESP SOAP UI not recieing the attachment and SXMB_MONI able to view the attachment


Thank you,

Ritu



manoj_khavatkopp
Active Contributor
0 Kudos

so by above comment i understand that the attachment is being generated from PI itself, may i know how are you generating attachment in PI ??  i don't think the above xslt mapping is generating the attachment , are u using and udf / java mapping to do so ??

Please put the screenshot of the sxmb_moni where you are able to see the attachment and also the receiver soap channel screenshot .

Former Member
0 Kudos

Sorry correction - the attachment is being passed from the external vendor on the response:

Request message  : external vendor ---(only Data)<---------PI--(only Data)<------internal 3rd party application .


Response message : external vendor ----->((Data + attachment)-------PI--->(Data + attachment)---internal 3rd party application (receiving only payload No attachment).


Please, find attached SOAP Receiver Channel & SXMB_MONI attachment screenshot as well.

manoj_khavatkopp
Active Contributor
0 Kudos

I still wonder how is attachment is missing,  atleast in soap UI I hope u r seeing in attachment tab under response tab in soap UI.  You have enabled keep attachment in both channel ryt?  If not please do it. 

However lets see what other Experts got to say on this.

Answers (1)

Answers (1)

former_member186851
Active Contributor
0 Kudos

Hello Ritu,

Are you able to see the attachment and message properly triggered from PI  receiver channel as well?

If yes no issues in PI.

Check with the third party application are they expecting the attachment in any particular format or any specific encoding.

Former Member
0 Kudos

Hi Gurus

We still haven't been able to resolve this issue - any inputs to help resolve - will be very valuable.

Thank you,

Ritu