Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > .NET Web Services
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
.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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old November 13th, 2006, 11:44 PM
Friend of Wrox
Points: 2,376, Level: 20
Points: 2,376, Level: 20 Points: 2,376, Level: 20 Points: 2,376, Level: 20
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
Join Date: Jun 2003
Location: , , Australia.
Posts: 596
Thanks: 1
Thanked 3 Times in 3 Posts
Default Casting XML Generated Class

I have generated a class using XSD.EXE as per http://dotnetjunkies.com/QuickStartv.../XSDToCls.aspx .

This has all worked well, and I inherrited this class into a new object on the web service where I have placed the methods to work with the data.

My intention was to cast the incomming xml object into my new inheritted class and work on it from there.

However I am getting a cast error when trying to cast to the inherrited class.

quote:Unable to cast object of type 'RioInBound.ShipmentManifest' to type 'B2B.Rio.ShipmentManifest'.
Am I correct that I should be able to complete this cast.
Class Dog: Animal{}
public void test(Animal animal)
Dog d = (Dog) animal;
And is there any reason why it wont work with XSD.EXE generated classes.

Many thanks in advance for any assistance

They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad.
"They say, best men are molded out of faults,
And, for the most, become much more the better
For being a little bad."
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
apply css class to dynamically generated table row nikeshkm Javascript 2 September 28th, 2006 03:52 AM
xml and class properties sushma.varala XML 0 July 14th, 2006 07:59 AM
xml or class properties sushma.varala Classic ASP Components 0 July 14th, 2006 07:52 AM
setting content type of asp generated xml whyulil Classic ASP XML 0 July 15th, 2005 04:50 AM
Parsing Microsoft generated XML Richard Lightfoot Pro PHP 3 September 16th, 2004 06:11 AM

All times are GMT -4. The time now is 11:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.