ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » No root element was found while writing the XML

Post new topic  Reply to topic
 No root element was found while writing the XML « View previous topic :: View next topic » 
Author Message
kumar.MBMQ
PostPosted: Wed Mar 21, 2012 5:09 am    Post subject: No root element was found while writing the XML Reply with quote

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
View user's profile Send private message
lancelotlinc
PostPosted: Wed Mar 21, 2012 5:10 am    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Wed Mar 21, 2012 5:15 am    Post subject: Reply with quote

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
View user's profile Send private message
Esa
PostPosted: Wed Mar 21, 2012 5:21 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » No root element was found while writing the XML
Jump to:  



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
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.