cancel
Showing results for 
Search instead for 
Did you mean: 

Message Mapping issue in IR

Former Member
0 Kudos

This is my source XSD:

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://jcp.com" targetNamespace="http://jcp.com">

<xsd:element name="User_MT" type="User_DT" />

<xsd:complexType name="User_DT">

<xsd:annotation>

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

a94dbdc0eadc11da8d5100111120e6db

</xsd:appinfo>

</xsd:annotation>

<xsd:sequence>

<xsd:element name="username" type="xsd:string">

<xsd:annotation>

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

953667c0ea6811dacda1c5450a070124

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="password" type="xsd:string">

<xsd:annotation>

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

953b22b0ea6811daa869c5450a070124

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

and this is my target message XSD.

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://jcp.com" targetNamespace="http://jcp.com">

<xsd:element name="Users_DB_MT" type="Users_DB_DT" />

<xsd:complexType name="Users_DB_DT">

<xsd:annotation>

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

a954c2a0eadc11da8f6400111120e6db

</xsd:appinfo>

</xsd:annotation>

<xsd:sequence>

<xsd:element name="Statement">

<xsd:annotation>

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

084e3620ea6911da888cc5450a070124

</xsd:appinfo>

</xsd:annotation>

<xsd:complexType>

<xsd:sequence>

<xsd:element name="Users">

<xsd:annotation>

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

084e3621ea6911da8da4c5450a070124

</xsd:appinfo>

</xsd:annotation>

<xsd:complexType>

<xsd:sequence>

<xsd:element name="action" type="xsd:string">

<xsd:annotation>

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

5228c440ea6911dab364c5450a070124

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="access">

<xsd:annotation>

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

084e3625ea6911dab7e8c5450a070124

</xsd:appinfo>

</xsd:annotation>

<xsd:complexType>

<xsd:sequence>

<xsd:element name="role" type="xsd:string">

<xsd:annotation>

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

084e3626ea6911daac7dc5450a070124

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

<xsd:element name="key">

<xsd:annotation>

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

26f6dff0ea6911da8157c5450a070124

</xsd:appinfo>

</xsd:annotation>

<xsd:complexType>

<xsd:sequence>

<xsd:element name="username" type="xsd:string">

<xsd:annotation>

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

26f6dff1ea6911daca4dc5450a070124

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

<xsd:element name="password" type="xsd:string">

<xsd:annotation>

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

26f6dff2ea6911da8c30c5450a070124

</xsd:appinfo>

</xsd:annotation>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:element>

</xsd:sequence>

</xsd:complexType>

</xsd:schema>

and I mapped

Users_MT->Statement

username->username

password->password.

When iam testing am getting the following error:

Mapping object Users_MM incomplete. Unable to continue execution

leaf node with minOccurs>0 and without mapping

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member187339
Active Contributor
0 Kudos

Hi,

In your target structure both <b>action</b> and <b>role </b>are mandatory and you haven't defined any mapping for them, thats why you are getting this error.

This is your target XML

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

<ns0:Users_DB_MT xmlns:ns0="http://jcp.com">

<Statement>

<Users>

<action></action>

<access>

<role></role>

</access>

<key>

<username></username>

<password></password>

</key>

</Users>

</Statement>

</ns0:Users_DB_MT>

Regards

Suraj

Message was edited by: S.R.Suraj

Former Member
0 Kudos

Hi,

The nodes other than username and password whose minimum occurance is not specified as zero will default will have occurance 1.so it has to be mapped to some values or eithe constants.

So if u want only username and passwordw to be mapped then u need to change the <b>minoccurs of other nodes to zero.</b>

u get this error since u haven't specified the occurance of other nodes to zero.

regards

jithesh

Former Member
0 Kudos

Hi Datta,

Are there any mandatory fields on the receiver side that you have not mapped.

occurance 1..1 or occurance 1..unbounded

Regards

vijaya