on 10-06-2006 3:33 PM
Hello everybody,
we got a problem with multi-mapping.
Source and target message-type are the same:
<xsd:element name="MY_MESSAGE_TYPE">
_<xsd:element name="BUSTRANS">
__<xsd:element name="CHILD_1" maxOccurs="unbounded">
___<xsd:element name="SUB_CHILD_1" maxOccurs="unbounded">
____<xsd:element name="SUB_CHILD_1_NAME" type="xsd:string">
__<xsd:element name="CHILD_2" maxOccurs="unbounded">
___<xsd:element name="SUB_CHILD_2" maxOccurs="unbounded">
____<xsd:element name="SUB_CHILD_2_NAME" type="xsd:string">
The requirements are:
<xsd:element name="MY_MESSAGE_TYPE"> should be created as often as <xsd:element name="CHILD_2"..> occurs
a) so we mapped
CHILD_2 -> MY_MESSAGE_TYPE
BUSTRANS -> CopyValue -> BUSTRANS
CHILD_1 -> CopyValue -> CHILD_1
SUB_CHILD_1 -> CopyValue -> SUB_CHILD_1
SUB_CHILD_1_NAME -> CopyValue -> SUB_CHILD_1_NAME
CHILD_2 -> splitByValue(eachValue) -> CHILD_2
The problem is:
If we duplicated
a) SUB_CHILD_1
b) subtree CHILD_2 (so 2 messages will be generated)
for testing, SUB_CHILD_1 only occurs 1 time! But we need it in every target message as often as it occurs in the source message.
For your testing, here is the datatype:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://enbw.com/XI/SAPCRMB2B/javamappings_test" targetNamespace="http://mynamespace.com/XI/SAPCRMB2B/javamappings_test">
<xsd:complexType name="MultipleBookingOrderRequest">
<xsd:sequence>
<xsd:element name="BUSTRANS">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="CHILD_1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SUB_CHILD_1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SUB_CHILD_1_NAME" type="xsd:string">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="CHILD_2" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SUB_CHILD_2" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="SUB_CHILD_2_NAME" type="xsd:string">
</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>
Regards
Dominic
Hi Dominic,
You need to change the occurrence. For testing purpose, you can right click and create one more.
I hope this helps.
Regards.
Praveen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Mario,
<i>multimapping (split IDOC into several IDocs) is possible with IDocs. We did it!</i>
Did you use IDOC packaging for this?
AFAIK,when you use multimapping that involves different adapters including one J2EE adapter and a IDOC adapter in the inbound side, multi mapping does not work.
Regards,
Bhavesh
User | Count |
---|---|
81 | |
25 | |
12 | |
9 | |
7 | |
6 | |
5 | |
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.