473,408 Members | 1,980 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Correct pattern of methods invocation on WSDL-generated type

Introduction:
Assume having a MyApp.MyClass class bearing both data (say, DataSets)
and functionality (proprietary methods).
A WebService exposes this class via some GetMyClass WebMethod.
A WSDL-generated proxy class (localhost.MyClass) on the client side,
naturally, has only the data of the original class "mirrored" (well,
that's reasonable, since the WebServices are there to provide data
objects...).

Now, to the question.
What is the proper pattern to be applied in order for the client to be
able, after receiving a (proxy-side type, localhost.MyClass) object
from GetMyClass WebMethod, to be able to invoke the methods of the
original MyApp.MyClass on that object's data?

Is it something to do with namespaces?
Should I build a library to be put on the client side (in the GAC?)
and referenced from the client object?
Should I create & override (extend) the proxy class by myself, and
provide the client with it (instead of client's generating the proxy
by itself)?

Please advise...
Nov 21 '05 #1
1 1397
yes, as you point out, the philosophy of webservices is to exchange
MESSAGES, not objects.

Therefore I advise you to use the DTO pattern.
http://msdn.microsoft.com/library/en...tml/DesDTO.asp

If you want to violate the philosophy of sending messages, and actually send
objects across the wire, then , yes you can do that too.

follow these steps:
define your service class to return MyClass
Build your shared MyClass into a distinct (shared) assembly
install that assembly on both client and server
generate the webservice proxy in the normal way
modify the webservice proxy - remove the generated (neutered) type and
replace it with the SharedAssembly.MyClass
off you go.

-Dino

"alexttp" <al*****@yahoo.com> wrote in message
news:85**************************@posting.google.c om...
Introduction:
Assume having a MyApp.MyClass class bearing both data (say, DataSets)
and functionality (proprietary methods).
A WebService exposes this class via some GetMyClass WebMethod.
A WSDL-generated proxy class (localhost.MyClass) on the client side,
naturally, has only the data of the original class "mirrored" (well,
that's reasonable, since the WebServices are there to provide data
objects...).

Now, to the question.
What is the proper pattern to be applied in order for the client to be
able, after receiving a (proxy-side type, localhost.MyClass) object
from GetMyClass WebMethod, to be able to invoke the methods of the
original MyApp.MyClass on that object's data?

Is it something to do with namespaces?
Should I build a library to be put on the client side (in the GAC?)
and referenced from the client object?
Should I create & override (extend) the proxy class by myself, and
provide the client with it (instead of client's generating the proxy
by itself)?

Please advise...

Nov 21 '05 #2

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

Similar topics

3
by: Alicia Roberts | last post by:
Hello everyone, I have been researching the Singleton Pattern. Since the singleton pattern uses a private constructor which in turn reduces extendability, if you make the Singleton Polymorphic...
4
by: Johan Lindh | last post by:
Hi all, If I read the standard correctly, a va_list variable that's initialized using va_copy() should be terminated with a va_end() on it. Is this correct? int test( va_list x ) { va_list...
10
by: dq_user_cjr | last post by:
I want to make some of my web methods avaible but basically want to hide them in the WSDL file so not just everyone can consume them. Is there a way using attributes to still have certain web...
5
by: Diffident | last post by:
Hello All, I am designing a class based on singleton pattern. Inside this class I have multiple instance methods. My question is since there will be only one instance of this class at any...
0
by: Brett Zimmerman | last post by:
Hi All, I have a web service derived from MarshalByRefObject (i.e. Not WebService) that also implements the IDisposable interface. The problem I have is with the implementation of the public...
2
by: D.J. Heap | last post by:
Is there a way to get VS2005 to generate the Begin/End pattern (as VS2003 always did) for async web service calls rather than the MethodAsync/MethodCompleted pattern when adding web references? ...
3
by: rickeringill | last post by:
Hi comp.lang.javascript, I'm throwing this in for discussion. First up I don't claim to be any sort of authority on the ecmascript language spec - in fact I'm a relative newb to these more...
0
by: kostadin | last post by:
I want to expose the whole functionality of a library through a web service. In order to do that of course I've created web methods for all public methods in this library. Because only public data...
4
by: Gert Kok | last post by:
The microsoft page http://msdn2.microsoft.com/en-us/library/9fkccyh4.aspx states: Remarks (nr 4) Virtual properties behave like abstract methods, except for the differences in declaration...
3
by: Joshua Beall | last post by:
Hi All, I've got the following PHP code: $service = new SoapClient("http://www.webservicex.net/length.asmx? wsdl"); $result = $service->ChangeLengthUnit(10,"Inches","Centimeters");...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...
0
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,...
0
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...

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.