Quantcast
Channel: West Wind Message Board Messages
Viewing all articles
Browse latest Browse all 10393

Re: Calling Web Service with multiple params passed as one!

$
0
0
Re: Calling Web Service with multiple params passed as one!
Web Service Proxy Generator
Re: Calling Web Service with multiple params passed as one!
Jul. 11, 2013
02:01 am
3TV04CB5XShow this entire thread in new window
Gratar Image based on email address
From:VFPUser
To:Rick Strahl
Sorry been away from this. Starting looking at this properly as I'd rather call the service I'm looking for from VFP directly - ATM I have a seperate .Net app which accepts parameters and is messy at best.

So I tried a basic call for a weather service (http://www.webservicex.net/globalweather.asmx?WSDL ) - easy, returns data straight away.

Then I tried another WS, which I already consume from within VFP easily. I can't post this service publicly, but it accepts 6 parameters, one after the other. This also works straight away and returns successstate of 0, with an arraysize of 10 (these are properties of the returned object. However it also includes an array of replies (the data I'm after), how do I access these?

loProxy = CREATEOBJECT("xxMethodsProxy","V2")DO"c:\program files (x86)\west wind web service proxy generator for visual foxpro\xxmethodsproxy.prg" loProxy = CREATEOBJECT("xxMethodsProxy","V2") x=m.loproxy.somecall("param1","param2","param3",param4,0,-1) ?m.x.SuccessState && returns 0, good ?m.x.NumRecords && returns 10, also good ll=m.x.ReturnArray ?vartype(ll) && shows "O", also good

But I can't access the 10 records contained within...? I get errors trying anything obvious (?) ..
M.x.Returnarray(0).Somedetailimafter
M.x.Returnarray[0].Somedetailimafter

Generate an error. How are arrays handled?

As I mentioned, this particular service I'm already consuming in VFP, I wanted to get this one right before I move on to the troublesome one I needed .Net for

Thanks !


Well that's spectacularly unhelpful :-)
What doesn't work exactly?

+++ Rick ---


Just downloaded it and can't get it to work! :/

If it does I'll purchase straight away

You can use the Web Service Proxy Generator for Visual FoxPro. It uses the .NET Web Service client as a proxy and provides a FoxPro front end to the generated proxy. Assuming it's a Soap 1.x service, it's easy to use and create services with that can be consumed from FoxPro.

More info and a walk through video are available here:
http://www.west-wind.com/wsdlgenerator/

+++ Rick ---



I have a need to access a service (I can't post the URL public), which VFP can't handle natively. I have written a basic .Net app which does handle some of the work but I'd like to bring it back to VFp, which I know well.

The service itself has a few main calls, but critically the first parameter is normally the login details (which is actually 3 different variables, user name, password and key)

I can't pass this in VFP correctly, the requests are always rejected with errors. In Vb.Net it took all of 10 minutes to get something basic working.

Question is, I wanted to use any WW* tool, but this doesn't seem to work either.

Can anybody help with the right WW product or tool, or sample?

Thanks






Viewing all articles
Browse latest Browse all 10393

Trending Articles