Author |
Message
|
jainsk |
Posted: Mon Jul 12, 2004 9:28 am Post subject: xml as run time in message set |
|
|
Novice
Joined: 15 Jun 2004 Posts: 13
|
hi,
i have imported xml schema into message set and i added physical format as XML format and i runtime tab i have specified it as XML. while generating the output i am getting the following error
ParserException BIP5010E: XML Writing Errors have occurred.
Errors have occurred during writing of XML.
Review further error messages for an indication to the cause of the errors.
ParserException BIP5005E: No valid body of the document could be found.
There should be one, and only one, top level element of type Element or EmptyElement and this is not the case for the current message.
Check that the XML message being passed in is a well formed XML message that adheres to the XML specification and that only one of the above exists as a child of the root. |
|
Back to top |
|
 |
catwood2 |
Posted: Mon Jul 12, 2004 12:01 pm Post subject: |
|
|
Centurion
Joined: 17 May 2002 Posts: 108
|
Can you post sample message? |
|
Back to top |
|
 |
kirani |
Posted: Mon Jul 12, 2004 4:42 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
And also the ESQL code you are using to transform input message to XML format. It seems the output message has more than one top level elements.
Put a trace node before your MQOutput node to capture the message. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
jainsk |
Posted: Tue Jul 13, 2004 10:47 am Post subject: |
|
|
Novice
Joined: 15 Jun 2004 Posts: 13
|
The ouput i am expecting is of this form
<addData xmlns:xsi="http://www.w3.org/2001/XMLSchema>
<Profile>
<name>jain</name>
<id>20056</id>
</profile>
<contact_data>
<phone>256895989</phone>
<mailid>jain@hotmail.com</mailid>
</contact_data>
</addData>
ESQL code
SET "OutputRoot"."XML"."Profile"."name" = InputRoot.XML.Msg.tmp.profile.name;
SET "OutputRoot"."XML"."Profile"."id" = InputRoot.XML.Msg.tmp.profile.id;
SET "OutputRoot"."XML"."contact_data"."phone" = InputRoot.XML.Msg.tmp.contact_data.phone;
i have created a schema addData having reference to these individul schemas. If i choose MRM as Parser in the runtime tab of message set , it is working fine. |
|
Back to top |
|
 |
jefflowrey |
Posted: Tue Jul 13, 2004 11:15 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
jainsk wrote: |
SET "OutputRoot"."XML"."Profile"."name" = InputRoot.XML.Msg.tmp.profile.name;
|
This will create a top, root level element called "Profile".
jainsk wrote: |
SET "OutputRoot"."XML"."contact_data"."phone" = InputRoot.XML.Msg.tmp.contact_data.phone; |
This will create a top, root level element called "contact_data".
If you want both "Profile" and "contact_data" to be children of "addData", then you need to say OutputRoot.XML.addData.Profile and OutputRoot.XML.addData.contact_data. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
shanson |
Posted: Fri Jul 16, 2004 5:24 am Post subject: |
|
|
 Partisan
Joined: 17 Oct 2003 Posts: 344 Location: IBM Hursley
|
Btw - you don't need to add an XML physical format, this is only used when the runtime parser is 'MRM'. |
|
Back to top |
|
 |
|