I actually already had that attribute on the server. It turns out that the
problem was subtle.

The sent XML uses NS declaration as xmlns:tns="http://tempuri.org

Changing that to xmlns:tns="http://tempuri.org/";  "note the ending slash"
rectified the problem.

Regards
Vijay


>
>I am sending the following explicitly using sockets to a ASP.NET
>service
>
>POST /HelloWorldService/Service1.asmx HTTP/1.1
>Content-Type: text/xml; charset=utf-8
>SOAPAction: "http://tempuri.org/Add";
>Content-Length: 544
>Expect: 100-continue
>Connection: Keep-Alive
>Host: localhost
>
><?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
>xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>xmlns:types="http://tempuri.org/encodedTypes";
>xmlns:tns="http://tempuri.org";
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";><SOA
>P-ENV
>:Body><tns:Add><a xsi:type="xsd:int">70</a><b
>xsi:type="xsd:int">89</b></tns:Add></SOAP-ENV:Body></SOAP-ENV:Envelope>
>
>
>I have been confounded by the response
>
>HTTP/1.1 500 Internal Server Error.
>Server: Microsoft-IIS/5.1
>Date: Thu, 13 Jun 2002 18:31:58 GMT
>Cache-Control: private
>Content-Type: text/xml; charset=utf-8
>Content-Length: 1103
>
><?xml version="1.0" encoding="utf-8"?>
><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
>   <soap:Body>
>     <soap:Fault>
>       <faultcode>soap:Client</faultcode>
>       <faultstring>System.Web.Services.Protocols.SoapException: Server
>was unable to read request. ---&gt; System.InvalidOperationException:
>There is an error in XML document (1, 435). ---&gt;
>System.InvalidOperationException:
>&lt;Add xmlns='http://tempuri.org'&gt; was not expected.
>    at
>Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.R
>ead1_
>Add()
>    --- End of inner exception stack trace ---
>    at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader
>xmlReader)
>    at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
>    --- End of inner exception stack trace ---
>    at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters()
>    at System.Web.Services.Protocols.WebServiceHandler.Invoke()
>    at
>System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</fault
s
>tring>
>       <detail />
>     </soap:Fault>
>   </soap:Body>
></soap:Envelope>
>
>You can read messages from the DOTNET archive, unsubscribe from DOTNET,
>or subscribe to other DevelopMentor lists at
>http://discuss.develop.com.




_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to