cancel
Showing results for 
Search instead for 
Did you mean: 

problem with mapping

Former Member
0 Kudos

Hello All

NWPI 7.1

I'm trying to implement simple integration model, just to refresh and test information gained on courses and I've got stuck a bit.

When I try to test the configuration (Menu Tools->Test Configuration) process goes as follows:

correct Sender Agreement

correct Receiver Determination

correct Interface Determination

Runtime error on Operation Mapping:

com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:NameMessage. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD

Mapping seems to be ok - testing in ESR gives correct result. Besides it is very simple - interface is synchronous, request is one string and response is another.

Where to check for a bug?

BTW: as payload for testing purposes in PI I use XML copied from testing window of WSNavigator.

Any help will be appreciated

Best regards

Maciej Gottfried

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos
Cannot create target element /ns0:NameMessage

ns0:NameMessage seems to be the root element of your message and may have occurence as 1..1 (i.e. mandatory) in such a case no need to map it to any source node...remove the mapping for this node and then test again.....

Also use the same payload as you are using in IR to test the Mapping...

Regards,

Abhishek.

Former Member
0 Kudos

Yes, you're right - this is root element because whole message is built of one field. I've tried to remove maping at all, but I get this error:

Target field mapping '/ns0:NameMessage' incomplete; reason: Mapping for target field '/ns0:NameMessage' incomplete

Source XSD:

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

<xsd:schema targetNamespace="http://test.company.pl" xmlns="http://test.company.pl" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:element name="NameMessageOut" type="Name"/>

<xsd:simpleType name="Name">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/VersionID">bbda09a16c9111de91e300155df86b14</xsd:appinfo>

</xsd:annotation>

<xsd:restriction base="xsd:string"/>

</xsd:simpleType>

</xsd:schema>

Destination:

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

<xsd:schema targetNamespace="http://test.company.pl" xmlns="http://test.company.pl" xmlns:xsd="http://www.w3.org/2001/XMLSchema">

<xsd:element name="NameMessage" type="Name"/>

<xsd:simpleType name="Name">

<xsd:annotation>

<xsd:appinfo source="http://sap.com/xi/VersionID">3e31fa616bbc11de926500155df86b14</xsd:appinfo>

</xsd:annotation>

<xsd:restriction base="xsd:string"/>

</xsd:simpleType>

</xsd:schema>

Mapping is just NameMessageOut -> NameMessage - both are 1..1

regards

Maciej

Former Member
0 Kudos

The error is because the element 'NameMessage' in the target is mandatory.

So you will have to retain the mapping for this field.

Good blog to understand message mapping

/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i

Edited by: Manjusha Nair on Jul 14, 2009 1:37 PM

former_member200962
Active Contributor
0 Kudos
this is root element because whole message is built of one field. I've tried to remove maping at all, but I get this error

if it is the only element present in your target structure then do not remove the mapping....you will need it then

Former Member
0 Kudos

So I thought.

By the way: what is the correct payload to test this case (I've described it in my initial post) ?

In the mapping editor I just provide simple text as input and it correctly gets transported to the other end of mapping.

In test tool for configuration in Integration Builder I've used XML from WebService call and maybe it's wrong? When I've used just simple "abcd" as payload I've received exception:

com.sap.aii.utilxi.misc.api.BaseRuntimeException: Content is not allowed in prolog.

Could you provide me some sample of payload in this test tool?

regards

Maciej

former_member200962
Active Contributor
0 Kudos

IR -->Open your Message/ Interface Mapping ---> Test Tab > Enter some value in the Source structure->Switch to the Source view(click on the SRC button)-> You will see the payload-> use this payload to test

Former Member
0 Kudos

And that was the problem! I've used incorrect payload - that's why I couldn't find error in configuration.

Thank you very much.

Best Regards

Maciej

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi!

Did you try to refresh message type in Message Interface and use 'read interfaces' option in Interface Mapping? The problem could be caused by previous MT definition.

Regards,

Radek

Former Member
0 Kudos

A mandatory element in the target seems not mapped..or some issue with the payload.

Try using the same payload and test in your mapping(instead of manually entering the value).

Can you paste the source and target structure along with the mapping you have done.