473,722 Members | 2,161 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Writing a simple webservice


Hi guys, I'm looking to develop a simple web service in VB.NET but I'm
having some trivial issues. In Visual Studio I create a web services
project and change the asmx.vb file to this:

Imports System.Web.Serv ices
Imports System.Web.Serv ices.Protocols
Imports System.Componen tModel

<System.Web.Ser vices.WebServic e(Namespace:="h ttp://
wwwpreview.#del eted#.co.uk/~ptaylor/Customer.wsdl") _
<System.Web.Ser vices.WebServic eBinding(Confor msTo:=WsiProfil es.BasicProfile 1_1)>
_
<ToolboxItem(Fa lse)_
Public Class CustomerService
Inherits System.Web.Serv ices.WebService

<WebMethod()_
Public Function getCustomer() As TreeObject()

Dim t1 As New TreeObject
Dim t2 As New TreeObject
Dim t3 As New TreeObject

Dim arr(2) As TreeObject
arr(0) = t1
arr(1) = t2
arr(2) = t3

Return arr
End Function

End Class

As you can see my function returns an object of type "TreeObject " and
when you run this it works. the clients are clearly returned an array
3 TreeObjects objects. However I cannot actually invoke any functions
on these tree objects. This is the current definition of TreeObject:

Imports System.Web.Serv ices

<System.Seriali zable()_
Public Class TreeObject

Public Sub New()

End Sub

<WebMethod()_
Public Sub setId(ByVal id As Int32)

End Sub

<WebMethod()_
Public Function getId() As String
Return 1
End Function

<WebMethod()_
Public Sub setName(ByVal value As String)
End Sub

<WebMethod()_
Public Function getName() As String
Return "boo ya"
End Function

End Class

However the functions GetName, SetName, GetId, SetId do not appear in
the WSDL file and the functions are not accessable from the client. (I
think TreeObject has no functions other than those inherited from
Object)

How do I make those functions accessible please? Do I need to set up
another "service" or what?

Thanks

Phill
Jun 27 '08 #1
10 2131
On 6 maio, 11:23, Phillip Taylor <Phillip.Ross.T ay...@gmail.com >
wrote:
Hi guys, I'm looking to develop a simple web service in VB.NET but I'm
having some trivial issues. In Visual Studio I create a web services
project and change the asmx.vb file to this:

Imports System.Web.Serv ices
Imports System.Web.Serv ices.Protocols
Imports System.Componen tModel

<System.Web.Ser vices.WebServic e(Namespace:="h ttp://
wwwpreview.#del eted#.co.uk/~ptaylor/Customer.wsdl") _
<System.Web.Ser vices.WebServic eBinding(Confor msTo:=WsiProfil es.BasicProfile 1_1)>
_
<ToolboxItem(Fa lse)_
Public Class CustomerService
Inherits System.Web.Serv ices.WebService

<WebMethod()_
Public Function getCustomer() As TreeObject()

Dim t1 As New TreeObject
Dim t2 As New TreeObject
Dim t3 As New TreeObject

Dim arr(2) As TreeObject
arr(0) = t1
arr(1) = t2
arr(2) = t3

Return arr
End Function

End Class

As you can see my function returns an object of type "TreeObject " and
when you run this it works. the clients are clearly returned an array
3 TreeObjects objects. However I cannot actually invoke any functions
on these tree objects. This is the current definition of TreeObject:

Imports System.Web.Serv ices

<System.Seriali zable()_
Public Class TreeObject

Public Sub New()

End Sub

<WebMethod()_
Public Sub setId(ByVal id As Int32)

End Sub

<WebMethod()_
Public Function getId() As String
Return 1
End Function

<WebMethod()_
Public Sub setName(ByVal value As String)
End Sub

<WebMethod()_
Public Function getName() As String
Return "boo ya"
End Function

End Class

However the functions GetName, SetName, GetId, SetId do not appear in
the WSDL file and the functions are not accessable from the client. (I
think TreeObject has no functions other than those inherited from
Object)

How do I make those functions accessible please? Do I need to set up
another "service" or what?

Thanks

Phill
As I know, you need to public expose the methods in the .asmx.
Jun 27 '08 #2
On May 6, 4:02 pm, Thiago Macedo <thiago.ch...@g mail.comwrote:
On 6 maio, 11:23, Phillip Taylor <Phillip.Ross.T ay...@gmail.com >
wrote:
Hi guys, I'm looking to develop a simple web service in VB.NET but I'm
having some trivial issues. In Visual Studio I create a web services
project and change the asmx.vb file to this:
Imports System.Web.Serv ices
Imports System.Web.Serv ices.Protocols
Imports System.Componen tModel
<System.Web.Ser vices.WebServic e(Namespace:="h ttp://
wwwpreview.#del eted#.co.uk/~ptaylor/Customer.wsdl") _
<System.Web.Ser vices.WebServic eBinding(Confor msTo:=WsiProfil es.BasicProfile 1_1)>
_
<ToolboxItem(Fa lse)_
Public Class CustomerService
Inherits System.Web.Serv ices.WebService
<WebMethod()_
Public Function getCustomer() As TreeObject()
Dim t1 As New TreeObject
Dim t2 As New TreeObject
Dim t3 As New TreeObject
Dim arr(2) As TreeObject
arr(0) = t1
arr(1) = t2
arr(2) = t3
Return arr
End Function
End Class
As you can see my function returns an object of type "TreeObject " and
when you run this it works. the clients are clearly returned an array
3 TreeObjects objects. However I cannot actually invoke any functions
on these tree objects. This is the current definition of TreeObject:
Imports System.Web.Serv ices
<System.Seriali zable()_
Public Class TreeObject
Public Sub New()
End Sub
<WebMethod()_
Public Sub setId(ByVal id As Int32)
End Sub
<WebMethod()_
Public Function getId() As String
Return 1
End Function
<WebMethod()_
Public Sub setName(ByVal value As String)
End Sub
<WebMethod()_
Public Function getName() As String
Return "boo ya"
End Function
End Class
However the functions GetName, SetName, GetId, SetId do not appear in
the WSDL file and the functions are not accessable from the client. (I
think TreeObject has no functions other than those inherited from
Object)
How do I make those functions accessible please? Do I need to set up
another "service" or what?
Thanks
Phill

As I know, you need to public expose the methods in the .asmx.
That's what I thought adding <WebMethod ()_ to everything did, but
it doesn't seem to be enough on it's own.
Jun 27 '08 #3
Phillip Taylor wrote:
>
<WebMethod()_
Public Function getCustomer() As TreeObject()

Dim t1 As New TreeObject
Dim t2 As New TreeObject
Dim t3 As New TreeObject

Dim arr(2) As TreeObject
arr(0) = t1
arr(1) = t2
arr(2) = t3

Return arr
End Function

End Class

As you can see my function returns an object of type "TreeObject " and
when you run this it works. the clients are clearly returned an array
3 TreeObjects objects. However I cannot actually invoke any functions
on these tree objects. This is the current definition of TreeObject:
When a WebService returns an Object to the calling program, it is sending the
data needed to create such an object. The data is being passed as XML. For the
calling program to use it, it must have the class definition of that object
available. It then creates a new instance of that class, and uses the data
received from the web service to initialize it. There is no sense in which you
are actually sending a functional object to the calling program.

Typically you would have a dll or similar that defines the class, with
properties identified as serializable, which is used by both the web service and
the calling program. When the web service is asked to return an instance of this
class, it returns as XML the values of the serializable properties. Then the
calling program creates an instance of the same class, and uses the serialized
XML data to make it the same as the one the web service used.

A good example is a Dataset, a class which both the web service and the calling
program can create. The web service can then be used to pass data serialized as
XML back and forth between a Dataset on the client and a Dataset on the server.

Jun 27 '08 #4
On May 6, 4:42 pm, "Steve Gerrard" <mynameh...@com cast.netwrote:
Phillip Taylor wrote:
<WebMethod()_
Public Function getCustomer() As TreeObject()
Dim t1 As New TreeObject
Dim t2 As New TreeObject
Dim t3 As New TreeObject
Dim arr(2) As TreeObject
arr(0) = t1
arr(1) = t2
arr(2) = t3
Return arr
End Function
End Class
As you can see my function returns an object of type "TreeObject " and
when you run this it works. the clients are clearly returned an array
3 TreeObjects objects. However I cannot actually invoke any functions
on these tree objects. This is the current definition of TreeObject:

When a WebService returns an Object to the calling program, it is sending the
data needed to create such an object. The data is being passed as XML. For the
calling program to use it, it must have the class definition of that object
available. It then creates a new instance of that class, and uses the data
received from the web service to initialize it. There is no sense in which you
are actually sending a functional object to the calling program.

Typically you would have a dll or similar that defines the class, with
properties identified as serializable, which is used by both the web service and
the calling program. When the web service is asked to return an instance of this
class, it returns as XML the values of the serializable properties. Then the
calling program creates an instance of the same class, and uses the serialized
XML data to make it the same as the one the web service used.

A good example is a Dataset, a class which both the web service and the calling
program can create. The web service can then be used to pass data serialized as
XML back and forth between a Dataset on the client and a Dataset on the server.
So essentially I have to mirror all the objects locally (with the
exception of the service itself)? They are not automatically generated
for me by the WSDL? On top of this, it must then reduce the entire
service to a single interface wall...effectiv ely making SOAP identical
to XML-RPC with no benefits at all since I either break encapsulation,
moving entire objects and their contents to the client for processing,
or I have to pass the object data backwards and forwards like a C
style, completely un-object-oriented application?

Surely this is not correct is it?
Jun 27 '08 #5
On May 6, 12:31 pm, Phillip Taylor <Phillip.Ross.T ay...@gmail.com >
wrote:
On May 6, 4:42 pm, "Steve Gerrard" <mynameh...@com cast.netwrote:
Phillip Taylor wrote:
<WebMethod()_
Public Function getCustomer() As TreeObject()
Dim t1 As New TreeObject
Dim t2 As New TreeObject
Dim t3 As New TreeObject
Dim arr(2) As TreeObject
arr(0) = t1
arr(1) = t2
arr(2) = t3
Return arr
End Function
End Class
As you can see my function returns an object of type "TreeObject " and
when you run this it works. the clients are clearly returned an array
3 TreeObjects objects. However I cannot actually invoke any functions
on these tree objects. This is the current definition of TreeObject:
When a WebService returns an Object to the calling program, it is sending the
data needed to create such an object. The data is being passed as XML. For the
calling program to use it, it must have the class definition of that object
available. It then creates a new instance of that class, and uses the data
received from the web service to initialize it. There is no sense in which you
are actually sending a functional object to the calling program.
Typically you would have a dll or similar that defines the class, with
properties identified as serializable, which is used by both the web service and
the calling program. When the web service is asked to return an instance of this
class, it returns as XML the values of the serializable properties. Then the
calling program creates an instance of the same class, and uses the serialized
XML data to make it the same as the one the web service used.
A good example is a Dataset, a class which both the web service and the calling
program can create. The web service can then be used to pass data serialized as
XML back and forth between a Dataset on the client and a Dataset on the server.

So essentially I have to mirror all the objects locally (with the
exception of the service itself)? They are not automatically generated
for me by the WSDL? On top of this, it must then reduce the entire
service to a single interface wall...effectiv ely making SOAP identical
to XML-RPC with no benefits at all since I either break encapsulation,
moving entire objects and their contents to the client for processing,
or I have to pass the object data backwards and forwards like a C
style, completely un-object-oriented application?

Surely this is not correct is it?
Unfortunately, you're trying to do something that is not possible with
web services. The purpose of a SOAP Web service (which is what
the .NET 2.0 Web services are) is to serve SOAP formatted XML, not
objects. They only pretend to be objects because Visual Studio / .NET
is "smart" enough to interpret SOAP formatted XML into proxy classes.
These proxy classes only contain property structures, not methods.

Basically, the normal flow for modifying object through a web service
is as follows:

1) User requests an item
2) Service handle requests, loads the item, and sends it to the user
3) User modifies properties of the item
4) User calls a Save web method and passes in the item
5) Service validates the property values and saves the item

As you see, the only time a user gets access to methods is through the
web service and not the object itself. It takes some getting used to,
but it isn't a very complicated concept, and is much, much more secure
than sending over your code. Just remember that the web service should
act as the presentation layer, and just call directly into your
business objects.

Thanks,

Seth Rowe [MVP]
Jun 27 '08 #6
On May 6, 7:02 pm, rowe_newsgroups <rowe_em...@yah oo.comwrote:
On May 6, 12:31 pm, Phillip Taylor <Phillip.Ross.T ay...@gmail.com >
wrote:
On May 6, 4:42 pm, "Steve Gerrard" <mynameh...@com cast.netwrote:
Phillip Taylor wrote:
<WebMethod()_
Public Function getCustomer() As TreeObject()
Dim t1 As New TreeObject
Dim t2 As New TreeObject
Dim t3 As New TreeObject
Dim arr(2) As TreeObject
arr(0) = t1
arr(1) = t2
arr(2) = t3
Return arr
End Function
End Class
As you can see my function returns an object of type "TreeObject " and
when you run this it works. the clients are clearly returned an array
3 TreeObjects objects. However I cannot actually invoke any functions
on these tree objects. This is the current definition of TreeObject:
When a WebService returns an Object to the calling program, it is sending the
data needed to create such an object. The data is being passed as XML. For the
calling program to use it, it must have the class definition of that object
available. It then creates a new instance of that class, and uses the data
received from the web service to initialize it. There is no sense in which you
are actually sending a functional object to the calling program.
Typically you would have a dll or similar that defines the class, with
properties identified as serializable, which is used by both the web service and
the calling program. When the web service is asked to return an instance of this
class, it returns as XML the values of the serializable properties. Then the
calling program creates an instance of the same class, and uses the serialized
XML data to make it the same as the one the web service used.
A good example is a Dataset, a class which both the web service and the calling
program can create. The web service can then be used to pass data serialized as
XML back and forth between a Dataset on the client and a Dataset on the server.
So essentially I have to mirror all the objects locally (with the
exception of the service itself)? They are not automatically generated
for me by the WSDL? On top of this, it must then reduce the entire
service to a single interface wall...effectiv ely making SOAP identical
to XML-RPC with no benefits at all since I either break encapsulation,
moving entire objects and their contents to the client for processing,
or I have to pass the object data backwards and forwards like a C
style, completely un-object-oriented application?
Surely this is not correct is it?

