all groups > dotnet web services > march 2007 >
You're in the

dotnet web services

group:

Help with error: "No overload for method 'x' takes 'y' arguments" using web service


Help with error: "No overload for method 'x' takes 'y' arguments" using web service JamesG
3/26/2007 2:21:01 PM
dotnet web services:
Hi,

I'm new to C-Sharp (as of today) and i'm struggling to implement a
SOAP client to a PHP5 web service. I have added the Web Reference (do
I also need to use wsdl.exe and compile the .dll, and reference that
as well?) to the wsdl document.

Behind my form, I have the following (snippeted) code:

/* our service reference */
private localhost.ConsignmentService setWayp;

int waypID = setWayp.setWaypointByID(this.tbCID.Text,
wLon[this.cbWarehouse.SelectedIndex],
wLat[this.cbWarehouse.SelectedIndex],
System.DateTime.Now.ToShortDateString,
System.DateTime.Now.ToShortTimeString, selStatus);

The relevant web reference proxy code is:
public partial class setWaypointByIDRequest {
private string idField;
private decimal longitudeField;
private decimal latitudeField;
private System.DateTime dateField;
private System.DateTime timeField;
private statusType statusField;
private bool statusFieldSpecified;
....
}

The precise error is: No overload for method 'setWaypointByID' takes
'6' arguments
I've been searching for hours and am stumped!

Any help appreciated
Re: Help with error: "No overload for method 'x' takes 'y' arguments" using web service JamesG
3/26/2007 2:47:12 PM
Hi,

The last argument is generated by the proxy, because the statusType is
optional. I have tried giving it a 7th and get the same error.

Thanks


[quoted text, click to view]

Re: Help with error: "No overload for method 'x' takes 'y' arguments" using web service Egghead
3/26/2007 3:33:27 PM
hmm,

You only have a web method with seven args., but you pass with six args

cheers,
RL
[quoted text, click to view]

AddThis Social Bookmark Button