473,785 Members | 2,789 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Web Services and Web References

I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site of
on an intranet server. What are the best practices for creating web services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?
Nov 23 '05 #1
4 2201
For security, I sugguest that use many web services with few functions. If
one cannot find a door, one will not wanna attack it.
"Ryan Wade" <Ryan Wa**@discussion s.microsoft.com> wrote in message
news:DC******** *************** ***********@mic rosoft.com...
I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site
of
on an intranet server. What are the best practices for creating web
services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?

Nov 23 '05 #2
For security, I sugguest that use many web services with few functions. If
one cannot find a door, one will not wanna attack it.
"Ryan Wade" <Ryan Wa**@discussion s.microsoft.com> wrote in message
news:DC******** *************** ***********@mic rosoft.com...
I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site
of
on an intranet server. What are the best practices for creating web
services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?

Nov 23 '05 #3
It depends on how many application layers you will implement and how often
you will be adding new webservices & functionallity to the system, not to
mention personal preference :)

You could go to extremes and have a single method with parametrized
method-to-call-name, object-input and object-return, (e.g. public object
DoSomething(str ing methodName, object input)) and figure out what to do in
the back, as some data access layers are built. But that's really going to
extremes and requires extra layers with actual methods in front and begind
the ws. It is justified sometimes, though; as always it depends on the
problem.

In a relatively fixed-spec scenario I personally go for object-like
webservices - more services, with fewer methods, just like you normally
build different objects with their respective methods.
This means you need to have several ws references on the client (one ws -
one reference), but it is no biggie and you also have better control. You
can either generate proxies in VS, or manually via the wsdl tool
(e.g. wsdl /out:WSObresti.c s
/namespace:Rrc.D ursNet.Obresti. UI.WSObrestiCli ent
http://localhost/durs/WSObresti/WSObresti.asmx)
The only gripe about this is that objects suddenly come from different
namespaces, so some typecasting is usually involved.

In either scenario I would recommend an intermediate layer on the client, so
that changes to the transport mechanism and webservices need not affect the
client directly. It's not that much work, but may save you plenty of nerves
in the future.
I also recommend that you store the ws urls into the config file of some
sorts (you then target the ws at appropriate urls in the intermediate
layer), so you don't have to recompile the app if you move your webservices
around.

Another thought... if you are transferring your own objects, take a good
look into xml & soap serialization. If you need functionallity only binary
serialization can provide, serialize the objects via binary serializer and
transfer them as byte arrays, then deserialize them back at the client.

Good luck!

Regards,

Sigmund Jakhel
MCSD.NET

"Ryan Wade" <Ryan Wa**@discussion s.microsoft.com> wrote in message
news:DC******** *************** ***********@mic rosoft.com...
I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site
of
on an intranet server. What are the best practices for creating web
services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?

Nov 23 '05 #4
It depends on how many application layers you will implement and how often
you will be adding new webservices & functionallity to the system, not to
mention personal preference :)

You could go to extremes and have a single method with parametrized
method-to-call-name, object-input and object-return, (e.g. public object
DoSomething(str ing methodName, object input)) and figure out what to do in
the back, as some data access layers are built. But that's really going to
extremes and requires extra layers with actual methods in front and begind
the ws. It is justified sometimes, though; as always it depends on the
problem.