Unfortunately, you're trying to do something that is not possible with
web services. The purpose of a SOAP Web service (which is what
the .NET 2.0 Web services are) is to serve SOAP formatted XML, not
objects. They only pretend to be objects because Visual Studio / .NET
is "smart" enough to interpret SOAP formatted XML into proxy classes.
These proxy classes only contain property structures, not methods.

Basically, the normal flow for modifying object through a web service
is as follows:

1) User requests an item
2) Service handle requests, loads the item, and sends it to the user
3) User modifies properties of the item
4) User calls a Save web method and passes in the item
5) Service validates the property values and saves the item

As you see, the only time a user gets access to methods is through the
web service and not the object itself. It takes some getting used to,
but it isn't a very complicated concept, and is much, much more secure
than sending over your code. Just remember that the web service should
act as the presentation layer, and just call directly into your
business objects.

Thanks,

Seth Rowe [MVP]
I don't want to come across as stupid by reiterating the question but
you are telling me that SOAP is nothing more than XML-RPC. That there
is a wall of functions (like a C style API) that return simple types
or structures and I still question this. I *believe* that with SOAP I
can return references to instance objects. I believe I can *somehow*
(possibly with the use of a proxy or a stub) invoke functions on the
client, which is wrapped up in a SOAP request and translated to an
actual invocation and running of the object instances method on the
server side. You are suggesting this is all that is possible:

