The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Web Service Overloads?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Jason Nadal

Posts: 184
Nickname: jnadal
Registered: Dec, 2003

Jason Nadal is an asp.net developer, dabbling in winforms from time to time.
Web Service Overloads? Posted: May 6, 2005 5:23 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Jason Nadal.
Original Post: Web Service Overloads?
Feed Title: Jason Nadal
Feed URL: http://www.asp.net/err404.htm?aspxerrorpath=/jnadal/Rss.aspx
Feed Description: Restless C#ding
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Jason Nadal
Latest Posts From Jason Nadal

Advertisement

I just discovered overloads for webmethods cannot have the same name.  Don't other platforms have the concept of differing method signatures with the same name?

Here's the fix to change the name of one or both methods via an alias:

[WebMethod(MessageName="MethodAlias")]
public ReturnType MethodName(string param1)
{
    return MethodName(param1,"HardParam2");
}

[WebMethod(MessageName="MethodAliasPlain")]
public ReturnType MethodName(string param1, string param2)
{
   //actual service code here.
}

Read: Web Service Overloads?

Topic: BizTalk's as fast as they come (or is that go?) Previous Topic   Next Topic Topic: Performance Monitoring - JIT compilations

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use