on 12-19-2008 1:00 PM
Hi,
I am doing this scenario
In the design part of the mapping.
How can I perform the message mapping
"
Step 1. We are controlling occurrence of Output Piyush_msg_out_3 by mapping it with element2 with message context.
Step 2.
We are using u201CUseOneAsManyu201D under category node functions (SP14). It has three inputs ;
1. Element which is going to be used for multiple times. In our case it is Element1 with message context.
2. The element which is going to define how many times it will be replicated. Important thing, context should be same.
3. Same as second input but with its own context in our case it is Element2.
"
For Step 1,
I have mapped piyush_msg_out_3 with Element2 (context is root)
For Step 2,
I have mapped
Element1(context root)----
|
Element2(context root)----
| useOneAsMany -
>Element1
Element2(context root)----
|
subelement------> subelement
I did not do root mapping.
when do the test I am getting the following error
Start of test
Compilation of MM_multimappingandoptimizing successful Cannot produce target element
/ns0:Messages/ns0:Message1/ns1:piyush_msg_out_3[2]/root/Element1. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd Cannot produce target element
/ns0:Messages/ns0:Message1/ns1:piyush_msg_out_3[2]/root/Element1. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
End of test
I thought error generated due to Parent Node condition fails, How do I map the Top node,
even though I mapped root------->root, I am getting the same error in the instance test
Please give me some suggestions
my message mapping is correct or do I need to change the context of the node or what should I have to do ?
thanks
manian
Dear Manian,
If you are still getting the same error: try this option go and check Your Message type, and see check the tab XSD. If you are able to see complete xsd of your message type then it is fine. else please double check the namespace of your message type and namespace of your data type.
This is because at run time you are giving XML instance with one name space, but while testing it is expecting the xml instance from different name space.
If you are doing nothing wrong with above points then you can concentrate on mapping part.
I tried to concentrate much on XML instance because it is giving the Instance error.
Best Regards
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Praveen,
I have checked the XSD tab of Source and Target message types. I can see the complete XSD.
Source Message Type XSD:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:mlr:multimappingandoptimizing" targetNamespace="urn:mlr:multimappingandoptimizing">
<xsd:element name="piyush_msg_in_1" type="piyush_msg_in_1" />
<xsd:complexType name="piyush_msg_in_1">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
f1fd03a0cddd11ddc1c4001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="root">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
99ffb9e0cd1a11ddc6b0001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Element1" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
99ffb9e1cd1a11dd8843001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Element2" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
99ffb9e2cd1a11dd8f7a001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="subelement" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
99ffb9e3cd1a11dd8ff2001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
-
Target Message Type XSD:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:mlr:multimappingandoptimizing" targetNamespace="urn:mlr:multimappingandoptimizing">
<xsd:element name="piyush_msg_out_3" type="piyush_msg_out_3" />
<xsd:complexType name="piyush_msg_out_3">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
058e2b60cdde11ddaffd001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:sequence>
<xsd:element name="root">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
7fb0d7d0cd1b11dd99ae001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Element1" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
7fb0d7d1cd1b11ddc07e001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Element2">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
7fb0d7d2cd1b11dd9385001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="subelement" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
7fb0d7d3cd1b11dda9d7001cc01cef0d
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
thanks
manian
Hi Manian,
If you are trying to achieve multimapping, 1:n, I would recommend you to follow these two blogs :
[Multi-Mapping without BPM - Yes, itu2019s possible!|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3115] [original link is broken] [original link is broken] [original link is broken];
[Message Splitting Using the Graphical Mapping Tool|https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/3765] [original link is broken] [original link is broken] [original link is broken];
Thanks,
Pooja Pandey
Hi Manian,
Here is how you should do mapping for the structure given in
element2 (change context to top level ) ---->piyush_msg_out_3
element1 ( no change in context)
element2 ( top level context ) --------------->useOneAsMany ----> SplitByValue ----> element1
element2 ( no change in context)
element2 ---> splitByValue ----> Element2
subElement ---> SubElement
This should work for you .
Thanks,
Pooja
Dear Manian,
I hope error is due to Invalid XML instance for the source structure because error is explaining the same.
ns0:Messages/ns0:Message1/ns1:piyush_msg_out_3[2]/root/Element1. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd Cannot produce target element
/ns0:Messages/ns0:Message1/ns1:piyush_msg_out_3[2]/root/Element1. Check xml instance is valid for source xsd and target-field mapping fulfills requirements of target xsd
This means your test instance for Source structure is not a valid XML. try to open the same XML in Internet explorer.
If your mapping contains then it may give furthur error in the test environment.
Best Regards
Praveen Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Praveen for the reply
I did as you said. It is a valid xml instance. It is a valid one.
http://www.flickr.com/photos/33169400@N05/3119811629/
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
<ns0:Message1>
<ns1:piyush_msg_in_1 xmlns:ns1="urn:mlr:multimappingandoptimizing">
<root>
<Element1>E11</Element1>
<Element2>
<subelement>sub1</subelement>
</Element2>
<Element2>
<subelement>sub2</subelement>
</Element2>
</root>
</ns1:piyush_msg_in_1>
</ns0:Message1>
</ns0:Messages>
thanks
manian
Edited by: manian on Dec 19, 2008 8:20 AM
User | Count |
---|---|
95 | |
11 | |
11 | |
10 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.