Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I pass an object to a webservice?
Message
De
16/05/2007 13:59:50
Joel Leach
Memorial Business Systems, Inc.
Tennessie, États-Unis
 
 
À
16/05/2007 10:09:15
Mike Sue-Ping
Cambridge, Ontario, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Web Services
Divers
Thread ID:
01225969
Message ID:
01226109
Vues:
23
Mike,

Check out this article from Rick Strahl (scroll down to Other Complex DataTypes):

http://www.west-wind.com/presentations/foxpronetwebservices/foxpronetwebservices.asp

>I'm trying to call a web service that accepts two objects; a "credentials" object and a "criteria" object.
>
>In .NET, I can create these objects with the assistance of intellisense; something like:
>
>wsUserCredentials credentials = new wsUserCredentials();
>credentials.username = "someone";
>credentials.password = "password";
>
>
>Same goes for the criteria object:
>
>wsSearchCriteria criteria = new wsSearchCriteria();
>criteria.parameter1 = "something";
>criteria.parameter2 = "something_else";
>
>
>Then I can call the service method like:
>
>wsService Service = new wsService();
>long?[] ids = Service.getSomeIDs(credentials, criteria)
>
>
>and I'd get an array of IDs.
>
>How would I do this from VFP? I've registered the web service's wsdl for intellisense. The resulting sample code for calling the web service shows me the available methods and nothing else, i.e. it does not say that the methods take parameters that need to be objects. VFP's "Intellisense" simply says, "getSomeIDs AS VOID()". I've tried to create some custom objects (based on the native VFP custom base class) and added the same properties and values that the .NET code shows. When I pass these objects from VFP to the web service, I get the following message:
>
>
>OLE IDispatch exception code 0 from Client:
>Client:Incorrect number of parameters supplied for SOAP request HRESULT=0x80070057:
>The parameter is incorrect. Incorrect number of parameters supplied for SOAP request...
>
>
>Does anyone know if what I'm doing is even possible from within VFP?
>
>TIA
>Mike
Joel Leach
Microsoft Certified Professional
Blog: http://www.joelleach.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform