on 12-22-2020 10:20 PM
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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.
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.
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
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
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
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
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
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
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
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.