cancel
Showing results for 
Search instead for 
Did you mean: 

WCF / Netweaver PI MTOM bug

Former Member
0 Kudos

I believe we have found a bug in the sap soap adapter. The bug occurs when we send a message with an attachment using MTOM encoding from a Microsoft WCF web service client. The WCF client uses a URL Encoded href cid for xopInclude. The problem is the content id for the attachment is not URL encoded. When the mapping program runs and it attempts to map the attachment over to the inbound message it gives an exception because it thinks the attachment is null. It doesn't seem to recognize that http%3A%2F%2Ftempuri.org%2F1%2F634505586330493745 and

http://tempuri.org/1/634505586330493745 are the same value.

attachment include in the message:

<xop:Include href="cid:http%3A%2F%2Ftempuri.org%2F1%2F634505586330493745" xmlns:xop="http://www.w3.org/2004/08/xop/include" />

content id for the attachment

Content-ID: <http://tempuri.org/1/634505586330493745>

The error in the mapping program is:

RuntimeException during appliction Java mapping com/sap/xi/tf/_ImportTrainingCertificateToImportClinicalSiteDocument_ Thrown: com.sap.aii.utilxi.misc.api.BaseRuntimeException: Unexpected value <null> for node /ns0:ImportSitePersonnelTrainingCertificate/ns0:ImportTrainingCertificateRequest/ns0:TrainingCertificate/CertificateImage at com.sap.aii.mappingtool.tf7.Transformer.checkParserException(Transformer.java:172) at

I found this exact bug occurred in the JBoss application server as well and they have patched it:

https://issues.jboss.org/browse/JBPAPP-2098

Does anyone know if there is an existing patch for this issue from SAP? We are on Netweaver 7.1, enhancement pack 1.

Thanks,

Kevin

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Kevin,

Have you solved the problem with mapping exception when sending attachments from WCF and using MTOM. If so, could you provide us with details of your solution.

Regards

Alex

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

We have encountered this bug as well. Our interim solution was to use java mapping to remove the XOP field from the XML. The contentIDs could still be read without the XOP.. If you have already noticed, in SXI_MONITOR the name of the attachment would be attachment-1 but the contentIDs are retained.

Hope this helps,
Mark

Former Member
0 Kudos

Hi Mark,

Thank you for useful info. Instead of removing XOP field and according to http://help.sap.com/saphelp_nwpi71/helpdata/en/76/fc9c3d9a864aef8139d70759a499fc/content.htm

we copied the node containing that field "as is" in xslt mapping and it helped to get rid of mapping exception.

Alex

rajasekhar_reddy14
Active Contributor
0 Kudos

create OSS note , SAP will come up with solution.if they found that it was bug they would recommend you to apply patch,elase they provide other alternative to solve your problem

adam_smith7
Participant
0 Kudos

Hi Kevin,

DId you ever get a solution to your problem?

Im sending a SOAP message to the Axis SOAP adapter with attachment ( from SOAP UI with MTOM enabled) and I can see the attachment when i view the message in the runtime workbench.The future consumers of this service will also be sending the atatchment already MTOM'd.

However, I get a failled mapping with the same error as you mentioned.

I must mention that Im using integrated configuration, which means Java only (So no WS adapter ). Which also means (i think ) that the "Do not resolve XOP includes" in the operation mapping has no effect.

Regards

Adam

Former Member
0 Kudos

Hi Adam, hi Kevin,

The problem is that the Content ID href for the MTOM attachment in SOAP Body Manifest does not match the cid href in the Payload.

The only thing you need to do in SOAP UI to resolve this issue is to set the field ContentID (in tab Attachments) with the same name (href cid:) used in the field Part (and in the payload of the message).

Regards

Nuno