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
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