Hello lucius,
As John has suggested, you can post the webservice request message as plain
XML text. Generally, all the webservice method calls are serialized as XML
soap message that be transferred over wire(http or tcp channel), therefore,
if the soap message is not quite complex which can be constructed
manually(through XML api), you can directly use network component to send
such XML soap message. In .net framework, the httpwebrequest class is a
encapsulated one for send http request. Here are some articles & thread
discussing on send text data through httpwebrequest.
http://www.netomatix.com/Development/XmlWebRequest.aspx
http://www.thescripts.com/forum/thread427794.html
Here is a simple test code fragment that use httpwebrequest to send
webservice request
================
static void TestWebMethod()
{
HttpWebRequest req =
WebRequest.Create("http://localhost:3697/MainService/simpleservice.asmx")
as HttpWebRequest;
req.ContentType = "application/soap+xml";
req.Method = "POST";
StreamWriter sw = new StreamWriter(req.GetRequestStream(),
Encoding.UTF8);
StreamReader sr = new StreamReader(@"..\..\soap_template.xml",
Encoding.UTF8);
string soap = sr.ReadToEnd();
sr.Close();
sw.Write(soap);
sw.Close();
HttpWebResponse rep = req.GetResponse() as HttpWebResponse;
sr = new StreamReader(rep.GetResponseStream(), Encoding.UTF8);
Console.WriteLine(sr.ReadToEnd());
sr.Close();
}
=========================
=======soap_template.xml=====
<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<HelloWorld xmlns="http://tempuri.org/" />
</soap12:Body>
</soap12:Envelope>
=====================
also, for .net framework 2.0, the coupled WSE is version 3.0, you can also
use its SoapSender to send soap message.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Steven Cheng[MSFT] - 28 Feb 2007 09:45 GMT
Hello Lucius,
Does the information in previous reply helps you some? If you still need
any further assistance on this ,please feel free to post here.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.