Hi,
Could you please tell me how to consume this. i am using .2008 to consume
the service using webrequest.
HttpWebRequest req = (HttpWebRequest)WebRequest.Create("Url");
req.Headers.Add("SOAPAction", "\"http://temp.com/Method\"");
req.ContentType = "text/xml;charset=\"utf-8\"";
req.Accept = "text/xml";
req.Method = "POST";
using (Stream strm = req.GetRequestStream())
{
using (StreamWriter streamWriter = new StreamWriter(strm, Encoding.UTF8))
{
streamWriter.Write(soap);
}
// Get Response.
WebResponse response = req.GetResponse();
// Get Response Stream
Stream responseStream = response.GetResponseStream();
StreamReader streamReader = new StreamReader(responseStream);
string output = streamReader.ReadToEnd();
On Fri, May 29, 2009 at 12:01 AM, Cerebrus <[email protected]> wrote:
>
> SOAP **is** XML. If you include an XML string within the Soap body, it
> will need to be encoded. .NET understands this and does this encoding
> automatically.
>
> Is your client so antiquated that they cannot decode an encoded XML
> string ??
>
> On May 28, 1:17 am, Arjun Priyananth <[email protected]> wrote:
> > Hi,
> >
> > I am writing a webservice which returns xml string as an output.
> >
> > When this service returns the soap message, it replaces all "<" and ">"
> > symbols to "lt;" "gt;" symbols in the xml string.
> >
> > This works fine if its webreferenced in IDE. But due to leagacy client
> > requirments I need to get only soap messages using web request and
> response.
> > Any solutions pls
> >
> > -Aj
>