Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > Other .NET > General .NET
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
General .NET For general discussion of MICROSOFT .NET topics that don't fall within any of the other .NET forum subcategories or .NET language forums.  If your question is specific to a language (C# or Visual Basic) or type of application (Windows Forms or ASP.Net) try an applicable forum category. ** PLEASE BE SPECIFIC WITH YOUR QUESTION ** When posting here, provide details regarding the Microsoft .NET language you are using and/or what type of application (Windows/Web Forms, etc) you are working in, if applicable to the question. This will help others answer the question without having to ask.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the General .NET 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 September 21st, 2006, 06:46 AM
Registered User
Join Date: Jun 2006
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default ServicedComponent Proxies - Please HELP


I am having a great deal of trouble trying to return an object from my
ServicedComponent. The application is SOAP enabled and I have created a proxy class using the wsdl.exe tool, but it keeps giving me problems.

Here are my two ServicedComponent classes:

public class BasicSC: ServicedComponent
public BasicSC() { }

public String HelloSC()
return "Hello COM+ World";

public ReturnObject GetObj(int i, string a)
ReturnObject ro = new ReturnObject();
ro.id = i;
ro.descrip = a;
return ro;


public class ReturnObject : ServicedComponent
public int id;
public string descrip;

public ReturnObject() { }


My client then runs the following code:

BasicSCService bsc = new BasicSCService();
ReturnObject ro = new ReturnObject();
ro = bsc.GetObj(1, "test");

If the ServicedComponent App is a server application I get this error:

InvalidCastException was caught
Unable to cast object of type 'System.Xml.XmlNode[]' to type 'ReturnObject'.

My question is, is the wsdl.exe the correct tool for generating a proxy? Should I be using WKO or CAO instead? Is there another alternative?

If it is the correct tool, what is wrong with my code?

Any info would be greatly appreciated. I've been stuck on this for quite a while.


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
Setting Private Proxies for browser in Vb.net tanweerahmad .NET Framework 2.0 0 October 27th, 2007 01:59 PM
ServicedComponent proxies - HELP pwittig .NET Web Services 0 September 21st, 2006 06:45 AM
Invalid ServicedComponent jdang67 C# 2005 0 February 10th, 2006 12:36 PM
COM+ .Net and application proxies LowestoftheLow General .NET 1 August 25th, 2004 11:13 AM

All times are GMT -4. The time now is 09:12 PM.

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