Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
|
.NET Web Services Discussions about .NET XML Web Service technologies including ASMX files, WSDL and SOAP.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Web Services section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 24th, 2005, 12:02 PM
Authorized User
 
Join Date: Nov 2005
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Return a custom type from a web service

Hi, I have a Collection, and I have a webmethod to return it, In the declaration of the method Y put:
[WebMethod]
[XmlInclude(typeof(myCollection))]
[XmlInclude(typeof(myClass))]
[XmlInclude(typeof(myClass2))]
public void myCollection Get() {
}
the web service return the collection but, it is an array of any type, in my client I can't manipulate that data I recieve the data in an object array, I don't able to use the properties of the objects.
what can I do?, thanks for u help!!!!!

 
Old November 27th, 2005, 01:26 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Why are you not able to do that. Are you getting compile time errors or is it exceptions that you are getting.
I'm assuming that you are trying to cast the objects to the types you expect them to be.

Regards
Ankur Verma





Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Method Returning a complex Custom data type. saisunil1978 .NET Web Services 0 July 15th, 2008 05:38 AM
Web Service, Custom Control, Custom Return Type robzyc ASP.NET 2.0 Basics 6 June 10th, 2008 08:03 AM
Web Service Custom Objects Problem Amateur .NET Web Services 0 March 19th, 2006 11:52 AM
how to return binary from web service forkhead VB How-To 6 August 24th, 2005 07:44 AM
return type? Sibananda Tripathy J2EE 1 January 3rd, 2005 04:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.