RE: Strange SOAP Exception
From: Dan Rogers (danro_at_microsoft.com)
Date: 11/18/04
- Next message: Dan Rogers: "RE: DIME attachments break double-byte characters using WSE 1.0 SP1"
- Previous message: Dan Rogers: "RE: Overloading SOAP Interpretations for Specific Primitive Types"
- In reply to: Barry Christian: "Strange SOAP Exception"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 18 Nov 2004 23:17:47 GMT
Hi Barry,
If I understand what you are trying to do, you want to place some custom
details in the Detail element inside of a SOAP fault. If this is all you
want to do (since SOAP does not allow you to define new fault types), I'd
just use the basic exception mechanism already provided and copy specific
details from a class with your own desired sturcture into the detail
element of the exception before returning the exception.
Does that make sense?
Dan Rogers
Microsoft Corporation
--------------------
>From: barry@riverdragon.com (Barry Christian)
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
>Subject: Strange SOAP Exception
>Date: 16 Nov 2004 07:39:25 -0800
>Organization: http://groups.google.com
>Lines: 29
>Message-ID: <523978c.0411160739.1439eb89@posting.google.com>
>NNTP-Posting-Host: 63.88.133.223
>Content-Type: text/plain; charset=ISO-8859-1
>Content-Transfer-Encoding: 8bit
>X-Trace: posting.google.com 1100619566 23616 127.0.0.1 (16 Nov 2004
15:39:26 GMT)
>X-Complaints-To: groups-abuse@google.com
>NNTP-Posting-Date: Tue, 16 Nov 2004 15:39:26 +0000 (UTC)
>Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!news-out.cwi
x.com!newsfeed.cwix.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news
glorb.com!postnews.google.com!not-for-mail
>Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.aspnet.webservices:26604
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
>
>I get the following error when thowing a SOAP Exception:
>The type System.Web.Services.Protocols.SoapException in Assembly
>System.Web.Services, Version=1.0.5000.0, Culture=neutral,
>PublicKeyToken=b03f5f7f11d50a3a is not marked as serializable
>
>However, SOAPException most certainly is marked as serializable. It
>inherits from SystemException which is. Why would I get this error?
>
>I have seen this some already in newsgroups but with no posted answer.
>
>I am getting this error in two cases. In once case I am using the MS
>Exception Handler Application Block. IN the other I do not use that at
>all, but instead just throw a SoapException. I follow the sample code
>for creating it to the letter. You can see a mockup of it below:
>
> SoapException MySoapException;
> XmlDocument errordoc = new XmlDocument();
> XmlNode detail = errordoc.CreateNode(XmlNodeType.Element,
> SoapException.DetailElementName.Name,
> SoapException.DetailElementName.Namespace);
>
> detail.InnerText = "A detailed error message goes here";
> MySoapException = new SoapException("Code Location goes here",
> SoapException.ServerFaultCode,
> Context.Request.Url.AbsoluteUri, detail, null );
>
> throw MySoapException;
>
>Thanks in advance
>
- Next message: Dan Rogers: "RE: DIME attachments break double-byte characters using WSE 1.0 SP1"
- Previous message: Dan Rogers: "RE: Overloading SOAP Interpretations for Specific Primitive Types"
- In reply to: Barry Christian: "Strange SOAP Exception"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|