Hi
I would like some advice on how best to use web service proxy classes. Lets
say I have a web service with 3 methods to GetCustomer, DeleteCustomer and
UpdateCustomer. In my client code I might have a class that will call
GetCustomer and then depending on user input, I might want to DeleteCustomer
or UpdateCustomer. In my client code I will need an instance of a proxy
class for the web service I want to use and as I see it, there are 3 ways I
could use this proxy class.
a) Create a static class with a static instance of the web service proxy
and in my customer client class use the static instance of proxy in the
static class in my GetCustomer(), DeleteCustomer( ), and UpdateCustomer( )
methods.
b) Create a new private instance in my customer client class and re-use the
same private instance in my GetCustomer(), DeleteCustomer( ),
andUpdateCustom er() methods.
c) In my customer client class, create a new local instance of the proxy in
each of the methods so GetCustomer() would instantiate a new instance of the
web service proxy, DeleteCustomer( ) would instantiate a new instance of the
web service proxy and so would UpdateCustomer( ).
What's the preferred way?
My second question is this: If I write a web service application that is
capable of retrieving/updating all sorts of data such as customers,
products, orders, stock etc should I create multiple web services, one for
each type of data, or is it better to create one large web service with all
the methods for creating and updating all the various data types (I will be
creating seperate class files for all the data access methods so the method
body of each web method will only be 1 or 2 lines)?
Your comments will be most welcome.
Thanks!
John 0 1389 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Bill Hauver |
last post by:
I am attempting to use a web service from my work pc
which is behind a firewall. I have used wsdl.exe to
create the web service reference class and added it to my
project. (this seems to work without a hitch).
Before I use this class, I make the necessary calls to
instantiate a WebProxy class and then pass in my
credentials to set the WebProxy.Credentials property so I
can get through the proxy server.
|
by: Noel |
last post by:
Hello,
I'm currently developing a web service that retrieves data from an employee
table. I would like to send and retrieve a custom employee class to/from the
webservice. I have currently coded the custom employee class and have built
it as a separate library (employee.dll). This employee.dll is being
referenced by both the web service and the windows application.
I face the following problem when I send this class to the webservice.
|
by: Nate |
last post by:
We are attempting to make a request to a web service (we will refer to it as
XXXServices) hosted on a Web Logic server from a C# SOAP client. The server
responds with a 401 Unauthorized error (that appears in plain text), and
causes the client to crash. This C# code has been deployed both as an
ASP.NET application and a WinForms app, each of which produced the same
result. Further, moving the clients from a Windows XP machine to Windows...
|
by: Nestor |
last post by:
Hello all,
I'm begining in the web services world and I've reading about how to
invoke them using javascript from Mozilla browser (version 2.0 in my
case).
I found a very interesting example here:
http://www.mozilla.org/projects/webservices/examples/babelfish-wsdl/index.html
The problem I have is this: When I try to adapt the invokation on the
|
by: =?Utf-8?B?c3JpZGhhcg==?= |
last post by:
would like to know is it recommended to use techniques like object pooling or
the using static instances of the proxy class of a web serivice
highly appreciate your opinions and recommendations on how to of the above
scenario.
are there any best practices in using proxy classes of a web service
Thanks in advance
| |
by: =?Utf-8?B?Q3JhaWc=?= |
last post by:
Background:
I am building a Windows enterprise application that has separate assemblies
for UI, business logic/rules, and data access (i.e. typical N-tier
architecture). Many of the assemblies reference a "name and address web
service," which gives me validation lists for name honorifics (e.g. Dr, Mr,
Miss, Mrs), name suffixes (e.g. Sr, Jr, III), and City/State/ZIP combos. The
same name and address web service also can save and retrieve...
|
by: Jon |
last post by:
I wrote a VS 2005 C# express programme that accesses a web service. It works fine when there's a
direct connection to the internet, but on two different PCs with internet access via a proxy, I get
this exception:
System.Net.WebException: The request failed with HTTP status 407: Proxy Authentication Required.
at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message,
WebResponse response, Stream...
|
by: nathan.alden |
last post by:
I have a Windows application that must "log in" to a remote service.
Once logged in, for all subsequent service calls the Windows
application should somehow pass a "session context" in each message to
the service, which will then be compared to session information stored
in SQL Server. However, for each service call a new client proxy is
created, i.e. I'm not reusing the same proxy over and over.
Essentially, I need to emulate what...
|
by: |
last post by:
Hi all,
I have an asp.net 2.0 website that accesses a locally hosted web service.
This works fine on servers that are connected to our network. However, I am
having a problem with a laptop server that I have built. The code that tries
to connect to the web service breaks if the laptop is not within our
network. Further debugging has revealed that this is due to a proxy server
issue. Our domain sets the proxy server via GPO for all...
|
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...
|
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...
| |
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...
|
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...
|
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();...
|
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...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |