cancel
Showing results for 
Search instead for 
Did you mean: 

soap 1.2 protocol connection issue in SAP PO7.5

former_member637026
Participant
0 Kudos

Hi Experts,

We have SAP>ECC>Third party(SOAP WSDL) system interface.

Third party system is on soap 1.2. By default, in PI we have the option of soap 1.1 only as shown below. Connection was not working from PI to third party server initially then when third party system downgraded to soap 1.1, the connection from PI started working fine.

But issue is third party server cant be on soap 1.1 so they have reverted back their system to soap 1.2. They have asked to use soap 1.2 from PI as well. In PI to use soap 1.2, I tried using HTTP(axis) as the transport protocol but the connection from PI to third party is erroring out.

PI config:

Default module paramaters:

Error we getting in PI:

Transmitting the message to endpoint <local> using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: javax.ejb.TransactionRolledbackLocalException: Error occurred: ; nested exception is: javax.ejb.EJBTransactionRolledbackException: Transaction ended with error, reason: ; nested exception is: javax.ejb.EJBException: nested exception is: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/xml/serializer/TreeWalker


Any pointers or suggestions would be very helpful.

Thanks in advance,

Surya

openrico
Participant
0 Kudos

Hi Surya,

If I am not mistaken, this should me the correct xslt mapping for your case:

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:ns1="http://tempuri.org/" 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> 
<xsl:strip-space elements="*"/> 
<xsl:template match="/ns1:UpdateRequestStatus">
<soapenv:Envelope> 
<soapenv:Header/> 
<soapenv:Body> 
<ns1:UpdateRequestStatus>
<xsl:copy-of select="*"/> 
</ns1:UpdateRequestStatus> 
</soapenv:Body>
</soapenv:Envelope> 
</xsl:template> 
</xsl:stylesheet>

I didn't know, that you have an external message. Therefore you have to give him the message name (UpdateRequestStatus).

Maybe it wont work like that, because you have cascaded namespaces (ns2 & ns3 under ns1). But lets try this easy solution first.

Greetings Enrico

Accepted Solutions (1)

Accepted Solutions (1)

openrico
Participant
0 Kudos

Hi Surya,

Have you checked this blog?

https://archive.sap.com/documents/docs/DOC-29829

Greetings

Enrico

openrico
Participant
0 Kudos

Hi Surya,

its not possible to achieve it only with soap adapter and graphical mapping.

BUT you can use xslt mapping in your operation mapping instead of described java mapping. What you have to do is:

1. Tick in your SOAP receiver channel "do not create soap envelope". The result is, that the target massage is taken and send to the receiver. The response from the receiver is taken and send to the responsemapping. So you have to provide the soap envelope for the request and delete it from the response before entering the mapping.

2. In the request operation mapping you have to add an XSLT mapping AFTER your graphical mapping to add an soap 1.2 envelope

e.g.:

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:ns1=":{name of Namespace of your MessageType}"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>
<xsl:strip-space elements="*"/>


<xsl:template match="/ns1:{name of your MessageType}">
    <soapenv:Envelope>
        <soapenv:Header/>
        <soapenv:Body>
            <ns1:{name of your MessageType}>
                <xsl:copy-of select="*"/>
            </ns1:{name of your MessageType}>
        </soapenv:Body>
    </soapenv:Envelope>
</xsl:template>


</xsl:stylesheet>

3. In the response operation mapping you have to add an XSLT mapping BEFORE your graphical mapping to delete the soap 1.2 envelope from the response.

E.g.

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
exclude-result-prefixes="soapenv">


<xsl:strip-space elements="*"/>
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>


<!-- remove all elements in the soapenv namespace -->
<xsl:template match="soapenv:*">
    <xsl:apply-templates select="node()"/>
</xsl:template>


<xsl:template match="faultcode"/>


<xsl:template match="detail"/>
   


<xsl:template match="*">
    <xsl:element name="{local-name()}">
        <xsl:apply-templates select="@*|node()"/>
    </xsl:element>
</xsl:template>


<!-- convert attributes to elements -->
<xsl:template match="@*">
    <xsl:element name="{local-name()}">
        <xsl:value-of select="." />
    </xsl:element>
</xsl:template>
</xsl:stylesheet>

You need to replace some curly brackets and eventually adjust my xslt code. But for me it is working well.

You need to save those code (*.xslt file and zip it) and import it as "imported archive" in ESR. Then you can use it in operation mapping as described above.

I hope it helps you.

Greetings

Enrico

former_member637026
Participant
0 Kudos

Hi Enrico,

Thanks a lot for your help and all the details.

One question I have: Can you explain me what you mean by request and response plz?. Because in my scenario we have SAP>PO 7.5>Receiver(SOAP), we are just sending the data to receiver and we are not receiving/expecting any response from receiver system back to PI. The data received from ECC is sent to receiver, its just an asynchronous flow.

Thanks in advance.

openrico
Participant
0 Kudos

Hi Surya,

usually SOAP is a synchronous call. That's why I thought it is a synchronous scenario as well.

Just forget the responsemapping. Then you only need what I wrote for the request.

Greetings

Enrico

former_member637026
Participant
0 Kudos

Hi Enrico,

I created XSLT mapping(used ur code above) and added it in operation mapping after the current graphical mapping.

But now I am getting below error:

Transmitting the message to endpoint <local> using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 415 Cannot process the message because the content type application/xml was not the expected type multipart/related; type="application/xop+xml".

My XSLT code: (Only one's highlighted below I have edited in ur code)

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

xmlns:ns1="http://***.com/pi/DRM/AP/IF00000063/100"

xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/>

<xsl:strip-space elements="*"/>

<xsl:template match="/ns1:ABCVendorDataRequestStatus">

<soapenv:Envelope>

<soapenv:Header/>

<soapenv:Body>

<ns1:ABCVendorDataRequestStatus>

<xsl:copy-of select="*"/>

</ns1:ABCVendorDataRequestStatus>

</soapenv:Body>

</soapenv:Envelope>

</xsl:template>

</xsl:stylesheet>

Can you please advise?

Thanks in advance.

openrico
Participant
0 Kudos

Hi Surya,

I would try to change the content type in your Receiver SOAP Channel.

In module tab add BEFORE your XISOAPAdapterBean the Module "AF_Modules/MessageTransformBean" Type "Local Enterprise Bean" with a key you want. Below add a new pararmeter to your module called "Transform.ContentType" (Parametername) and the parametervalue "multipart/related"

Greetings

Enrico


former_member637026
Participant
0 Kudos

Hi Enrico,

Thanks a lot for your reply.

I added the contentconversion module bean as suggested by you and started getting this error:

SOAP: Error occurred: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request

ModuleBean:

1 AF_Modules/MessageTransformBean Local Enterprise Bean A

2 sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean Local Enterprise Bean soap

Module Key ParameterName ParameterValue

A Transform.ContentType multipart/related

After mapping payload:From message monitoring:

<?xml version="1.0" encoding="utf-8"?>2003Vendor 0022125786 created Successfully930617S0022125786

Kindly advise.

Thanks.

openrico
Participant
0 Kudos

Hi Surya,

this looks good. It means that the server is accepting your SOAP 1.2 envelope & your content type is correct.

The last step is your payload. It seems that your xslt mapping is no quite correct. It deletes every node and this shouldn't be the case.

Is the namespace correct? The namespace and messagetype must be the namespace and messagetype of the output of your graphical message mapping

We are almost done 🙂

Greetings

Enrico

former_member637026
Participant
0 Kudos

Hi Enrico,

Added new comments on your inputs u gave on soap Header section for WS Addressing. Can you please take a look.

Thanks in advance, Surya

Answers (1)

Answers (1)

former_member637026
Participant
0 Kudos

Hi Enrico,

Adding SOAP UI screen shots here. Please take a look and help me with this last step.

Thanks in advance, Surya

openrico
Participant

Hi Surya,

so your endpoint needs WS addressing. You have to add this into the header of the soap envelope.

Go to SOAP UI and send the request with ws-a enabled. On the left side, go to tab "raw". There you will see the request in raw format. From there you need the part "header". (find it somewhere)

Modify my xslt template above and replace the bold part with the header you copied from soap ui (please adjust the namespace from SOAP Ui to the xslt mapping before pasting) :

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns1="http://tempuri.org/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> <xsl:strip-space elements="*"/> <xsl:template match="/ns1:UpdateRequestStatus"> <soapenv:Envelope> <soapenv:Header/> <soapenv:Body> <ns1:UpdateRequestStatus> <xsl:copy-of select="*"/> </ns1:UpdateRequestStatus> </soapenv:Body> </soapenv:Envelope> </xsl:template> </xsl:stylesheet>

I think it will work then.

Greetings

Enrico

former_member637026
Participant
0 Kudos

Hi Enrico,

I did the changes as suggested by you but still getting the same error:

Transmitting the message to endpoint <local> using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: Response message contains an errorXIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request

The header part tat I edited in XSLT code is below:

<First part of XSLT code followed by below:>

<soap:Envelope>

<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing"><wsa:Action>http://tempuri.org/******</wsa:Action><wsa:To>https://evdm-dev2.XYZ.com:444/Service/ECCService.svc</wsa:To></soap:Header>

<soap:Body>

<ns1:UpdateRequestStatus>

<xsl:copy-of select="*"/>

</ns1:UpdateRequestStatus>

</soap:Body>

</soap:Envelope>

</xsl:template>

</xsl:stylesheet>

To Add on: I copied the AM - after mapping payload from message monitoring and tested it in SOAP UI with WS Addressing disabled (bcoz this is taken care in SOAP Header already this time), the request worked . I could able to git the URL successfully from SOAP UI with the AM payload as it is.

So ideally from PI also it should have worked correct? Why is it giving HTTP bad request error?

Any pointers or advise plz?

Thanks in advance, Surya

former_member637026
Participant
0 Kudos

Hi Enrico,

Adding header section again here since above its getting updated as something else.

<soap:Header

xmlns:wsa="http://www.w3.org/2005/08/addressing">

<wsa:Action>http://tempuri.org/****</wsa:Action>

<wsa:To>https://evdm-dev2.***.com:444/Service/ECCService.svc</wsa:To>

</soap:Header>

Thanks, Surya

openrico
Participant
0 Kudos

Hi Surya,

this should be the correct xslt mapping. Please Change the stars. But in your last post, something is missing. Please check what you have postet. After ...tempuri.org/*** is a closing bracket, but it isn't opened anywhere.

 <xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
xmlns:ns1="http://tempuri.org/" 
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> 
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes"/> 
<xsl:strip-space elements="*"/> 
<xsl:template match="/ns1:UpdateRequestStatus">
<soapenv:Envelope> 
<soapenv:Header 
xmlns:wsa="http://www.w3.org/2005/08/addressing">
http://tempuri.org/****>; 
<wsa:To>https://evdm-dev2.***.com:444/Service/ECCService.svc</wsa:To>
</soapenv:Header>
<soapenv:Body> 
<ns1:UpdateRequestStatus>
<xsl:copy-of select="*"/> 
</ns1:UpdateRequestStatus> 
</soapenv:Body>
</soapenv:Envelope> 
</xsl:template> 
</xsl:stylesheet>

Greetings

Enrico

former_member637026
Participant
0 Kudos

Hi Enrico,

Thank you.

Yes my XSLT code is the same as you gave me. Adding my code again here.

Kindly let me know if anything wrong. But to update you, with this XSLT code, the AM payload from message monitoring is working in SOAP UI fine with S Addressing disabled. So I feel code looks good but don't wat else is causing Bad request issue.

Thanks, Surya

openrico
Participant
0 Kudos

Hi Surya,

sorry for my late Reply, i didn't get a notification, that you wrote something 😞

If SOAP UI is processing your data from Message Mapping Output, i would say that something with your Soap Channel is wrong.

Kindly check, if there is any difference between SOAP Receiver Channel and SOAP UI.

If you want, you can post a screenshot here.

Greetings

Enrico

former_member637026
Participant
0 Kudos

Thanks a lot Enrico for your help throughout, much appreciated 🙂

The above XSLT solution is now working in our PI system.

Thanks a lot again,

Surya