cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot create a target element

Former Member
0 Kudos

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.

Accepted Solutions (0)

Answers (5)

Answers (5)

Andrzej_Filusz
Contributor

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

Former Member
0 Kudos

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

iaki_vila
Active Contributor
0 Kudos

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.

Former Member
0 Kudos

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,

iaki_vila
Active Contributor
0 Kudos

Hi Kalpana,

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

Regards.