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

  • Thread starter Thread starter JamesG
  • Start date Start date
J

JamesG

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
 
Hi,
You appear to have missed the bool parameter at the end.
i.e. 7 parameters required.
hth
Bob
 
Hi,
You appear to have missed the bool parameter at the end.
i.e. 7 parameters required.
hth
Bob
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- Hide quoted text -

- Show quoted text -

Hi,

The problem turned out to be a typical silly mistake...
For future reference, the method actually required creating an
instance of the <remotemethod>Request object, then assigning each
parameter as required.

Thanks anyhow :)
 
Back
Top