I will send this on to our Xml Support Team and see if they can come up with something for you. Thanks for your patience!
Brett Keown
Microsoft Developer Support
bre...@nospam.microsoft.com
To email me directly, please remove the "nospam" from my email address.
This posting is provided "AS IS" with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.
Here is the answer I received from the support team:
The easiest way to do this is via a HTTPWebClient or HTTPRequest object.
The basic idea is to create a message in SOAP format, and using a POST
method, would send it up and receive a stream of data back. Since the soap
message is basically text, building it shouldn’t be too hard, as long as
you know the format. After the soap text message is created, you can then
post it to the web service via the above client classes
Here are some articles from WebCasts
324811 Support WebCast: Microsoft ASP.NET: Advanced XML Web Services Using
http://support.microsoft.com/?id=324811
Serialization allows you to take a class and convert it into an Xml String
323503 WebCast: XML Serialization and Sample Code
http://support.microsoft.com/?id=323503
There are many other soap resources to understand the various formats, but
we have the SOAPFormatter class which can help build the soap message.
They the basic client class is either the HTTPWebClient/HTTPRequest
classes. You may need credentials to hit the webservice so you may want to
look into the Credentials class.
Hope that helps you Ashish. If not, reply back with your addistional
requirements and I will do what I can to assist you further.
Brett Keown
Microsoft Support
bre...@online.microsoft.com
Thanks
Ashish
Input:
txtServiceURI.Text = http://localhost/TestService/Add.asmx
txtSOAPRequest.Text =
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<Add xmlns="http://tempuri.org/">
<A>10</A>
<B>10</B>
</Add>
</soap:Body>
</soap:Envelope>
try
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(txtServiceURI.Text);
req.Method = "POST";
req.KeepAlive = true;
byte[] bytes = System.Text.Encoding.UTF8.GetBytes(txtSOAPRequest.Text);
req.ContentLength = bytes.Length;
System.IO.Stream st = req.GetRequestStream();
st.Write(bytes, 0, bytes.Length);
st.Close();
>>>> THROWS >>>>> HttpWebResponse res = (HttpWebResponse)req.GetResponse();
System.IO.Stream st1 = res.GetResponseStream();
System.IO.StreamReader sr = new System.IO.StreamReader(st1,
System.Text.Encoding.UTF8);
string txt = sr.ReadToEnd();
this.txtSOAPResponse.Text = txt;
res.Close();
}
catch (Exception exp)
{
MessageBox.Show(this,exp.Message);
}
"Brett Keown [MSFT]" <bre...@online.microsoft.com> wrote in message
news:Gt4AGIVI...@cpmsftngxa06.phx.gbl...
Everything worked fine.. Thanks to all for their help. I really appriciate
the spirit..
Ashish
"Ashish" <a...@hotmail.com> wrote in message
news:e5S9sJGI...@TK2MSFTNGP11.phx.gbl...