creating property in web services

Y

ypul

How to use properties in webservice ?

if I want to create a webservice as my middle tier and want to create
public properties so that the presentation layer can assign values to the
property and then call insert() method in webservice. how should I do that I
web service does not allow public properties .

there is one option of passing the property values through webmethod...but
it will disturb the architecture ...
what is a standard method of doing it ....??

also give me a alternative method of using webservices as middle tier for
insert update select operations ..

Please ...
waiting for many comments
vips
 
G

Guest

This is not how web services work, by default. The norm is send information
as a chunk and pass back as a chunk.

Now, you can set up static classes behind the web service, but the danger
here is the service will now have to track user sessions if you do not want
one user to get another user's data.

To pull information a piece at a time, you will have to create web methods
to retrieve each "property" set.

That is why I would not do it.

Better method:
1. Set up a class library of classes that are common to both tiers. Classes
are serializable
2. Deploy in both tiers
3. When web method is called, fill class and pass back, serialized, to
calling client.
4. Deserialize the object and use it

There are even better ways, perf wise, but they involve interfaces and
potentially some reflection. For most instances, the shared library works
quite well and it is easy enough to implement.


---

Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top