Re: SOAP Problems with ASP.NET

Stephane Murphy <[email protected]>
Newsgroups gmane.comp.windows.devel.dotnet.general
Message-ID <[email protected]>
I noticed you soap message is soap section 5 encoding. If it the case then
on the server add the following attribute to the web method:

[SoapDocumentMethod(Use=SoapBindingUse.Encoded)]

Stephane


>From: "Tewari, Vijay" <[email protected]>
>Reply-To: The DOTNET list will be retired 7/1/02
><[email protected]>
>To: [email protected]
>Subject: [DOTNET] SOAP Problems with ASP.NET
>Date: Thu, 13 Jun 2002 11:33:19 -0700
>MIME-Version: 1.0
>Received: from hotmail.com ([65.54.236.31]) by hotmail.com with Microsoft
>SMTPSVC(5.0.2195.4905); Thu, 13 Jun 2002 11:40:35 -0700
>Received: from listserv3.develop.com ([63.111.243.44]) by hotmail.com with
>Microsoft SMTPSVC(5.0.2195.4905); Thu, 13 Jun 2002 11:34:58 -0700
>Received: from listserv3 (63.111.243.44) by listserv3.develop.com (LSMTP
>for Windows NT v1.1b) with SMTP id <[email protected]>; Thu,
>13 Jun 2002 11:34:43 -0700
>Received: from DISCUSS.DEVELOP.COM by DISCUSS.DEVELOP.COM (LISTSERV-TCP/IP
>         release 1.8d) with spool id 2032988 for
>[email protected];          Thu, 13 Jun 2002 11:34:42 -0700
>Received: from petasus.ch.intel.com (143.182.124.5) by
>listserv3.develop.com          (LSMTP for Windows NT v1.1b) with SMTP id
>       <[email protected]>; Thu, 13 Jun 2002 11:34:41 -0700
>Received: from fmsmsxvs043.fm.intel.com (fmsmsxv043-1.fm.intel.com
>[132.233.48.128]) by petasus.ch.intel.com (8.11.6/8.11.6/d: solo.mc,v
>    1.42 2002/05/23 22:21:11 root Exp $) with SMTP id g5DBbOX26138 for
>     <[email protected]>; Thu, 13 Jun 2002 11:37:24 GMT
>Received: from orsmsx26.jf.intel.com ([192.168.65.26]) by
>fmsmsxvs043.fm.intel.com (NAVGW 2.5.2.11) with SMTP id
>M2002061311334104613 for <[email protected]>; Thu, 13 Jun
>2002 11:33:41 -0700
>Received: by orsmsx26.jf.intel.com with Internet Mail Service (5.5.2653.19)
>id          <MNN0L12G>; Thu, 13 Jun 2002 11:33:20 -0700
>X-Mailer: Internet Mail Service (5.5.2653.19)
>Message-ID:
><[email protected]>
>Sender:       The DOTNET list will be retired 7/1/02
><[email protected]>
>Return-Path: [email protected]
>X-OriginalArrivalTime: 13 Jun 2002 18:34:58.0489 (UTC)
>FILETIME=[05551290:01C21309]
>
>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.




_________________________________________________________________
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.
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.