SOAP Problems with ASP.NET

"Tewari, Vijay" <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.general
Message-ID <[email protected]>
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/"><SOAP-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.Read1_
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()</faults
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.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.