Hi,
I'm trying to use the Microsoft.Web.Services2.Messaging.
ISoapFormatter
but I receive this error:
System.Xml.XmlException: Reference to undeclared parameter entity,
'meetingmaker'.
at System.Xml.XmlLoader.ExpandEntityReference(XmlEnti tyReference eref)
at System.Xml.XmlEntityReference.SetParent(XmlNode node)
at System.Xml.XmlNode.AppendChild(XmlNode newChild)
at System.Xml.XmlLoader.LoadAttributeChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadAttributeNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadChildren(XmlNode parent)
at System.Xml.XmlLoader.LoadElementNode()
at System.Xml.XmlLoader.LoadCurrentNode()
at System.Xml.XmlLoader.LoadDocSequence(XmlDocument parentDoc)
at System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean
preserveWhitespace)
at System.Xml.XmlDocument.Load(XmlReader reader)
at Microsoft.Web.Services2.SoapEnvelope.Load(Stream stream)
at
Microsoft.Web.Services2.Messaging.SoapPlainFormatt er.Microsoft.Web.Services2.Messaging.ISoapFormatte r.Deserialize
(Stream stream)
at WebSemantica.SoapSmtp.Mailbox.EndReceive(IAsyncRes ult result) in c:\
wsf-projeto+final-julio\wsf-projeto final\websemantica\zutil-soapsmtp\
mailbox.cs:line 308
----------------------------------------------------------
the code I'm using is (line 308 is the last line):
UTF8Encoding encoding = new UTF8Encoding();
SimpleMailMessage m = messagesArray[i];
ISoapFormatter formatter = new SoapPlainFormatter();
MemoryStream stream = new MemoryStream( encoding.GetBytes( m.TextDataString
) );
stream.Position = 0;
envelopes[i] = formatter.Deserialize( stream );
----------------------------------------------------------
if I print the xml (the "m.TextDataString") the result is:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE rdf:RDF [
<!ENTITY meetingmaker "http://websemantica.puc-
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:Envelope xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/03/addressing"
xmlns:wsse="http://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="http://schemas.xmlsoap.org/soap/envelope/"><soap:Header><wsa:Action>InvokeCoordinator</wsa:Action><wsa:MessageID>uuid:d905eba6-
7ed8-420d-a297-
b8625751f63c</wsa:MessageID><wsa:To>urn:websemanticaproxy</wsa:To><wsse:Security><wsu:Timestamp
wsu:Id="Timestamp-71318c38-b4e8-46a5-af91-72348be37458"><wsu:Created>2005-
02-27T00:12:47Z</wsu:Created><wsu:Expires>2005-02-
27T00:17:47Z</wsu:Expires></wsu:Timestamp></wsse:Security></soap:Header><soap:Body><string
xmlns="http://tempuri.org/">
<rdf:RDF
xmlns:meetingmaker="&meetingmaker;"
xmlns:ical="&ical;"
xmlns:rdf="&rdf;"
xmlns:rdfs="&rdfs;"
xmlns:xsd="&xsd;"
<meetingmaker:MeetingMaker rdf:ID="meetingmaker_id">
<meetingmaker:criteria
rdf:datatype="&xsd;string">majority</meetingmaker:criteria>
<meetingmaker:algorithm
rdf:datatype="&xsd;string">parallel</meetingmaker:algorithm>
<meetingmaker:uid rdf:datatype="&xsd;string">ju***@ntime.com.br-02-26-
2005 09:12:45</meetingmaker:uid>
<meetingmaker:vevent>
<ical:Vevent rdf:ID="vevent_id">
<ical:location rdf:datatype="&xsd;string">Puc</ical:location>
<ical:summary rdf:datatype="&xsd;string">Apresentacao de
Trabalho</ical:summary>
<ical:dtstart rdf:datatype="&xsd;datetime">12-10-2004
10:00:00</ical:dtstart>
<ical:dtend rdf:datatype="&xsd;datetime">12-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.inf.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:vevent>
</meetingmaker:MeetingMaker>
</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