New methods not being exposed
by asdf@asdf.com on 11/15/2007 11:52:00 AM
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!
Re: New methods not being exposed
by asdf@asdf.com on 11/16/2007 6:43:00 AM
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@newsgroup.nospam>
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@asdf.com" 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!
>>
>>
Re: New methods not being exposed
by asdf@asdf.com on 11/16/2007 6:48:00 AM
Actually just found closing and re-starting VS fixed it. I was
working with two instances of VS when I had the problem - perhaps
that's one of the known issue situations you mentioned.
Thanks again!
On Fri, 16 Nov 2007 11:43:11 -0500, asdf@asdf.com wrote:
>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@newsgroup.nospam>
>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@asdf.com" 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!
>>>
>>>