473,770 Members | 2,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.MyCl ass) 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.MyCla ss) 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 1430
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.goo gle.com...
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.MyCl ass) 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.MyCla ss) 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
2498
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 what sort of problems/issues should be considered? Also, I see that a singleton needs to be set up with certain data such as file name, database URL etc. What issues are involved in this, and how would you do this? If someone knows about the...
4
11202
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 x_copy;
10
4214
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 methods exposed in the WSDL and others not? Or is there a way to provide a customer WSDL file where I can just take out the data relating to the methods I want to hide and have that WSDL be the one that .Net displays when users access the WSDL file...
5
1609
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 instance of time in the whole application there is no use in having these methods as instance methods I can as well have static methods....correct? If I leave these methods as instance methods would they have any wrong impact on my application?
0
874
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 Dispose method required by IDisposable. When WSDL.exe (or 'Add Web Reference') extracts the interface information for the web service it also publishes the Dispose method. Can anyone tell me how to prevent the Dispose method from being published by...
2
1942
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? The MSDN documentation seems schizophrenic and references both patterns, but I can't find a way to change the behavior back to the VS2003/Begin/End style. The Begin/End pattern is just much more convenient for some scenarios. Thanks!
3
1779
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 esoteric uses (abuses?) of the language. I've been working from the oft quoted resource http://www.crockford.com/javascript/private.html. During my first serious attempt at using the knowledge acquired from this page, I ran up against the problem...
0
1234
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 and no logic or private fields is transferred through web services, I need to know what is the correct pattern for invoking the methods of the proper objects. By now I've found two possible patterns: 1) Objects are created on the server and then...
4
1789
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 and invocation syntax.
3
6397
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"); var_dump($result);
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10260
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...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
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,...
0
9906
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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, 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...
0
6712
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
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2850
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.