Solved

add a function to web service

Posted on 2011-03-23
7
271 Views
Last Modified: 2012-05-11
I have a web service .asmx file in my project. Now I need to another function. May I just add the one more function in the web service CodeBehind cs file? Can I just add it by

    [WebMethod]
    public int SaveBinraryData(binrary imagedata)
    {
        ... ...
        ... ...
    }
0
Comment
Question by:minglelinch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 35198658
Yes. Of course any consumers of your service will need to re-import the WSDL if they want to use the new method.
0
 
LVL 1

Author Comment

by:minglelinch
ID: 35198702
My first time to web service. How to do this process? (re-import the WSDL if they want to use the new method)

0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35198759
In Visual Studio, you just need to right-click on the "Web Reference" in the solution explorer and choose "Update Web Reference". That will the trigger Visual Studio into regenerating the proxy class from the WSDL of the service.
0
More Than Just A Video Library

Train for your certification. Learn the latest DevOps tools. Grow your skillset to do better work.

At Linux Academy, we release new training modules every week so you'll always be up to date on the latest tech.

 
LVL 1

Author Comment

by:minglelinch
ID: 35199073
I got it. Thanks a lot !
0
 
LVL 1

Author Comment

by:minglelinch
ID: 35201192
One further question please. Some functions in asmx ahead with  [WebMethod], while some ahead with [WebMethod(EnableSession=true)], and some with nothing. Why? EnableSession=true is it used when making DB updates? Thanks.
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 35201214
No, it means that that particular method is able to store state information that can be used on subsequent requests from the same caller.
0
 
LVL 1

Author Closing Comment

by:minglelinch
ID: 35220172
Great answer.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question