473,568 Members | 2,762 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ISoapFormatter - System.Xml.XmlE xception: The root element is missing

Hi,
I'm trying to use the Microsoft.Web.S ervices2.Messag ing.
ISoapFormatter

but I receive this error:
System.Xml.XmlE xception: The root element is missing.
at System.Xml.XmlT extReader.Read( )
at Microsoft.Web.S ervices2.Xml.Xm lSkipDTDReader. Read()
at System.Xml.XmlL oader.Load(XmlD ocument doc, XmlReader reader, Boolean
preserveWhitesp ace)
at System.Xml.XmlD ocument.Load(Xm lReader reader)
at Microsoft.Web.S ervices2.SoapEn velope.Load(Str eam stream)
at
Microsoft.Web.S ervices2.Messag ing.SoapPlainFo rmatter.Microso ft.Web.Services 2.Messaging.ISo apFormatter.Des erialize
(Stream stream)
at WebSemantica.So apSmtp.Mailbox. EndReceive(IAsy ncResult result) in c:\
wsf-projeto+final-julio\wsf-projeto final\websemant ica\zutil-soapsmtp\
mailbox.cs:line 307
----------------------------------------------------------
the code I'm using is (line 307 is the last line):

UTF8Encoding encoding = new UTF8Encoding();
SimpleMailMessa ge m = messagesArray[i];
ISoapFormatter formatter = new SoapPlainFormat ter();
MemoryStream stream = new MemoryStream( encoding.GetByt es( m.TextDataStrin g
) );
envelopes[i] = formatter.Deser ialize( stream );
----------------------------------------------------------
if I print the xml (the "m.TextDataStri ng") the result is:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rdf:RDF [
<!ENTITY meetingmaker "http://websemantica.pu c-
rio.br/2004/06/meetingmaker/meetingmaker#">
<!ENTITY ical "http://www.w3.org/2002/12/cal/ical#">
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#">
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#">
]>
<soap:Envelop e xmlns:wsa="http ://schemas.xmlsoap .org/ws/2004/03/addressing"
xmlns:wsse="htt p://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-
wssecurity-secext-1.0.xsd" xmlns:wsu="http ://docs.oasis-
open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"><soap:Header> <wsa:Action>Inv okeCoordinator</wsa:Action><wsa :MessageID>uuid :a341e5ea-
e828-43c6-88e0-
d74873ffd0af</wsa:MessageID>< wsa:To>urn:webs emanticaproxy</wsa:To><wsse:Se curity><wsu:Tim estamp
wsu:Id="Timesta mp-89698a3f-20d7-400d-ae99-80583ac02d3b">< wsu:Created>200 5-
02-26T17:11:37Z</wsu:Created><ws u:Expires>2005-02-
26T17:16:37Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><so ap:Body><string
xmlns="http://tempuri.org/">
<rdf:RDF
xml:base="&meet ingmaker;"
xmlns:meetingma ker="&meetingma ker;"
xmlns:ical="&ic al;"
xmlns:rdf="&rdf ;"
xmlns:rdfs="&rd fs;"
xmlns:xsd="&xsd ;"

<meetingmaker:M eetingMaker rdf:ID="meeting maker_id">
<meetingmaker:c riteria
rdf:datatype="& xsd;string">maj ority</meetingmaker:cr iteria>
<meetingmaker:a lgorithm
rdf:datatype="& xsd;string">par allel</meetingmaker:al gorithm>
<meetingmaker:u id rdf:datatype="& xsd;string">ju* **@ntime.com.br-02-26-
2005 02:11:35</meetingmaker:ui d>
<meetingmaker:v event>
<ical:Vevent rdf:ID="vevent_ id">
<ical:locatio n rdf:datatype="& xsd;string">Puc </ical:location>
<ical:summary rdf:datatype="& xsd;string">Apr esentacao de
Trabalho</ical:summary>
<ical:dtstart rdf:datatype="& xsd;datetime">1 2-10-2004
10:00:00</ical:dtstart>
<ical:dtend rdf:datatype="& xsd;datetime">1 2-10-2004
11:00:00</ical:dtend>
<ical:contact
rdf:datatype="& xsd;string">ju* **@ntime.com.br </ical:contact>
<ical:attende >
<rdf:Bag rdf:ID="vevent_ ateende">
<rdf:li rdf:datatype="& xsd;string">ki* @teccomm.les.in f.puc-
rio.br</rdf:li><rdf:li
rdf:datatype="& xsd;string">fr* *****@gmail.com </rdf:li><rdf:li
rdf:datatype="& xsd;string">fs* ***@inf.puc-rio.br</rdf:li>
</rdf:Bag>
</ical:attende>
</ical:Vevent>
</meetingmaker:ve vent>
</meetingmaker:Me etingMaker>
</rdf:RDF></string></soap:Body></soap:Envelope>
(whitch is a valid XML, at least the Internet explorer open it...)

