Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I've gotten solutions within a day - it saved a lot of time and actually got me one ATTABOY from my boss..."

Geography

Where in the world do Tek-Tips members come from?
tshad (Programmer)
7 May 12 19:30
I have found tons of articles that tell you how to overload a Web Service but none that tell you how to call it.

You can do something like this:

CODE

namespace TestOverloadingWebService
{
    [WebService(Namespace = "http://tempuri.org/")]
    public class OverloadingInWebService : System.Web.Services.WebService
    {
        [WebMethod(MessageName = "AddInt", EnableSession = true)]
        public int Add(int a, int b)
        {
            return (a + b);
        }


        [WebMethod(MessageName = "AddFloat", EnableSession = true)]
        public float Add(float a, float b)
        {
            return (a + b);
        }
    }
}

This example is used all over the place but if you try to call the 2nd method I get an error on compile.  In a project that is in the same solution.

The service compiles fine and when you run it you will see 2 services with the MessageName listed below.

How do you get this to work and how do you call it?

Thanks,

Tom
jbenson001 (Programmer)
7 May 12 19:34
jbenson001 (Programmer)
7 May 12 19:37
tshad (Programmer)
7 May 12 21:06
Yes, I did see both of the web sites.

I found the issue to be that I needed to update the web reference.  Even though it was compiling, the web reference had to be updated.  Didn't know about that.

It seems to work fine now.  You do call it the same way.

It doesn't really spell that out and there were no examples of doing the call, so I wasnt't sure.

Thanks,

Tom
 
jbenson001 (Programmer)
8 May 12 10:11
Glad to help

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close