|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
No root element was found while writing the XML |
« View previous topic :: View next topic » |
Author |
Message
|
kumar.MBMQ |
Posted: Wed Mar 21, 2012 5:09 am Post subject: No root element was found while writing the XML |
|
|
Voyager
Joined: 06 May 2011 Posts: 93
|
when i am trying to debug, i got the below error please suggest.
below error pops up.
ext:CHARACTER:No root element was found while writing the XML message.
i am sending the below xml file as input. is my xml file is good ?
<xml>
<FooBar zip="01803">
<foo>34</foo>
<Class>35</Class>
<zip>02149</zip>
</FooBar>
</xml>
-------------------------------
below is the xsd ,i am using
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
jxb:version="2.0">
<!-- Demonstrate how to fix this keyword usage error. -->
<xs:element name="Class" type="xs:int"/>
<xs:element name="FooBar" type="FooBar"/>
<xs:complexType name="FooBar">
<xs:sequence>
<xs:element name="foo" type="xs:int"/>
<xs:element ref="Class"/>
<!-- collision between attribute and element with same name, zip -->
<xs:element name="zip" type="xs:int"/>
</xs:sequence>
<xs:attribute name="zip" type="xs:string"/>
</xs:complexType>
</xs:schema> |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed Mar 21, 2012 5:10 am Post subject: |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
Please post your MustGather docs. No one could help you unless we see the logs. Also, USE CODE TAGS. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Mar 21, 2012 5:15 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
It is talking about when you try and WRITE the document, not when you try and PARSE the INPUT.
So the problem is your transformation is creating a bad message.
Take a user trace, read what it says, think about what it says, adjust your code.
http://www-01.ibm.com/support/docview.wss?&uid=swg21177321
Learn the User Trace, and it will be much more helpful than the debugger. |
|
Back to top |
|
 |
Esa |
Posted: Wed Mar 21, 2012 5:21 am Post subject: |
|
|
 Grand Master
Joined: 22 May 2008 Posts: 1387 Location: Finland
|
The root tag of your input message is "xml".
Are you sure this is the way you want it? |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|