cancel
Showing results for 
Search instead for 
Did you mean: 

SAP PI SOAP Adapter Receiver issue with ASMX Webservice (Bad Request/content-type)

Former Member
0 Kudos

Dear experts,

I have a problem invoking a webservice on IIS 7 ASMX Webservice.

The scenario is SOAP 2 SOAP.

Getting SOAP Message with Attachment (xop-include).

This SOAP message is mapped with XSLT mapping and will then be used for invoke of the ASMX webservice.

Receiver channel is SOAP Standard Adapter with "Do Not Use Soap Envelope" and Keep Attachments.

Also put in theTranformBean modulewith Transform.ContentType application/xop+xml..

I can successfully invoke the webservice with SOAP UI with the payload of mapping result and the attachment.

But invoking with the PI SOAP Receiver Adapter results in a "Bad Request (400)" Error...

I already did some wireshark traces on the Target server to compare the incoming SOAP messages in detail.

I Suppose it's related to the missing Attributes Content-Type "type="application/xop+xml" and "Accept-Enconding" in the HTTP header of the PI SOAP Adapter request message.

Attached you can see both wireshark protocols of PI SOAP Adapter and SOAP UI

do you now how this attributes in the HTTP header of Soap message can be manipulated in SAP PI ?

Or do you have any other Idea? Thank you in advance.

Best regards,

Fabian

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hello,

meanwhile I found out that the problem seems to be related to the order of mime parts.

SOAP Adapter always sends the attachment as first part and afterwards the Payload including the SOAP message..

How can I change this order?

Current configuration of module tab:

former_member186851
Active Contributor
0 Kudos

Hello Fabian,

Try moving the processing Sequence of module as per the requirement.

stefan_grube
Active Contributor
0 Kudos

Hi Fabian, There is not way in standard. You could either use AXIS framwork and chose MTOM prtotocol, or you create the whole MIME structure in Java mapping. If you have good Java skills, then I recommend the Java mapping solution.

Former Member
0 Kudos

Hi Stefan,

thank you for your response!

Approach with Java Mapping is interesting.

Do you mean to include the Java mapping in Operation Mapping?

Or Java Mapping as Adapter Module?

Thank you!

Best regards

iaki_vila
Active Contributor
0 Kudos

Hi Fabian,

I think you should go to the first Stefan's suggestion because it is a more standard way to do it.

You will only need (or your basis team) to install the AXIS libraries. I had a similar scenario, and with this configuration i got a right response:

About java mappings i think to do it at mapping level is easier because you don't need to deploy the development and it is accessible directly in the ESR, although as adapter module would be more elegant.

Regards.

Former Member
0 Kudos

Hello Iñaki,

I would like to try this.  Thanks a lot!

Currently I am having issues deploying the updated com.sap.aii.af.axisproviderlib

I would like to try this. SAP-XI3RDPARTY

Downloaded SAPXI3RDPARTY.SCA File for the corresponding SP Level of existing SAP-XI3RDPARTY

Component, Downloded all JAR Files from Apache and created com.sap.aii.af.axisproviderlib.sda with SDA Maker Tool.

But Getting Errors while deploying with NWDS.

Do you have an idea?

iaki_vila
Active Contributor
0 Kudos

Hi Fabian,

Have you followed the steps pointed here 1028961 - How to prepare axisproviderlib.sda for Adapter Framework?

Pay attention to the step that points to change the provider.xml file

Regards.

Former Member
0 Kudos

Hello Inaki,

a kernel patch solved this problem... was a known issue with the restart while deploying.

With AXIS SOAP Adapter the Invoke of ASMX Webservice works!

Thanks a lot for your support and the hint!

Now I have a nother minor challenge with mapping of the SOAP Fault responses...

I am getting Fault messages from Webservice, in case if anything in the request was wrong (for example document already exists). This Fault messages needs to be mapped to a certain format. I already have a XSLT mapping to do this (with the Standard SOAP Adapter I had "Do Not User Soap Envelope" and the Fault was handled as usual response). But with AXIS Adapter It always occurs as MessagingException:

Catching com.sap.engine.interfaces.messaging.api.exception.MessagingException: 2004:ZARF ID BULUNAMADIat com.sap.aii.adapter.axis.modules.AFAdapterCore.processXIOutboundResponse(AFAdapterCore.java:382)at com.sap.aii.adapter.axis.modules.AFAdapterCore.process(AFAdapterCore.java:129)at com.sap.aii.adapter.axis.modules.AFAdapterBean.process(AFAdapterBean.java:85)

In XPI Inspector I can see the complete original SOAP response Envelope with Fault code. This just has to be forwarded as response to the sender adapter... no SAP PI exception.

Do you have an experience how to solve this?

Best regards!!

Answers (0)