Web service namespace
-
Hi, I'm writing a web service! Can you tell me how can I get my web service namespace from code. For ex: ... Public Class Service Inherits System.Web.Services.WebService Public Function HelloWorld() As String Return "HelloWorld" End Function Public Sub GetWebServiceNameSpace() 'How can I get Web service Namespace End Sub End Class Thanks, Hung -- modified at 12:01 Thursday 20th April, 2006
-
Hi, I'm writing a web service! Can you tell me how can I get my web service namespace from code. For ex: ... Public Class Service Inherits System.Web.Services.WebService Public Function HelloWorld() As String Return "HelloWorld" End Function Public Sub GetWebServiceNameSpace() 'How can I get Web service Namespace End Sub End Class Thanks, Hung -- modified at 12:01 Thursday 20th April, 2006
-
Try this Me.GetType.Namespace[^]
thanks minhpc_bk but I can't get namespace of own webservice for ex:
-
thanks minhpc_bk but I can't get namespace of own webservice for ex:
Hung, Below is a quick example:
Namespace myns
Public Class MyWebservice
Inherits System.Web.Services.WebService
Public Function getNameSpace() As String
'How can I get the namespace of this webservice (it's namespace is "myns"
getNameSpace = Me.GetType.Namespace
End Function
End Class
End Namespace.....
Dim service As myns.MyWebservice = New myns.MyWebservice()
Dim nspace As String = service.getNameSpace
'The nspace object returns the "myns" value. -
Hi, I'm writing a web service! Can you tell me how can I get my web service namespace from code. For ex: ... Public Class Service Inherits System.Web.Services.WebService Public Function HelloWorld() As String Return "HelloWorld" End Function Public Sub GetWebServiceNameSpace() 'How can I get Web service Namespace End Sub End Class Thanks, Hung -- modified at 12:01 Thursday 20th April, 2006
r u want to use webservice in your application ???????? jitendra
-
Hung, Below is a quick example:
Namespace myns
Public Class MyWebservice
Inherits System.Web.Services.WebService
Public Function getNameSpace() As String
'How can I get the namespace of this webservice (it's namespace is "myns"
getNameSpace = Me.GetType.Namespace
End Function
End Class
End Namespace.....
Dim service As myns.MyWebservice = New myns.MyWebservice()
Dim nspace As String = service.getNameSpace
'The nspace object returns the "myns" value.I create a web service (.asmx file) and I don't think I will make new object of my web service as your code: Dim service As myns.MyWebservice = New myns.MyWebservice() Dim nspace As String = service.getNameSpace The VS Studio 2005 generate code like that: Public Class Service Inherits System.Web.Services.WebService Public Function getNameSpace() As String Dim namespace as String = Me.GetType.Namespace Response.Write(namespace) 'So I want to get namespace from here 'not until making new object. End Function End Class End Namespace And I want to get it's namespace without create new object. Thanks, Hung
-
r u want to use webservice in your application ???????? jitendra
I create a web service and put it on server. The web service itselft will get it's namespace and respond for client. have you got any ideas? Hung