cancel
Showing results for 
Search instead for 
Did you mean: 

PI 7.11: Adapter Framework caught exception: null

Former Member
0 Kudos

Hi,

I've a ABAP Proxy - to - SOAP scenario.

Message mapping works.

In the communication channel monitor I get the following error:

MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException

Adapter Framework caught exception: null

In the log viewer in NWA I see the following two messages:

Marked transaction for rollback for meesage 516e304f-b083-8e3e-e100-00000a01095f(INBOUND). Reason: <null>

Caught exception com.sap.engine.interfaces.messaging.api.exception.MessagingException from application code with msgKey: 516e304f-b083-8e3e-e100-00000a01095f(INBOUND)

The payload for calling SOAP receiver looks like that:

<m:setEmployee xmlns:m="http://test.com" xmlns:fo="http://www.w3.org/1999/XSL/Format">
         <ns1:e xmlns:ns1="http://test.com">
            <address_Mail_Incoming_Type>
               <email>test.com</email>
               <phone>7890</phone>
            </address_Mail_Incoming_Type>
            <badge_ID>123</badge_ID>
            <cost_Center>321</cost_Center>
            <date_Hired>1980-01-01T00:00:00.000Z</date_Hired>
            <date_Of_Birth>1950-01-01T00:00:00.000Z</date_Of_Birth>
            <department>123</department>
            <division>ABC</division>
            <employee_Category>A</employee_Category>
            <employee_Code>1000</employee_Code>
            <employee_Id>1000</employee_Id>
            <employee_Status>ACTIVE</employee_Status>
            <first_Name>A</first_Name>
            <last_Name>B</last_Name>
            <letter_code_3>FRI</letter_code_3>
            <location>123</location>
            <position>123</position>
         </ns1:e>
      </m:setEmployee>

When I copy this payload into SOAP UI (surrounded by <soapenv:Envelope>, <soapenv:Header> and <soapenv:Body>), the WS call works.

The URL for the receiving CC should be ok (same as in SOAP UI), the "Do not use SOAP Envelope" checkbox is not flagged.

What can be the reason for that error message?

Thanks in advance!

Accepted Solutions (0)

Answers (4)

Answers (4)

patrick_bode
Explorer
0 Kudos

Hi Gurus,

im facing the same problem with my ABAP Proxy -- PI -- SOAP Scenario. When i take the payload in SOAPUi it works.

what my scenario look like:

PI 7.11 / SOAP 1.1 Receiver Adapter


Transport Protocol: HTTP
Message Protocol: SOAP 1.1

URL: https://host:port/company/OrderService.svc

Certificate Authentication is activated

Configure Proxy is activated

"Do Not Use SOAP Envelope" ist not set!

SOAP Action is set

Antoher thing we changed is in the "Module" Part:

localejbs/AF_Modules/MessageTransformBean --> transform

Module Key: transform --> Transform.ContentType --> text/xml or text/plain

The Error in RWB

13.12.2012 13:43:15FehlerMP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException
13.12.2012 13:43:15FehlerAdapter Framework caught exception: null

If you need any other information, just ask.

Regards Patrick

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Can you share the SOAP Envelope that is being used in SOAP UI? Probably it is using SOAP 1.2.

Regards,

Mark

Former Member
0 Kudos

Hi,

this is how the SOAP envelope looks like SoapUI:

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sour="http://test.com">
   <soapenv:Header/>
   <soapenv:Body>
      <sour:setEmployee soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
         <e xsi:type="emp:Employee_Incoming_Element" xmlns:emp="http://test.com">
         ...
         </e>
      </sour:setEmployee>
   </soapenv:Body>
</soapenv:Envelope>

What I tried now:

I've recreated the CC without any effect.

The strange thing is:

I use this CC also with the former version of the interface (IDoc to SOAP), and here everything works.

Can it be a problem of the payload?

Here the payload from the old interface, the new one you can find in my first post:


<?xml version="1.0" encoding="utf-8"?>
<m:setEmployee xmlns:m="http://test.com">
	<ns0:e xmlns:ns0="http://test.com">
		<address_Mail_Incoming_Type>
			<email>test.com</email>
			<fax/>
			<phone>7890</phone>
		</address_Mail_Incoming_Type>
		<badge_ID>123</badge_ID>
		<contractor_Vendor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
		<cost_Center>321</cost_Center>
		<date_Hired>1980-01-01T00:00:00.000Z</date_Hired>
		<date_Terminated xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
		<department>123</department>
		<division>ABC</division>
		<employee_Category>PERM</employee_Category>
		<employee_Code>1000</employee_Code>
		<employee_Id>1000</employee_Id>
		<employee_Status>ACTIVE</employee_Status>
		<first_Name>A</first_Name>
		<last_Name>B</last_Name>
		<location>123</location>
		<position>123</position>
	</ns0:e>
</m:setEmployee>

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

<soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sour="http://test.com">

<soapenv:Header/>

<soapenv:Body>

<sour:setEmployee soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

<e xsi:type="emp:Employee_Incoming_Element" xmlns:emp="http://test.com">

...

</e>

</sour:setEmployee>

</soapenv:Body>

</soapenv:Envelope>

This WSDL uses an RPC-Style Encoding you can see that by this by the namespace http://schemas.xmlsoap.org/soap/encoding/. What you can do is to match the message structure that you see in SOAPUI. You can do this by using Java/XSLT mapping and then in your SOAP Receiver CC, you check the Do Not Use SOAP Envelope option and then add the message transform bean to change the content type from application/xml to text/xml.

If you are able to make this work, please share to us what you did. If possible, a web blog will be of very much help. RPC WSDLs are not very much often tackled in PI because of WS-I (web service interoperability) problems.

Hope this helps,

Mark

Former Member
0 Kudos

Hi Mark,

Thanks for your response.

Yes, it seems to be a WSDL in RPC format.

The strange thing is that in the old interface we use exactly the same external definition (using "From All Available Message Definitions" and NOT "Using RPC style"). And for that one it works.

In the old interface we use also the following XSLT mapping after the message mapping:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:template match="/">
		<m:setEmployee xmlns:m="http://source.trax.aero">
			<xsl:copy-of select="."/>
		</m:setEmployee>
	</xsl:template>
</xsl:stylesheet>

Can you tell me what this mapping is exaclty doing?

Thanks in advance!

Former Member
0 Kudos

Could I also change the WSDL from RPC to document style?

Do you know a tutorial or blog for that?

I'm still wondering why it works for the old interface.

Thanks in advance.

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

Could I also change the WSDL from RPC to document style?

Do you know a tutorial or blog for that?

You can do that, but try executing a Document-Literal style request first to the webservice. If it works, then you can use it.

With regards to changing the WSDL from RPC to Document Style, you can refer to SAP Note 856597 - FAQ XI 30 PI 70 PI 71 SOAP Adapter. Go to section 8. Other Questions and look for Q: Does the RPC or Document style in WSDL play a role in the SOAP adapter? and Q: Can I convert an RPC styled WSDL to a document styled WSDL?. You can download SAP Notes using the tcode SNOTE -> ctrl+f8 and enter the SAP Note number. This note also contains an attachment about examples regarding Document Style and RPC Encoded.

Hope this helps,

Mark

Former Member
0 Kudos

I've now changed the setting of the external definition to "Using RPC style", but I'm still running into the same error than before:

10.02.2012 14:51:03 Information SOAP: sending a delivery error ack ...

10.02.2012 14:51:03 Error Adapter Framework caught exception: null

10.02.2012 14:51:03 Error MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException

10.02.2012 14:51:03 Information SOAP: sent a delivery error ack

10.02.2012 14:51:03 Error Delivering the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException.

The payload of the CC looks exactly the same than before:


<?xml version="1.0" encoding="UTF-8"?>
<m:setEmployee xmlns:m="http://test.com" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<ns1:e xmlns:ns1="http://test.com">
		<address_Mail_Incoming_Type>
			<email>test.com</email>
			<phone>123</phone>
		</address_Mail_Incoming_Type>
		<badge_ID>123</badge_ID>
		<cost_Center>123</cost_Center>
		<date_Hired>1990-01-01T00:00:00.000Z</date_Hired>
		<date_Of_Birth>1950-01-01T00:00:00.000Z</date_Of_Birth>
		<department>123</department>
		<division>ABC</division>
		<employee_Category>PERM</employee_Category>
		<employee_Code>1000</employee_Code>
		<employee_Id>1000</employee_Id>
		<employee_Status>ACTIVE</employee_Status>
		<first_Name>A</first_Name>
		<last_Name>B</last_Name>
		<location>ABC</location>
		<position>123</position>
	</ns1:e>
</m:setEmployee>

If I copy that payload (without <?xml version="1.0" encoding="UTF-8"?>) into SOAPUI (surrounded by SOAP envelope), the WS call works without any problem.

Why doesn't it work from PI?

Another question:

Why is it putting <ns1:e> into the payload of the new interface and <ns0:e> for the existing interface (which is working, see )?

Could that be the reason why data is not sent properly to the SOAP receiver?

Former Member
0 Kudos

Hi evreybody,

your help would be much apprciated

I'm really getting frustrated, because I'm stucked with that issue for a long time now.

What would you do if you would have the same problem?

Translate the WSDL to document style?

Why do I still get the error message in the CC monitoring, but the payload copied into SOAPUI works?

Thanks in advance!

Former Member
0 Kudos

Issue is solved.

It was caused due a space in field cost_Center (e.g. '123 ')...

A trim() resolved the issue.

Attention: The space was not visible in CC monitoring (only if you do a right-click->ViewSource in the payload)!!!

I lost some days/nerves because of that issue...

The question is: Why did it work in SOAPUI?

Is SOAPUI deleting spaces before calling the WS?

baskar_gopalakrishnan2
Active Contributor
0 Kudos

Though your WSDL URL works in SOAPUI, I want you to open the WSDL and search for wsdl:location tag and see what is given URL and see that matches with the URL string you entered in the communication channel.

Questions:

1) Have you specified any advanced parameters in the channel?

2) Most likely action is not required. You can leave that field blank.

former_member184681
Active Contributor
0 Kudos

Hi Eddie,

Did you provide the SOAP Action to be used in the CC configuration? It might be required for delivering the message, although is it not required in CC config in ID. You can find the Action to be used in your .wsdl file.

Hope this helps,

Greg