Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a web service w/west wind tools
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
West Wind Web Connection
Titre:
Calling a web service w/west wind tools
Divers
Thread ID:
01334446
Message ID:
01334446
Vues:
73
I have a (very) simple web service in c#.
The relevant part looks like this:

public DataSet dsMeetings;
public string oConnection = "Provider=VFPOLEDB.1;Data Source=\\kolgraph9\\data\\audiometry.dbc;Collating Sequence=Machine";
[WebMethod]
public string HelloWorld() {
return "Hello World";
}

[WebMethod]
public DataSet GetPatientData(string lcName)
{


if (lcName == "")
lcName = "%";

DataSet ds = new DataSet();

OleDbConnection oConn = new OleDbConnection(oConnection);

OleDbDataAdapter oAdapter = new OleDbDataAdapter();

oAdapter.SelectCommand = new OleDbCommand("select * from patients where last_name like '" + lcName + "%'", oConn);

try
{
oConn.Open();
}
catch (Exception e)
{

}
oAdapter.Fill(ds, "Patients");
oConn.Close();
return ds;


}

*********************************
I have no problem calling it directly from a web page, or .net, or from foxpro using something like
oDom=CREATEOBJECT("MSXML2.DomDocument")
odom.async = .f.
odom.load("http://localhost//RasNOTE2/kolgraph/koLmeetings.asmx/GetPatientData?lcName=meroz")

However, whenever I try to call it with the wwsoap class, like...

DO wwsoap
losoap = CREATEOBJECT("wwSOAP")
losoap.parseservicewsdl("http://localhost/RasNOTE2/kolgraph/koLmeetings.asmx?WSDL")
?loSoap.AddParameter("lcName","Meroz")
?losoap.callwsdlmethod("getPatientData")
MESSAGEBOX(losoap.oDOM.xml)

It crashes. Running the .Net debugger I see that the lcName parameter gets the null value.

Any help would be appreciated.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform