Skip to Content
0

Cannot create a target element

Mar 20, 2017 at 11:47 AM

198

avatar image

Dear Experts,

My scenario is to call a webservice from PI and recieve the response to PI.

Third party has shared a WSDL and while testing it in SOAP UI ,it is giving a empty response.

I want to test the same case using SAP PI,imported the WSDL in PI and

created synchronous scenario,where PI sends the data and should receive the response

I have used a SOAP receiver channel.

While manually sending data in RWB,i have received the following error message

Error While Sending Message: Error stack from response: Runtime exception occurred during application mapping com/sap/xi/tf/_MM__; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns1:MT_. Values missing in queue context. Target XSD requ~

Please note third party WSDL is accessed only from their environment.

1)The above error occurs due to Firewall block

2)Is it due to because of empty data which comes as response

Please suggest.

Regards,

Kalpana.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

5 Answers

Andrzej Filusz Mar 20, 2017 at 11:53 AM
1

Hi Kalpana,

Please read the detail error message to find out which field is required. Then you would be able to check your mapping and decide if this field is really required/needed in the target message.

As I understand your case, you have a required field in the target message and because you receive an empty response that's why you get an error during mapping.

Regards,

Andrzej

Share
10 |10000 characters needed characters left characters exceeded
Iñaki Vila Mar 20, 2017 at 03:10 PM
0

Hi Kalpana,

I think your endpoint is throwing an exception and the PI is receiving an unexpected payload at mapping level.

Regards.

Share
10 |10000 characters needed characters left characters exceeded
Kalpana Subbiah Mar 21, 2017 at 04:27 AM
0

Dear All,

Thanks for your response.I have added below parameters in the channel

AF_Modules/MessageTransformBean

Transform.ContentType text/xml;charset=UTF-8

XMBWS.NoSOAPIgnoreStatusCode true

and now when i send the data from RWB with Best Effort ,it is givingError as

: Additional error text from response: com.sap.engine.interfaces.messaging.api.exception.MessagingException: No response available.

<SAP:AdditionalText>com.sap.engine.interfaces.messaging.api.exception.MessagingException: No response available.</SAP:AdditionalText>

Also note the channel is working fine ,Message call completed successfully.

Is it because of null response.

Please suggest.

Regards,

Share
10 |10000 characters needed characters left characters exceeded
Iñaki Vila Mar 21, 2017 at 07:26 AM
0

Hi Kalpana,

is It your scenario async or sync?, i think your scenario is async and it gives a response only in the fault cases. If it is your case, the solution is not easy: https://archive.sap.com/discussions/thread/3265950, i thin the easier way is to do a dummy receiver interfaces and to do the WS call at mapping level or to do async/sync bridge.

Regards.

Share
10 |10000 characters needed characters left characters exceeded
Kalpana Subbiah Mar 29, 2017 at 12:51 PM
0

Dear Inaki,

Sorry for the late reply.The scenario approach we decided is synch .

Let me brief the approach once again

PI needs to call webservice and pick up the response back .Now in this case

1)Consumed third party WSDL and did all message mapping and configuration.

While testing the data from RWB,recieving the following error message.

Error While Sending Message: Error stack from response: Runtime exception occurred during application mapping com/sap/xi/tf/_MM__; com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns1:MT_. Values missing in queue context. Target XSD requeest

Now

.I have tested the webservice in SOAP UI it works fine .

But When i replace the SOAP UI payload with PI payload(taken from message mapping ,and gives response error as Server not able to read request.

I have attached the document which shows the testing of webservice with PI Payload in SOAP UI.

Then i found there is CDATA found in the PI payload,when i remove it and run in SOAP UI it gives response.

Please suggest how to remove this CDATA or does this CDATA creates an issue while sending data from PI.

Please suggest.

Regards,

Kalpana


soap-ui.png (10.9 kB)
soap-ui2.png (8.8 kB)
Share
10 |10000 characters needed characters left characters exceeded