Sending SOAP Messages Asynchronously

  • Thread starter Thread starter GR
  • Start date Start date
G

GR

Hi,
I've got a soap message as a string and would like to post it to a
webservice (in C#) asynchronously:
For example something like:
string soap = "<soap:Envelope >...<MyMessageBody>....</soap:Envelope>";


I use the HttpWebRequest object to send off the message. But I think it
does so synchronously. I'd like to do it asynchronously.

The XmlHttp is the next object I've been considering using but I'm not
sure how it's to be used in C#. I have some VBScripts that use XmlHttp
but nothing with C# (and have looked around on the net and cant find
anything)

The System.Net.WebClient object is the next in my crosshairs.
Considering using the System.Net.WebClient.UploadStringAsync() method.

Any suggestions?
Thanks
 
Hi,

Try the System.Net.WebClient class, and its UploadStringAsync method.

That works asynchronously and can send a string to the server and
retrieves a string from it as the answer.

Note that the HttpWebRequest you used in the first place has also
separate Begin.. and End.. methods for async operation.

-Lenard
 
Hi, GR..
SOAP is a just standerd for transfering the object to the XML model..
This perpose is to synchinize the application level object to the
understandable XML formate for serilaization and DeSerialization.

all the inter transfermations are done through the pure HTTP only ..

So Try with WebRequest or HTTPWebRequest methodes for trasnfer u r SOAP
messages.
Those api's are supported both asynchinise as well synchinise ..
 
Yup. I'm using a couple of the objects already sending SOAP strings.

Was just looking for the best one in C# that uses async.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top