Can't Compile WebServices Client

Posts   
 
    
jflegere
User
Posts: 33
Joined: 22-Jul-2005
# Posted on: 06-Aug-2005 04:26:35   

I'm following the sample code in the help file for consuming a web service:


SchedulingService scheduler = new SchedulingService();
scheduledEvents = (EntityCollection) scheduler.GetScheduledEvents(month, year);

GetScheduledEvents() looks like:


[WebMethod]
public EntityCollection GetScheduledEvents(int Month, int Year) {

Objects.SchedulingService schedulingService = new Objects.SchedulingService();

return schedulingService.GetScheduledEvents(Month, Year);
}

The second line in the first code block


scheduledEvents = (EntityCollection) scheduler.GetScheduledEvents(month, year);

has the following compiler error:

Cannot convert type 'System.Data.DataSet' to 'HelperClasses.EntityCollection'

Any idea what's happening here?

Thanks.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 06-Aug-2005 11:20:50   

in .NET 1.x , IXmlSerializable is not supported nor documented, as it always makes wsdl.exe think the class implementing it is a dataset. The generated stubs are thus containing code which use DataSet as return types. You have to alter that generated code, sadly enough and update the types.

Frans Bouma | Lead developer LLBLGen Pro