Groups | Blog | Home
all groups > dotnet web services > january 2008 >

dotnet web services : help understand C# example for use in my VB web service



cj
1/11/2008 3:03:42 PM
I'm trying to understand writing web services in VB and I have been
pointed to an example that's in C#
http://dotnetjunkies.com/Tutorial/4D13CEFA-D0FD-44BE-8749-8D17B5757564.dcik
Where do I put [WebService(Description="My ...")] in VB?

I'm still working with the default web service that is given when you
open a new web service project in VS2008.

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

' To allow this Web Service to be called from script, using ASP.NET
AJAX, uncomment the following line.
' <System.Web.Script.Services.ScriptService()> _
<System.Web.Services.WebService(Namespace:="http://tempuri.org/")> _
<System.Web.Services.WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)>
_
<ToolboxItem(False)> _
Public Class Service1
Inherits System.Web.Services.WebService

<WebMethod()> _
Public Function HelloWorld() As String
Return "Hello World"
End Function
End Class
cj
1/11/2008 3:59:03 PM
Never mind this question I figured it out.

<System.Web.Services.WebService(Namespace:="http://tempuri.org/",
Description:="My ........")> _

There seems to be more examples in C# than VB and although similar they
are still quite different--especially when writing web services is new
to me.


[quoted text, click to view]
marcomangiante
1/12/2008 1:34:38 AM
Hello,

[quoted text, click to view]

a simple search on msdn give me this page:

http://msdn2.microsoft.com/en-us/library/ms972326.aspx

See if it can help. Remember that many sample and articles on msdn
have both the code (vb.net and c#): simply click on "Language filter"
that many times is at the top of the article page.

--
Regards,

AddThis Social Bookmark Button