SERVER SIDE

int CreateNewObject ( ... ) //returns an ID
string GetName (int uniqueId)

CLIENT SIDE

int myObjectId = CreateNewObject ()
string name = GetName( myObjectId )

( A C style wall of functions. The server needs to take the unique Id
and find the real object and invoke the function on it manually).

I actually believe this is possible with SOAP

SERVER SIDE

Object CreateNewObject (...)

CLIENT SIDE

Object o = new Object
string name = o.GetName() //Get name runs on the server, and the
result is specific to the instance in question.

--

Am I delusional? Can't this be done? I would appreciate it if a few
people could confirm or deny this. I'm sorry to ask after I already
got a reply but I'm still not sure how SOAP Servers are developed and
I would like this issue cleared up. Is what I have described possible
or not?
Jun 27 '08 #7
I don't want to come across as stupid by reiterating the question but
you are telling me that SOAP is nothing more than XML-RPC.
Yes, SOAP is the successor to XML-RPC, and like XML-RPC it returns
simple objects which are nothing more than a set of properties (no
methods).
That there
is a wall of functions (like a C style API) that return simple types
or structures
If by "simple types or structures" you mean objects with only
properties than you are correct.
and I still question this.
Which is fine, I'll try to explain as best I can.
I *believe* that with SOAP I
can return references to instance objects.
AFAIK, you cannot return references to server side objects through
the .NET 2.0 SOAP Web Services.
I believe I can *somehow*
(possibly with the use of a proxy or a stub) invoke functions on the
client, which is wrapped up in a SOAP request and translated to an
actual invocation and running of the object instances method on the
server side.
The only way to invoke functions is to call them through the web
service using a SOAP formatted request. There is no "magic"
translation that happens that gives the client the ability to invoke
methods on the object. If I confused you by talking about proxy
classes earlier than let me rephrase - proxy classes are just very
simple objects (properties only) that .NET creates for you to give you
compile time support. All that happens is that the framework reads the
WSDL, pulls out the property structure and does a simple code gen to
create the classes. You'll notice that you'll also lose any
functionality in the properties (such as validation code), they become
simple get..set.. pairs.
You are suggesting this is all that is possible:
Nope. I'm saying if you want to invoke functions on a web service you
must call them through the web service, not the objects served by the
web service.

