Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I pass an object to a webservice?
Message
From
17/05/2007 12:26:27
Mike Sue-Ping
Cambridge, Ontario, Canada
 
 
To
16/05/2007 13:59:50
Joel Leach
Memorial Business Systems, Inc.
Tennessee, United States
General information
Forum:
Visual FoxPro
Category:
Web Services
Miscellaneous
Thread ID:
01225969
Message ID:
01226390
Views:
45
Hey Joel, thanks for the link.

Mike


>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
Previous
Reply
Map
View

Click here to load this message in the networking platform