on 05-24-2006 6:21 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.