Re: New methods not being exposed

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Thanks Big John. Funny thing is I've tried refreshing and even
deleting/re-adding the web reference in the consuming app after build,
to no avail.

Even stranger - when I do a build in the service app and run that app
the service description page it brings up still just lists the
HelloWorld function.





On Fri, 16 Nov 2007 08:05:02 -0800, BigJohn <bigjohn@xxxxxxxxxxxxxxxx>
wrote:

make sure to Build the service.
After build is successful, on the client project over the specific web
reference, right-click, Update Web References will pick up the new interface
and added methods should be available.

I have had instances where they are not available and this is a known issue
in certain circumstances. In this case, close Studio and re-open.

"asdf@xxxxxxxx" wrote:

I've just begun programming web services in VS 2005 and I'm having a
problem seeing my new methods being exposed.

For example, when I run the following I still only see the HelloWorld
function despite having added ReturnMainPic to the class.


Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols

<WebService(Namespace:="http://tempuri.org/";)> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class Service
Inherits System.Web.Services.WebService

<WebMethod()> _
Public Function HelloWorld() As String
Return "Hello world"
End Function
<WebMethod()> _
Public Function ReturnMainPic() As String
Return "C:\Documents and Settings\mypc\My Documents\My
Pictures\fubar.jpg"
End Function


End Class


On a related note, as I add new functionality to web services, do I
need to delete and re-add the web reference to the web service in
related projects that consume those services?

I seem to recall this being an issue in earlier version of Visual
Studio (with web references not updating with new functionality).

Thanks!


.



Relevant Pages

  • Re: New methods not being exposed
    ... deleting/re-adding the web reference in the consuming app after build, ... Even stranger - when I do a build in the service app and run that app ... when I run the following I still only see the HelloWorld ... Public Function ReturnMainPic() As String ...
    (microsoft.public.dotnet.framework.webservices)
  • Web Service Call behaves differently from Debug Mode
    ... I made a web reference to a web service call on a remote server ... and created a simple app that references the service. ... app in debug mode, ...
    (microsoft.public.dotnet.framework.webservices)
  • Re: Workaround for The Web site that is referenced here is not in the
    ... Looks like you have a web reference in your project that doesn't exists in ... you r sharepoint enviroment. ... Did you develop your app. ... > Thanks Doug ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: need to call WSE from C++
    ... You can create proxy by "Add Web Reference" in CPP project. ... > I have an app the needs to call a C# Web Service that uses WSE 2.0. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)