--
Message posted via http://www.dotnetmonster.com
Nov 16 '05 #1
0 3330

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
4233
by: Microsoft News | last post by:
Hi all. Does id() xpath function work in System.XML? I have built dtd, schema, xdr for a simple xml which includes attributes definded as ID and IDREFS. Validation is occurring properly for all the types of metadata, but the id() function applied to the IDREFS attribute allways returns nothing. I have tried it from xslt and using the...
1
17112
by: Martin Honnen | last post by:
With both .NET 1.0 and 1.1 I have found the following strange behaviour where System.Xml.XmlDocument.LoadXml doesn't throw an error when parsing a text node with a character reference to an invalid characters like &#x1;. Using the CreateTextNode method I create a text node containing "\u0001a" (C# string literal notation). As far as I...
5
8043
by: Paul Nations | last post by:
I'm in a real pickle. I've inherited a project with major problems. It receives encrypted XML files from a website not under my control (so I can't modify the web app) for insertion into a database. I'm under intense pressure to get the data into the database NOW. I can decrypt the files alright and they look like xml, they'll import into...
0
3267
by: Franck | last post by:
Hello, here is my basic dtd <!ELEMENT TREENODES (treenode*)> <!ELEMENT treenode (treenode*)> <!ATTLIST treenode Text (#PCDATA) #REQUIRED Level (#PCDATA) #REQUIRED NodeData (#PCDATA) #REQUIRED>
1
9413
by: marcmc | last post by:
The code is below but I'm 99.9% sure that the code is okay and that maybe the schema has become corrupt somehow and im not sure how to fix it? Private Function LoadXMLSchema() 'Dim fileName As String = "C:\Documents and Settings\marc.mcguckian\My Documents\Visual Studio Projects\MIS RECON Engine\MISRE_XMLSchema.xsd" Dim fileName As...
2
2867
by: Scott Emick | last post by:
I am still having issues with getting Root Element Missing instead of the actual error that the webservice call is supposed to be returning. I'm using VB .Net 2003. Has anyone else been able to get around what seems like a bug in the dotnet framework? Scott Emick
1
5733
by: Tomas | last post by:
When I try to load my xslt i get an xml exception with the message "Root element is missing". The stylesheet works when I preview it in stylus studio, but apparently not in my application. Any ideas what may be wrong? The stylesheet: <?xml version="1.0" encoding="utf-8"?> <xsl:transform version="1.0"...
3
35057
by: lisa.bogart | last post by:
I am getting a "Root element is missing" error when I try to load a stream into and XmlDocument. Can anyone help me with what I am doing wrong??? Dim xmlTextWriter As XmlTextWriter = Nothing Dim objFile As FileStream = Nothing objStream = New MemoryStream()
1
11557
by: ayemyat | last post by:
Hi All, I have a remoting service which consumes the web service in another server. I have the following exception throw by the web service. System.Xml.XmlException: The data at the root level is invalid. Line 1, position 1. There is an error in XML document (0, 0). &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt; &lt;MSVBalanceEnquiry...
0
7693
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7604
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8117
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7660
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5217
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3651
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3631
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1207
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
932
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.