-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: Balasubramanian1
Message 4 in Discussion
Hi please help me how to post an soap xml ,Im
trying out the following code but im getting
The remote server returned an error: (500) Internal Server
Error.
error
here is the code for posting soap
byte[] data;
data =
System.Text.Encoding.ASCII.GetBytes(requestData);
string xml=
System.Web.HttpUtility.UrlEncode(requestData);
string myURL =
URL;
HttpWebRequest myrequest=(HttpWebRequest)(WebRequest.Create(myURL));
myrequest.Method="POST";
myrequest.Headers.Add("SOAPAction",myURL);
myrequest.ContentType="text/xml; charset=UTF-8";
myrequest.ContentLength=data.Length;
Stream myreqstream=myrequest.GetRequestStream();
myreqstream.Write(data,0,data.Length);
myreqstream.Close();
HttpWebResponse myresponse;
myresponse=(HttpWebResponse)myrequest.GetResponse();
StreamReader sr=new
StreamReader(myresponse.GetResponseStream());
string
str=sr.ReadToEnd();
return
str;
and my xml is
<?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:Header>
<AuthenticationHeader
xmlns="AppIntelligence.IntegrationServices.SOAP">
<Login>string</Login>
<Password>string</Password>
</AuthenticationHeader>
</soap:Header>
<soap:Body>
<Request
xmlns="AppIntelligence.IntegrationServices.SOAP">
<requestEnvelope>
<ProcessCode>string</ProcessCode>
<UniqueID>string</UniqueID>
<Parameters>string</Parameters>
<Asynchronous>boolean</Asynchronous>
<QueueTimestamp>dateTime</QueueTimestamp>
<Contents>string</Contents>
</requestEnvelope>
</Request>
</soap:Body>
</soap:Envelope>
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]