Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / March 2005

Tip: Looking for answers? Try searching our database.

Bind Custom Objects Returned from Web Svc

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Sumit - 01 Mar 2005 17:53 GMT
Hi All...
What is the best way of binding a custom object that is returned via a Web
Service?
From what Ive seen, the proxy class generated by wsdl.exe doesnt include
properties for the members of the custom object, it only contains the
variable declarations. Does the wsdl.exe that comes with WSE handle this
differently? Is there some other mechanism I can use besides writing a custom
decorator for wsdl.exe to generate proxy classes that have properties?
Manohar Kamath - 02 Mar 2005 00:08 GMT
The custom types in WSDL generated classes (proxy classes) contain public
type declarations for properties. If you need properties (as in get and set)
instead, you can do one of the two:

1. Have a translator that takes the values from the proxy generated type and
sets them in another custom object at the client.

2. This is a hack -- you will need to modify the proxy class manually!
Instead of using the proxy generated types, you could reference the custom
type at the client (using the "using" statement). Then delete/comment the
proxy generated type definition in the proxy class file. The downside to
this is you will have to distribute the type library to the client, which
defeats the purpose of a web service being loosely coupled. You could also
try distributing interfaces instead (although I have not tried this)

Signature

Manohar Kamath
Editor, .netWire
www.dotnetwire.com

> Hi All...
> What is the best way of binding a custom object that is returned via a Web
[quoted text clipped - 4 lines]
> differently? Is there some other mechanism I can use besides writing a custom
> decorator for wsdl.exe to generate proxy classes that have properties?
Dilip Krishnan - 02 Mar 2005 03:31 GMT
Hello Sumit,
  Try this [0] extension to xsd.exe and wsdl.exe

[0] - http://www.gotdotnet.com/workspaces/workspace.aspx?id=80258a8c-bb4c-48e6-948b-05
f6da568f55


HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com

> Hi All...
> What is the best way of binding a custom object that is returned via a
[quoted text clipped - 8 lines]
> custom
> decorator for wsdl.exe to generate proxy classes that have properties?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.