Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 24th, 2004, 04:44 AM
Registered User
 
Join Date: Nov 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default WebServiceBindingAttribute Required Exception

If you run an ASP.NET client application that calls a web service via a client proxy, you may get an exception: "WebServiceBindingAttribute is required on proxy classes". This will of course occur in the trivial case where you have not decorated your proxy class with [System.Web.Services.WebServiceBindingAttribute(Nam e="...", Namespace="...")].

However, the exception may still be thrown even if you have decorated your class with the attribute. You may note that it does so when you are inheriting from the Microsoft.Web.Services2.WebServicesClientProtocol class. If you inherit instead from the System.Web.Services.Protocols.SoapHttpClientProtoc ol, then the problem will disappear.

But another problem will appear if you are planning on using WS-Security or any of the other WS-... capabilties provided in the WSE2 framework. In order to effect WS-..., you must access the RequestSoapContext property, and this property is only accessible if the proxy class inherits from Microsoft.Web.Services2.WebServicesClientProtocol.

I have noted however that you can decorate with the attribute and inherit from the WebServicesClientProtocol class without getting an exception thrown .... if you call the proxy class from a web application as opposed to a console application. I would need to investigate further to find out why this is so!






Similar Threads
Thread Thread Starter Forum Replies Last Post
Help required zaeem SQL Server 2000 2 May 28th, 2008 12:48 AM
Object required jpaul VB Databases Basics 5 November 14th, 2007 12:10 PM
Some help required ! codenet C# 2005 1 September 24th, 2007 04:01 PM
is serialization required for this? hertendreef ASP.NET 2.0 Basics 0 March 24th, 2007 05:54 AM
Exception Absolute Path Information required roydaniel .NET Framework 2.0 1 June 19th, 2006 04:38 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.