cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping error when trying to test SOAP message from RWB

Former Member
0 Kudos

Hi all,

I am very new to XI and I will like to get some advise for testing an asynchronous interface:

SOAP -> XI -> File

To test the interface:

I logged into RWB - Component Monitoring - Adapter Engine - Test Message:

URL: http://ootspdbs02:50100/XISOAPAdapter/MessageServlet?channel=:BS_RON_TEST:SOAP_Sender_Test

Service: BS_RON_TEST

Interface: MI_TestWebServiceServer_UpdatePatAdmissInfo

Interface Namespace: urn:test:ron:fapl:TestWebServiceServer

QOS: EO

Payload (I generated this from XMLSpy with the WSDL generated in Integration Directory):

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns0="urn:OOTSUpdatePatientAdmissionInfoWsd">

<SOAP-ENV:Body>

<m:MI_TestWebServiceServer_UpdatePatAdmissInfo xmlns:m="urn:test:ron:fapl:TestWebServiceServer">

<ns0:Header>

<ns0:encoding>String</ns0:encoding>

<ns0:sendingApp>String</ns0:sendingApp>

<ns0:sendingFac>String</ns0:sendingFac>

<ns0:receivingApp>String</ns0:receivingApp>

<ns0:receivingFac>String</ns0:receivingFac>

<ns0:timeStamp>2001-12-17T09:30:47.0Z</ns0:timeStamp>

<ns0:messageType>String</ns0:messageType>

<ns0:messageId>String</ns0:messageId> <ns0:messageDesc>String</ns0:messageDesc>

</ns0:Header>

<ns0:patientID>String</ns0:patientID>

<ns0:institutionID>String</ns0:institutionID>

<ns0:caseNumber>String</ns0:caseNumber>

<ns0:admissionDateTime>2001-12-17T09:30:47.0Z</ns0:admissionDateTime>

<ns0:ward>String</ns0:ward>

<ns0:bed>String</ns0:bed>

<ns0:room>String</ns0:room>

<ns0:movementCategory>String</ns0:movementCategory>

<ns0:movementType>String</ns0:movementType>

</m:MI_TestWebServiceServer_UpdatePatAdmissInfo>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

The error I got in SXMB_MONI is:

<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>

- <!-- Request Message Mapping

-->

- <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">

<SAP:Category>Application</SAP:Category>

<SAP:Code area="MAPPING">EXCEPTION_DURING_EXECUTE</SAP:Code>

<SAP:P1>com/sap/xi/tf/_MM_TestWebServerService_UpdatePatA~</SAP:P1>

<SAP:P2>com.sap.aii.utilxi.misc.api.BaseRuntimeException</SAP:P2>

<SAP:P3>RuntimeException in Message-Mapping transformatio~</SAP:P3>

<SAP:P4 />

<SAP:AdditionalText />

<SAP:ApplicationFaultMessage namespace="" />

<SAP:Stack><b>com.sap.aii.utilxi.misc.api.BaseRuntimeException thrown during application mapping com/sap/xi/tf/_MM_TestWebServerService_UpdatePatA: RuntimeException in Message-Mapping transformatio</b></SAP:Stack>

<SAP:Retry>M</SAP:Retry>

</SAP:Error>

<Trace level="1" type="T"><b>com.sap.aii.utilxi.misc.api.BaseRuntimeException: RuntimeException in Message-Mapping transformation: Cannot produce target element /ns1:MT_TestMsg/CaseNumber. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd at com.sap.aii.mappingtool.tf3.AMappingProgram.start(AMappingProgram.java:303) at .....</b>

The message mapping consists of direct maps from each field in the source to the target (MT_TestMsg).

CaseNumber is the first field to be mapped.

In IR, I tested the interface and it works fine - no error in mapping.

I assume I cannot use the message generated in IR, because the SOAP envelope is required. (I tried anyway, and encountered the same error.)

Please advise how I can resolve this error.

Many thanks in advance.

Ron

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I am running into the exact same problem; has anyone resolved this?

udo_martens
Active Contributor
0 Kudos

Hi Ron,

the test modus at RTW sends a message via http directly to integration engine. The SOAP sender adapter removes the "envelope", the mapping is executed after. If you want to test only the mapping it is easier to use test modus in IB Repository. If you want to test by RTW then send once a message to XI adapter and save payload from SXMB_MONI, which you can use now for testing.

Regards,

Udo

Former Member
0 Kudos

Hi Udo,

I've tested the mapping in IB and it works fine.

My objective is to conduct end-to-end testing, that's why I'm using the RTW.

Can you please show me how to extract the message from SXMB_MONI?

The huge XML in SXMB_MONI is overwhelming for a beginner like myself.

Please help.

Thanks.

Ron

udo_martens
Active Contributor
0 Kudos

Hi Ron,

click in the left side navigation frame "Inbound Message / Payloads / Main Document ( )".

Then Context "View Souce" on it to get the Source code, save as myMsg.xml. You have to open and copy with notepad coz of letter - (minus), which is displayed in Internet Explorer for nodes. SXMB_MONI is a splitter container application with included internet explorers.

Regards,

Udo

Former Member
0 Kudos

Hi Wee,

Can you test your input XMl by removing the Soap Header in Mapping if works then try to check your soap header.

Please reward points

Regards

Sreeram.G.Reddy

Former Member
0 Kudos

Hi Sreeram,

I tried this payload in RWB but I encounter the same error.

<m:MI_TestWebServiceServer_UpdatePatAdmissInfo xmlns:m="urn:test:ron:fapl:TestWebServiceServer">

<ns0:Header>

<ns0:encoding>String</ns0:encoding>

<ns0:sendingApp>String</ns0:sendingApp>

<ns0:sendingFac>String</ns0:sendingFac>

<ns0:receivingApp>String</ns0:receivingApp>

<ns0:receivingFac>String</ns0:receivingFac>

<ns0:timeStamp>2001-12-17T09:30:47.0Z</ns0:timeStamp>

<ns0:messageType>String</ns0:messageType>

<ns0:messageId>String</ns0:messageId>

<ns0:messageDesc>String</ns0:messageDesc>

</ns0:Header>

<ns0:patientID>String</ns0:patientID>

<ns0:institutionID>String</ns0:institutionID>

<ns0:caseNumber>String</ns0:caseNumber>

<ns0:admissionDateTime>2001-12-17T09:30:47.0Z</ns0:admissionDateTime>

<ns0:ward>String</ns0:ward>

<ns0:bed>String</ns0:bed>

<ns0:room>String</ns0:room>

<ns0:movementCategory>String</ns0:movementCategory>

<ns0:movementType>String</ns0:movementType>

</m:MI_TestWebServiceServer_UpdatePatAdmissInfo>

former_member187339
Active Contributor
0 Kudos

Hi,

Can you define your DT here!!! and try clearing the text box named XML Namespace when you creat MT for the SOAP side

Regards

Suraj

Former Member
0 Kudos

Hi Wee can you compare the XMl you pasted and XML in test tab both should be same if they are not same then your input XML is wrong

Thanks

Sreeram.G.Reddy

Former Member
0 Kudos

Hi all,

I notice the tag and namespaces are changed when I generate the XML from the WSDL.

I am expecting something this format in IR:

<?xml version="1.0" encoding="UTF-8"?>

<ns0:updatePatientAdmissionInfo xmlns:ns0="urn:OOTSUpdatePatientAdmissionInfoWsd">

<ns0:Header>

<ns0:encoding/>

<ns0:sendingApp/>

<ns0:sendingFac/>

<ns0:receivingApp/>

<ns0:receivingFac/>

<ns0:timeStamp/>

<ns0:messageType/>

<ns0:messageId/>

<ns0:messageDesc/>

</ns0:Header>

<ns0:patientID/>

<ns0:institutionID/>

<ns0:caseNumber/>

<ns0:admissionDateTime/>

<ns0:ward/>

<ns0:bed/>

<ns0:room/>

<ns0:movementCategory/>

<ns0:movementType/>

</ns0:updatePatientAdmissionInfo>

However, the message generated is :

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" <b>xmlns:ns0="urn:OOTSUpdatePatientAdmissionInfoWsd"></b>

<SOAP-ENV:Body>

<b><m:MI_TestWebServiceServer_UpdatePatAdmissInfo xmlns:m="urn:test:ron:fapl:TestWebServiceServer" ></b>

<ns0:Header>

<ns0:encoding>String</ns0:encoding>

<ns0:sendingApp>String</ns0:sendingApp>

<ns0:sendingFac>String</ns0:sendingFac>

<ns0:receivingApp>String</ns0:receivingApp>

<ns0:receivingFac>String</ns0:receivingFac>

<ns0:timeStamp>2001-12-17T09:30:47.0Z</ns0:timeStamp>

<ns0:messageType>String</ns0:messageType>

<ns0:messageId>String</ns0:messageId> <ns0:messageDesc>String</ns0:messageDesc>

</ns0:Header>

<ns0:patientID>String</ns0:patientID>

<ns0:institutionID>String</ns0:institutionID>

<ns0:caseNumber>String</ns0:caseNumber>

<ns0:admissionDateTime>2001-12-17T09:30:47.0Z</ns0:admissionDateTime>

<ns0:ward>String</ns0:ward>

<ns0:bed>String</ns0:bed>

<ns0:room>String</ns0:room>

<ns0:movementCategory>String</ns0:movementCategory>

<ns0:movementType>String</ns0:movementType>

<b></m:MI_TestWebServiceServer_UpdatePatAdmissInfo></b>

</SOAP-ENV:Body>

</SOAP-ENV:Envelope>

The namespace and the root tag is changed!

I think this might be causing the problem.

But how do I resolve it?

former_member187339
Active Contributor
0 Kudos

Hi,

Hope you have followed these steps:

1) Created DT for Soap

2) Created MT for Soap, using above created DT (here make the XML namespace as blank)

3) Created MI for Soap, using above created MT

And the created the wsdl file giving corretc entries...

Regards

Suraj

Former Member
0 Kudos

Hi,

Here are the steps I took:

Integration Repository:

1. I defined a WSDL file - contains request message and a fault message.

2. With this WSDL file, in Integration Repository, I performed an "Import External Definition", type wsdl. This step generates the MTs defined in the WSDL. Hence I did not have to generate DT/MT manually.

3. With the MT, I created an MM. (DT/MT of the target message format was created seperately)

4. With the MT, I created an MI (Message Interface) and IM (Interface Mapping).

5. Activate the objects.

Integration Directory:

6. After activating the objects in IR, I created communication channel - SOAP_SENDER, with the default interface and namespace pointing to what I defined in step 1~5. The quality of service was set to Exactly Once.

7. I created a sender agreement, using the communication channel I defined in (6) and linking to the MI defined above.

8. Created a receiver determination, that uses the MI, MM and IM that was defined in step (1) ~ (6).

9. Link the communication channel to a File Receiver (previously created).

10. I created a WSDL by "Tools - Define Web Service".

11. URL of Web Server - I clicked "Propose URL". It gave http://10.11.129.47:8001/sap/xi/engine?type=entry

However later I changed this to the SOAPAdapter URL

12. Interface & Namespace - I chose the outbound MI I defined in (4).

13. Sender - I used the Service, Interface Name, Interface Namespace I defined in (4) as well.

14. A WSDL file is generated again. (This is slightly different from the version I used in step (1).

15. With the XI generated WSDL, I used XMLSPY to generate a sample message.

Test:

10. I did a test by using a HTTP client tool, and sending directly into the MI, and it works fine. The mapping was complete and the file was created.

11. I tried using the RWB to send a test soap message (Generated in XI) into the SOAP Adapter, but encountered a mapping exception.

Please tell me if what I did is correct.

Thanks.

Ron