Take a look at this simple, pseudocode, example on how to use a
service.

Here's the Web Service code:

////////////////
<WebMethod()_
Public Function GetProgrammerBy BadgeId(badgeId as integer) As
Programmer
Return New Programmer(badg eId)
End Function

<WebMethod()_
Public Sub SaveProgrammer( programmer as Programmer)
'// We get the Programmer's methods back
programmer.Save ()
End Sub
///////////////

And the code for the programmer class:

//////////////
Public Class Programmer

Public Sub New()

End Sub

Public Sub New(badgeId as Integer)
Me.New()

Me.BadgeId = badgeId
Me.Load()
End Sub

'// I'm too lazy to type these out, they are standard properties
Public Property BadgeId As Integer()
Public Property Name As String()
Public Property FavoriteLanguag e As String()

Private Sub Load()
'// Load the object from the data access layer
DALC.Load(Me, badgeId)
End Sub

Private Sub Save()
'// Save the object through the data access layer
DALC.Save(Me)
End Sub

End Class
/////////////

This is the client side code:

///////////////
'// Instantiate a new web service
Using service As New ProgrammersServ ice()
Dim programmer As ProgrammersServ ice.Programmer =
service.GetProg rammerByBadgeId (999)

Console.WriteLi ne("The Programmer's Name is {0}", programmer.Name )
'// Prints "Seth Rowe"
Console.WriteLi ne("The Programmer's preferred language is {0}",
programmer.Pref erredLanguage) '// Prints C#

'// Since C# isn't my favorite language, we need to update the
database
programmer.Pref erredLanguage = "VB.NET"

'// That call only sets the client side property value, we now
need to save the object back
service.SavePro grammer(program mer)
End Using
///////////////

Hopefully that makes a little more sense on how you should be using
web services. Basically you just get the object, do any client side
processing with the properties, and then save the object back to the
web service. If you're really, really stuck and can't figure out how
to implement this pattern with your CustomerService object, let me
know and I'll try to help.

