473,397 Members | 2,099 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,397 software developers and data experts.

Bind Custom Objects Returned from Web Svc

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?
Nov 23 '05 #1
2 1342
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)

--
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Sumit" <Su***@discussions.microsoft.com> wrote in message
news:52**********************************@microsof t.com...
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?

Nov 23 '05 #2
Hello Sumit,
Try this [0] extension to xsd.exe and wsdl.exe

[0] - http://www.gotdotnet.com/workspaces/...b-05f6da568f55

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
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?


Nov 23 '05 #3

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

Similar topics

5
by: rufus | last post by:
Hi, I have a custom collection class that inherits from HashTable. When I add a new CustomObject to my CustomCollection I would like to ensure that it will only accept objects of type...
2
by: A Traveler | last post by:
Hi, I have a custom collection class i wrote, LineItemsCollection, which is a strongly typed collection of objects of my LineItem class. The LineItem class is a simple class with just a couple...
7
by: Jed | last post by:
I have a web service method that returns an array of custom objects marked serializeable with fully described public properties. When I bind the results to a DataGrid I can access the properties...
1
by: Luis Esteban Valencia | last post by:
Please everybody participate in this question. Hello my applicacion has many layers and classes and I think its well structured. PLease let me know if you disagree and why. 1. I have the user...
4
by: John Dalberg | last post by:
I noticed the starterkits timetracker & issue tracker load data from a database into custom collections (arraylists) which bind to a datagrid. What are the advantages of using custom collections...
0
by: Giorgio | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older...
0
by: a | last post by:
Q. Unable to get a Profile custom (object) collection to bind to GridView,etc (IList objects)? This is my first custom object so I may be doing something rather simple, wrong, or it may be...
0
by: sean worlock | last post by:
Hello all, I have googled like crazy for this with no sucess! I have a dataset containing a table with the following fields Table===Widths ---------------------------------------------...
3
by: Giovanni Gherdovich | last post by:
Hello, in the following code I have a pointer (to function), say p, of type double (*)(double, double, void*) and I try to fix the second argument of the function *p to a given value (using...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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,...
0
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...
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,...

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.