Velocity Reviews

Velocity Reviews (
-   ASP .Net Web Services (
-   -   How to handle invalid web service namespace error (

Ajay Choudhary 05-10-2005 04:12 PM

How to handle invalid web service namespace error

If the client tries to access a web service with invalid namespace, it gets
a SOAP exception as invalid SOAPAction.
The invalid namespace will happen because the proxies on the client side
were generated before the namespace on the server side was updated.
I would like to handle this myself and throw a SOAP exception with more
information in it.
How can I do that?


Serve Code - The namespace is updated from "1111" to "2222".

public class SayHello : System.Web.Services.WebService



public string HelloWorld()


return "Hello World from "+Environment.UserName;



Client Proxy Code - Notice the "1111"

[System.Web.Services.WebServiceBindingAttribute(Nam e="SayHelloSoap",

public class SayHello : System.Web.Services.Protocols.SoapHttpClientProtoc ol



Client Code -



SayHello s = new SayHello();



catch(Exception ex)




All times are GMT. The time now is 06:42 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.