WebMethods, is the order of them in a WebServer class significant?

E

Eric Porter

I have a Web Service which contains two WebMethods. The methods look like
this :

[WebMethod(true)]
public SFProcesses GetProperProcesses(string userName) {
SFProcesses rv = null;
Service sf = new Service();
rv = sf.GetProcesses(userName, false);
return rv;
}

[WebMethod(true)]
public xSFProcesses GetXProcesses() {
xSFProcesses rv = null;
WebServProvider w = null;
w = new WebServProvider();
rv = w.GetXProcesses();
return rv;
}

The collections SFProcesses and xSFProcesses are exactly the same,
containing objects SFProcess and xSFProcess respectively (which are exactly
the same as each other).

However, the order of the WebMethods in the WebService is significant.
Whichever is first works fine. Whichever is second always returns a
InvalidCastException from XmlSerializationWriter1.

Is the order really significant in a WebMethod class, or have I missed a
vital, but undocumented directive, or source code line that stops the first
method stamping on the feet of the second?

Your help would be much appreciated.
Vince
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,225
Members
46,815
Latest member
treekmostly22

Latest Threads

Top