Thanks,

Seth Rowe [MVP]
Jun 27 '08 #8
Phillip Taylor wrote:
server side. You are suggesting this is all that is possible:

SERVER SIDE

int CreateNewObject ( ... ) //returns an ID
string GetName (int uniqueId)

CLIENT SIDE

int myObjectId = CreateNewObject ()
string name = GetName( myObjectId )

( A C style wall of functions. The server needs to take the unique Id
and find the real object and invoke the function on it manually).

I actually believe this is possible with SOAP

SERVER SIDE

Object CreateNewObject (...)

CLIENT SIDE

Object o = new Object
string name = o.GetName() //Get name runs on the server, and the
result is specific to the instance in question.
The more likely scenario, given your intentionally simple example:

SERVER:
GetAnObject() As MyClass
' returns, as XML, an Integer and a String

SaveObject(Obj As MyClass)
'saves the passed object

CLIENT:
Dim o As MyClass = ws.GetAnObject( )
' MyClass is a generated type on the client end
' containing properties, but no code
x = o.ID
y = o.ObjName

o.ObjName = "New Name"
ws.SaveObject(o )

On the server side, MyClass may be a full blown class, with all sorts of things
going on inside, or just a type with some properties.
On the client, it can be the typical auto-generated shell class, with just a
matching set of properties, or the client can create a full blown object, and
use the passed data to initialize it.

As far as what goes over the wire between the two, though, it is XML, meaning
some nested structure of data values. It is the equivalent of serializing the
object to a file, and then recreating the object at the other end from that
stored data.
Jun 27 '08 #9
On May 7, 12:54 pm, rowe_newsgroups <rowe_em...@yah oo.comwrote:
I don't want to come across as stupid by reiterating the question but
you are telling me that SOAP is nothing more than XML-RPC.

Yes, SOAP is the successor to XML-RPC, and like XML-RPC it returns
simple objects which are nothing more than a set of properties (no
methods).
That there
is a wall of functions (like a C style API) that return simple types
or structures

If by "simple types or structures" you mean objects with only
properties than you are correct.
and I still question this.

Which is fine, I'll try to explain as best I can.
I *believe* that with SOAP I
can return references to instance objects.

AFAIK, you cannot return references to server side objects through
the .NET 2.0 SOAP Web Services.
I believe I can *somehow*
(possibly with the use of a proxy or a stub) invoke functions on the
client, which is wrapped up in a SOAP request and translated to an
actual invocation and running of the object instances method on the
server side.

The only way to invoke functions is to call them through the web
service using a SOAP formatted request. There is no "magic"
translation that happens that gives the client the ability to invoke
methods on the object. If I confused you by talking about proxy
classes earlier than let me rephrase - proxy classes are just very
simple objects (properties only) that .NET creates for you to give you
compile time support. All that happens is that the framework reads the
WSDL, pulls out the property structure and does a simple code gen to
create the classes. You'll notice that you'll also lose any
functionality in the properties (such as validation code), they become
simple get..set.. pairs.
You are suggesting this is all that is possible:

Nope. I'm saying if you want to invoke functions on a web service you
must call them through the web service, not the objects served by the
web service.

Take a look at this simple, pseudocode, example on how to use a
service.

Here's the Web Service code:

////////////////
<WebMethod()_
Public Function GetProgrammerBy BadgeId(badgeId as integer) As
Programmer
Return New Programmer(badg eId)
End Function

<WebMethod()_
Public Sub SaveProgrammer( programmer as Programmer)
'// We get the Programmer's methods back
programmer.Save ()
End Sub
///////////////

And the code for the programmer class:

//////////////
Public Class Programmer

Public Sub New()

End Sub

Public Sub New(badgeId as Integer)
Me.New()

Me.BadgeId = badgeId
Me.Load()
End Sub

'// I'm too lazy to type these out, they are standard properties
Public Property BadgeId As Integer()
Public Property Name As String()
Public Property FavoriteLanguag e As String()

