When I was testing this I tried the return type as string. The return string
'response_generic_v1.dtd'><SMSRESPONSE><REQUESTID>HTTP_T1_ID0_R302</REQUESTID></SMSRESPONSE></string>
Thank you for your response. However, I am still trying to find an answer.
"Antonio Dias" wrote:
> don't know if this is going to sound stupid but why don't you try to
> return the string that you built instead of loading it to a XmlDocument
> and returning the document?
>
> On Thu, 26 Jan 2006 15:42:05 -0000, Sam <Sam@discussions.microsoft.com>
> wrote:
>
> > Hello all,
> >
> > I have a requirement to to return a XML response for incoming posts to my
> > webservice. In addition, I can not write out to a file. I must process
> > this
> > in memory. The XML response must be as follows
> >
> > <xml version='1.0' standalone='no'?><!DOCTYPE SMSRESPONSE SYSTEM
> > 'response_generic_v1.dtd'>
> > <SMSRESPONSE>
> > <REQUESTID>HTTP_T1_ID0_R302</REQUESTID>
> > <SMSRESPONSE>
> >
> > -------------------------------------------------------------------------------------------
> > I coded a simple web service to see if i could return the right format as
> > follows
> >
> > <WebMethod()> Public Function Sms() As Xml.XmlDocument
> > Dim strResponseData As String
> > Dim objXMLResponseDocument As Xml.XmlDocument = New Xml.XmlDocument
> >
> > strResponseData = "<?xml version='1.0' standalone='no'?><!DOCTYPE
> > SMSRESPONSE SYSTEM 'response_generic_v1.dtd'>"
> > strResponseData += "<SMSRESPONSE>"
> > strResponseData += "<REQUESTID>HTTP_T1_ID0_R302</REQUESTID>"
> > strResponseData += "</SMSRESPONSE>"
> >
> > objXMLResponseDocument.LoadXml(strResponseData)
> > Return objXMLResponseDocument
> >
> > End Function
> >
> > -------------------------------------------------------------------------------------------
> > When i call the function i get the following back
> > <?xml version="1.0" encoding="utf-8" ?>
> > <SMSRESPONSE>
> > <REQUESTID>HTTP_T1_ID0_R302</REQUESTID>
> > </SMSRESPONSE>
> >
> > -------------------------------------------------------------------------------------------
> > I've tried everything to return the right format with no luck..
> >
> > BTW: I added a few lines to dump the xml to a file before the return
> > [strOut.WriteLine(objXMLResponseDocument.OuterXml)]
> > and the resulting flat file is correct.
>
>
>
> --
> Using Opera's revolutionary e-mail client:
http://www.opera.com/mail/