In a relatively fixed-spec scenario I personally go for object-like
webservices - more services, with fewer methods, just like you normally
build different objects with their respective methods.
This means you need to have several ws references on the client (one ws -
one reference), but it is no biggie and you also have better control. You
can either generate proxies in VS, or manually via the wsdl tool
(e.g. wsdl /out:WSObresti.c s
/namespace:Rrc.D ursNet.Obresti. UI.WSObrestiCli ent
http://localhost/durs/WSObresti/WSObresti.asmx)
The only gripe about this is that objects suddenly come from different
namespaces, so some typecasting is usually involved.

In either scenario I would recommend an intermediate layer on the client, so
that changes to the transport mechanism and webservices need not affect the
client directly. It's not that much work, but may save you plenty of nerves
in the future.
I also recommend that you store the ws urls into the config file of some
sorts (you then target the ws at appropriate urls in the intermediate
layer), so you don't have to recompile the app if you move your webservices
around.

Another thought... if you are transferring your own objects, take a good
look into xml & soap serialization. If you need functionallity only binary
serialization can provide, serialize the objects via binary serializer and
transfer them as byte arrays, then deserialize them back at the client.

Good luck!

Regards,

Sigmund Jakhel
MCSD.NET

"Ryan Wade" <Ryan Wa**@discussion s.microsoft.com> wrote in message
news:DC******** *************** ***********@mic rosoft.com...
I am very new to web services and I am creating a thin-client windows app
that will access it's data via web services whether on a remote web site
of
on an intranet server. What are the best practices for creating web
services
like this? I will create my own objects and pass them through the web
services(s). Should I use 1 web service with many functions or many web
services with few functions? If I use many web services do I have to add a
web reference in my project to all of them or just one?

Nov 23 '05 #5

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

Similar topics

8
4192
by: Bill Sonia | last post by:
I've written a Windows Service to send e-mails on events like OnStart, OnStop, OnShutDown using System.Web.Mail. It works for everything but OnShutdown. My guess is that for OnShutDown, once my send mail code is executed, other necessary Windows Services have been terminated before it can actually send the mail. I've updated my HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services registry DependOnService value including SMPTSVC and...
0
4616
by: Saumendra | last post by:
Hi guys, When I am adding a Web Reference in Visual Studio.net, I provide the url to the .vsdisco file, so that Visual Studio.net can dynamically discover all the available Web Services. Now when I do this, I get a list of all the Web Services. Next I want add reference to all these Web Service to my Visual Studio.net project, and so I hit "Add reference" button on the Add Reference dialog box. By doing this I THOUGHT all the Web...
3
2506
by: Chris Dunaway | last post by:
A quick scan of the group did not immediately reveal an answer to my questions so here goes. First let me describe my app and then I'll ask the questions. I am writing a Windows Forms App (not Web Forms) that serves as a thin client to some web services. In other words, the Windows Forms app will be installed on the client machines and that app will call web services that are deployed on my server.
3
6511
by: Matt D | last post by:
I've got two web services that use the same data types and that clients will have to consume. I read the msdn article on sharing types (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnservice/html/service07162002.asp) but I don't want clients to have to add two web references and then manually have to edit the proxy classes. After doing some searching I found that putting references to multiple web services in a .disco...
3
5006
by: Olivier BESSON | last post by:
Hello, I have a web service of my own on a server (vb.net). I must declare it with SoapRpcMethod to be used with JAVA. This is a simple exemple method of my vb source : >************************************************************************ > <WebMethod(), System.Web.Services.Protocols.SoapRpcMethod()> _ > Public Function HelloWorld() As > <System.Xml.Serialization.SoapElementAttribute("return")> String
0
909
by: Eeraj | last post by:
In a large scale web service project, it is a good idea to group the services into logical units. So for example: http://myservices/CustomerService.asmx http://myservices/SupplierService.asmx http://myservices/EmployeeService.asmx have functions for Customer, Supplier and Employee related tasks respectively. So far, so good.
2
1301
by: Deecrypt | last post by:
Hi, I'm creating an ASP.NET website in Visual Studion 2005 using Csharp and have added Web References to "two" Web Services running on my localhost (Both WebServices and ASP.Net website are on the same machine). Even though the Web References exist, I am unable to consume the second Web Service I created. When I try to reference the WebMethod exposed by the second webservice, Visual Studio does not automatically recognise its existence....
3
1992
by: =?Utf-8?B?QS4gUm9iaW5zb24=?= | last post by:
I have been looking high and low and can't seem to find anything a little more detailed on the whole RS utility. What I'm looking for specifically is some type of programming reference. Also, I created a new VB project in VS2005, but yet when I write any code, Intellisense doesn't pick up anything. What reference/class do I need to add to the projuect? I've been looking through the available references under PROJECT>ADD REFERENCE and...
2
5576
by: ddieckmann | last post by:
I am writing an application that will use the FedEx Web Services to validate addresses and determine what services are available for an address. I have downloaded the sample code and WSDL files from FedEx. I have created references to both WSDL files: C:\Sep-WSDLs\AddressValidationService_v1.wsdl C:\Sep-WSDLs\RateAvailableServicesService_v2.wsdl I have created Imports statements for both references:
0
10336
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
10095
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,...
1
7502
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6741
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();...
0
5383
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5513
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4054
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
3655
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2881
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.