Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Creating a custom [WebMethod] attribute

Reply
Thread Tools

Creating a custom [WebMethod] attribute

 
 
Dustyg
Guest
Posts: n/a
 
      01-19-2006
I have a webservice with several stubbed out methods and severl
implemented methods. We are releasing to prod with a beta version
allowing customer to use the implemented methods but I would like to
hide the stubbed out methods (and some implemented methods we don't
want seen) from the wsdl. But I would like this to be done from a
config file so when we do want to release the other implemented methods
there is no recompiling needed.

- Putting them in another asmx files is not an option.
- Setting up authorization to limit use is already implemented, I just
don't want the methods seen.


Is it possible to create a custom attribute which performs the same
functionality (exposing the method in a webservice) as [WebMethod]?

Thank you

 
Reply With Quote
 
 
 
 
Friso Wiskerke
Guest
Posts: n/a
 
      01-24-2006
Why don't you just remove the <Webmethod()> attribute from the the
functions/subs that you don't want to be seen yet?
as soon as they are implemented you can just put the method-attribute back
in place.

HTH
Friso Wiskerke


"Dustyg" <> wrote in message
news: oups.com...
>I have a webservice with several stubbed out methods and severl
> implemented methods. We are releasing to prod with a beta version
> allowing customer to use the implemented methods but I would like to
> hide the stubbed out methods (and some implemented methods we don't
> want seen) from the wsdl. But I would like this to be done from a
> config file so when we do want to release the other implemented methods
> there is no recompiling needed.
>
> - Putting them in another asmx files is not an option.
> - Setting up authorization to limit use is already implemented, I just
> don't want the methods seen.
>
>
> Is it possible to create a custom attribute which performs the same
> functionality (exposing the method in a webservice) as [WebMethod]?
>
> Thank you
>



 
Reply With Quote
 
 
 
 
Dustyg
Guest
Posts: n/a
 
      01-24-2006
As I stated, we don't want to remove the [WebMethod] attribute because
we don't want to have to push the code every time we release a new
method. Changing a value in a config file would better suite our
needs.

Thank you

- Dustin

 
Reply With Quote
 
Friso Wiskerke
Guest
Posts: n/a
 
      01-25-2006
Maybe the [Conditional] attribute can help you out?


"Dustyg" <> wrote in message
news: ups.com...
> As I stated, we don't want to remove the [WebMethod] attribute because
> we don't want to have to push the code every time we release a new
> method. Changing a value in a config file would better suite our
> needs.
>
> Thank you
>
> - Dustin
>



 
Reply With Quote
 
Dustyg
Guest
Posts: n/a
 
      01-25-2006
The [Conditional] attribute relies on the definition of a compilation
symbol, meaning the defined symbol is compiled and cannot be changed
without re-compiling. It also only ignores calls to the method rather
than removing them from compilation like a directive in C++ would so it
would still show up in the wsdl.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
JSP Custom Tags as attribute values for other custom tags Dave Java 0 08-14-2006 02:21 PM
creating custom options for custom widgets? Alexandre Guimond Python 0 03-22-2006 05:55 PM
XSLT: Making attribute to parent attribute Bostonasian XML 1 09-18-2005 07:30 AM
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net Web Controls 0 06-01-2005 02:36 PM
"Error Creating Control" when creating a custom control (Design Time). Can't see tooltip message. Ravi Ambros Wallau ASP .Net 0 06-01-2005 02:36 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57