473,383 Members | 1,716 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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

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

Mar 26 '07 #1
4 2652
hmm,

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

cheers,
RL
"JamesG" <ma********@gmail.comwrote in message
news:11*********************@n59g2000hsh.googlegro ups.com...
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

Mar 26 '07 #2
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
On Mar 26, 10:33 pm, "Egghead" <robertlo@NO_SHAW.CAwrote:
hmm,

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

cheers,
RL"JamesG" <mailmeh...@gmail.comwrote in message

news:11*********************@n59g2000hsh.googlegro ups.com...
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- Hide quoted text -

- Show quoted text -

Mar 26 '07 #3
bob
Hi,
You appear to have missed the bool parameter at the end.
i.e. 7 parameters required.
hth
Bob
On 26 Mar 2007 14:21:01 -0700, "JamesG" <ma********@gmail.comwrote:
>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
Mar 27 '07 #4
On Mar 27, 1:07 am, bob <startatbob_cl...@cutthis.adriley.co.nz>
wrote:
Hi,
You appear to have missed the bool parameter at the end.
i.e. 7 parameters required.
hth
Bob
On 26 Mar 2007 14:21:01 -0700, "JamesG" <mailmeh...@gmail.comwrote:
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- 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 :)

Mar 27 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: bradleyp | last post by:
Hi all, Hopefully somebody can help. In Access 2002-SP2, I receive an error from the VB Editor if I try to compile the following code (see below). The error is as follows: Compile Error:...
2
by: Ricardo Magalhães | last post by:
Hi, I using this code, to connect with a paradox file with ASP.NET. The first time its connect ok, but others times occurs the error: "ERROR - no error information available" I close all...
5
by: Martin Jørgensen | last post by:
Hello again, Sorry to bother but I guess my C++ book isn't very good since it obviously contains errors so the program code doesn't work with g++. However I don't understand what the problem...
2
by: Chris | last post by:
Hi, I want to show the whole recordset. There are 42 records and 2 fields. .... comd = New System.Data.OleDb.OleDbCommand("select name,lok from pc", oConnection) dtreader = comd.ExecuteReader...
2
by: Praveen Chandra | last post by:
Hi, I am trying to build a static library, while building the library i am getting the following error: fatal error C1189: #error : "No sstream/strstream implementation" Following is the...
3
by: uday.sen | last post by:
Hi, I am porting a piece of code from VC++ to linux platform. My compiler is g++ 3.2.2. I am getting following error: no matching function for call to A::setResponse(std::wstring) candidates...
0
by: nurmaiza | last post by:
Hello, i'm using windows, eclipse, Tomcat 5.5 and JSP file trying to connect jdbc ms sql using jdts driver. i've download the driver and assigned the path at en.variable..but it give me an error no...
0
by: Gwen Crutcher | last post by:
I keep getting the error "No value given for one or more required parameters", but not sure why. Can anyone please look at my code snipet and see if you see any reason why I could be getting this...
2
by: BlackMustard | last post by:
hi all, i am trying to convert the string "32999" to a number, in order to compare it to other numbers and tell which one is the largest one, or if they're equal. i keep getting an overflow...
2
by: Jolie Chen | last post by:
I am learning template programming now, and I wrote the following code #include <iostream> #include "Queue.h" using namespace std; template <typename Tclass QueueItem { public: QueueItem(T...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.