Private Sub Load()
'// Load the object from the data access layer
DALC.Load(Me, badgeId)
End Sub

Private Sub Save()
'// Save the object through the data access layer
DALC.Save(Me)
End Sub

End Class
/////////////

This is the client side code:

///////////////
'// Instantiate a new web service
Using service As New ProgrammersServ ice()
Dim programmer As ProgrammersServ ice.Programmer =
service.GetProg rammerByBadgeId (999)

Console.WriteLi ne("The Programmer's Name is {0}", programmer.Name )
'// Prints "Seth Rowe"
Console.WriteLi ne("The Programmer's preferred language is {0}",
programmer.Pref erredLanguage) '// Prints C#

'// Since C# isn't my favorite language, we need to update the
database
programmer.Pref erredLanguage = "VB.NET"

'// That call only sets the client side property value, we now
need to save the object back
service.SavePro grammer(program mer)
End Using
///////////////

Hopefully that makes a little more sense on how you should be using
web services. Basically you just get the object, do any client side
processing with the properties, and then save the object back to the
web service. If you're really, really stuck and can't figure out how
to implement this pattern with your CustomerService object, let me
know and I'll try to help.

Thanks,

Seth Rowe [MVP]
Thank you for taking the time out to reply. I really mean that. What
you saying makes complete sense. I got the impression that if I passed
an object back from a web service, that it became a webservice itself
- hense I could suddenly call member methods on it - with the real
logic on the server side... but forget it... I was clearly confused
and completely delusional. I think I have better understanding of what
SOAP is now.

Thank you for clearing this up.
Jun 27 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3452
by: Jens Hibbeler | last post by:
Hello, I am trying to write a Webservice with Borland C++ Builder 6. I use the WSDL importer but I have no idea how to acess the Webservice. I have tried the following: The WSDL File is from the Google Webservice and looks like this
5
1567
by: hellrazor | last post by:
Hi, (new to webservices here) Is it possible to access a class instance variable defined in a webservice? I want to access this variable, in addition to the data being returned by the . so let's say I have the following webservice class: public class Service1 : System.Web.Services.WebService
2
1507
by: author | last post by:
Newbie Q... When I hit the "ws.asmx" in a browser, I get "Parser Error Message: Could not create type 'Service1'" ?? If I use the file "ws_ok.asmx" (without codebehind, but same code), I get no errors. Any 1 ??
0
1671
by: Rene Ruppert | last post by:
Hi, On the web I found a simple sample/tutorial for a webservice, some kind of chat software. I implemented the server and the client. When I run the client form on the host PC everything works fine. When I run it on the PPC device emulator it keeps saying that it cannot connect to the server. The device emu is cradled and I can surf the web with Pocket Internet Explorer. But: when I call the ChatService.asmx file from Pocket Explorer
1
2194
by: gilad.kapel | last post by:
Hi Some background: working with VS 2005 + Win2003 + IIS6. I have a webservice that creates (if the directory doesn't exist the webservice creates it) a directory "Temp" under the webservice local directory (usualy c:\inetpub\wwwroot\<service name>\Temp) I'm able to create the directory but when I try to write to it I get premission error. for solving this I allow "Full Control" to IIS_WPG
1
345
by: toudidel | last post by:
What can be named webservice? Is asp script receiving by POST method some xml data, performing and responding result, webservice or not yet? Must it be described with WSDL or not (if i want to name it webservice)? Question is: is any server script (performing e.g. xml's) a webservice or not? what must be done to name it webservice? -- td
5
3049
by: Andy | last post by:
Hi, below is simple webservice wich I'd like to test in my local host and when I put http://localhost/test.asmx I'm getting this error: XML Parsing Error: no element found Location: http://localhost/test.asmx Line Number 1, Column 1: Can somebody help me why? What I'm missing?
2
2119
by: cj | last post by:
<System.Web.Services.WebService(Name:="CJ's Service", Description:="Testing 123", Namespace:="http://myco.com/cj/one")_ <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"
0
8863
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8739
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9384
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9157
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9088
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8052
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5995
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2602
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.