Re: WCF Proxies



It's not so much that ASMX web services aren't meeting your needs, in as
much that it's the way you went about the design of the service.

Essentially, you've got a network composed of A, B, and C - and a client
that wants to communicate with those three. The client expects a "result"
message back from them, and can send them "request" messages that they all
understand. For them and the client to all speak the same language, the
language becomes the protocol for the network.

What you can do is this: use a single service as the "authority" for the
protocol specification of your network. This service is where all operations
and typed messages are defined. The types can be defined in a
CommonTypes.dll but that assembly is only for the service - it is not
deployed to the client.

The only knowledge the client has of the "types" is those defined in the
WSDL provided by the service. So the client generates a proxy for the WSDL.
And you can change the URL property of the proxy class to point it at
different services.

In a sense, the client is saying it expects a message in the defined format,
and the services provide messages in that format.

I implemented something similiar where the IODEF specification was the
defined format, and three servers are providers of messages in that format,
with additional servers to be added later. The end result is the client
queries a database to get list of URLs for each server, then loops through
the list, calling each service: something like so:

void Main()
{
PublisherService svc = new PublisherService();
foreach (string s in urls)
{
svc.Url = s;
IODEFDocument doc = svc.GetReport();
// do something with it
}
}

The "network" also has Java clients running a similiar routine to invoke the
available servers.

There is a downfall to this, in that the IODEF spec is a pretty rich
document, and less than desirable to work with on the client side. For
instance, I wanted to display some aspects of the document in a .NET 1.1
DataGrid so I could get that multi-table view in a single grid. So I had to
map the IODEFDocument class from the proxy to a typed dataset - which is
pretty tedious code-wise.

But, the important thing is - don't distribute the CommonTypes.dll to the
client because all the info they need (to generate code) they can get from
the WSDL.

Ron
"Tatworth" <Tatworth@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:DD9D3F0B-45D3-4AFD-B65E-38CF19BDD3ED@xxxxxxxxxxxxxxxx
In my example service A, B and C while having the same return type, all
perform different actions, even though they all have the same signature.
They could all be consumed bya single application. Coding would be
simplified
if I could refer to just Common.Return instead A.Return, B.Return or
C.Return
as the proxy creation process recognised that the each service method
returned Common.Return and code the proxy class as such.

"Tatworth" wrote:

Is there any advantage in upgrading from ASP.NET 2.0/WSE 3.0 to WCF RC1
is
respect of generated web proxies?
Under ASP.NET 2.0/WSE 3.0 if web services A, B, C all have a method that
returns a structure COMMON.RESULT, the generated proxies will be
A.RESULT,
B.RESULT, C.RESULT. Does WCF improve on this?


.



Relevant Pages

  • Re: link problem in a C++ web service client
    ... > Java web services and need to test them with C++ clients. ... I'm having problems with the C++ client. ... > reference to the service WSDL and named the reference donow11service, ... > Creating web service proxy file for donow11service ... ...
    (microsoft.public.dotnet.languages.vc)
  • Re: WSDL Generated Proxy Classes?
    ... WSDL file is that each client can download the WSDL file and generate ... In other words, the logic that a proxy class encapsulates, the same ... I think that you're missing the point that web services are not tied to a technology or an environment, and that the proxy classes can be generated dynamically during runtime. ... Both Web Services & business objects require compiled objects that are ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ISA Server Problems, please help
    ... The All access rule for SBS Internet ... Web Proxy and/or ... > To accommodate the linux SecureNAT clients you should create a new Client ... ISA Server denies the specified Uniform Resource Locator. ...
    (microsoft.public.windows.server.sbs)
  • Re: Need to Turn Off Proxy Server in SBS 4.5
    ... client machines (it is done by default when you install an SBS client)? ... IE's web proxy settings are disabled like you said, ... Server is internal only...no outside web or ftp serving. ...
    (microsoft.public.backoffice.smallbiz)
  • Re: Please enter password for HTTP proxy
    ... Web Proxy log: WEBEXTDyyyymmdd.log ... This newsgroup only focuses on SBS technical issues. ... |> on to the SBS server that hosts the ISA. ... |> sure the problematic clients also have Firewall Client installed. ...
    (microsoft.public.windows.server.sbs)

Loading