C
cchasqueira
Hi,
I'm trying to call a web service dinamically that has a method with out parameters. The way I'm calling the method is passing an object array with the parameters to invoke the method, but I can't specify which of these are out parameters. Is there any way of doing that?
This is the code I'm using to invoke the method. I'm also showing the method definition as it may help shed some light on the subject.
Thanks
Code:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute...]
public bool LaunchIncident(string strUserName, string strSummary, Variable[] varList, out int nIncidentNo, out string strError) {
object[] results = this.Invoke("LaunchIncident", new object[] {
strUserName,
strSummary,
varList});
nIncidentNo = ((int)(results[1]));
strError = ((string)(results[2]));
return ((bool)(results[0]));
}
object []args = {"Someone", "", varlist, nIncidentNo, strError}; //Launch Incident
object ox = type.InvokeMember("LaunchIncident",System.Reflection.BindingFlags.InvokeMethod,null,sc,args);
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
I'm trying to call a web service dinamically that has a method with out parameters. The way I'm calling the method is passing an object array with the parameters to invoke the method, but I can't specify which of these are out parameters. Is there any way of doing that?
This is the code I'm using to invoke the method. I'm also showing the method definition as it may help shed some light on the subject.
Thanks
Code:
[System.Web.Services.Protocols.SoapDocumentMethodAttribute...]
public bool LaunchIncident(string strUserName, string strSummary, Variable[] varList, out int nIncidentNo, out string strError) {
object[] results = this.Invoke("LaunchIncident", new object[] {
strUserName,
strSummary,
varList});
nIncidentNo = ((int)(results[1]));
strError = ((string)(results[2]));
return ((bool)(results[0]));
}
object []args = {"Someone", "", varlist, nIncidentNo, strError}; //Launch Incident
object ox = type.InvokeMember("LaunchIncident",System.Reflection.BindingFlags.InvokeMethod,null,sc,args);
**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...