on 08-05-2008 1:37 PM
Hi,
I have an issue where the top node of my XML message needs to have a value assigned.
i.e.
<REPORT>xxxxxxxx
<ID>xxxxx</ID>
<CUST>xxxxx</CUST>
</REPORT>
Is this possible using standard graphical mapping or will I need to resort to XSLT mapping to achieve this ?
Cheers
Colin.
Hi
The top node can have values if you map it with some value or source field. But for that the Target XSD (ext defn) schema need to cater to that requirement, something like,
<xs:element name="REPORT">
<xs:annotation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:element name="ID" type="*******" />
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
Please study if the xml schema definition allows this.........then hopefully it is possible to map the top node.
Regards,
Suddha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
At the beginning I thought that this is not well-formed XML message, did a test in XMLSpy and it looks like it a well-formed XML message.
> <REPORT>xxxxxxxx
> <ID>xxxxx</ID>
> <CUST>xxxxx</CUST>
> </REPORT>
I created XSD that describe this message, imported into IR, did some basic (one-to-one) message mapping (output and input structures are the same).
Output message:
<?xml version="1.0" encoding="UTF-8"?>
<REPORT>
dfasdf
<ID>12</ID>
<CUST>dfff</CUST>
</REPORT>
After mapping I got:
<?xml version="1.0" encoding="UTF-8"?>
<REPORT>
<ID>12</ID>
<CUST>dfff</CUST>
</REPORT>
Looks like you should rather forget the graphical mapping
Jakub
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
i agree with Aamir.
in Data Type add an attribute for the node.
Thanks
Rodrigo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
Did you try defining an attribute for <REPORT> node?
If not,please give it a try and let us know
Thanx
Aamir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
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.