Page 1 of 3

ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 1:49 am
by abigdreamer

Interfacing with ActiveVFP -- and Rest Service --
http://localhost:444/cfoxtow_webV3/ma...
This command will return a Json string with fields in the order that I want for
dispatch# 200001 -- I can change to any number and get back
that record.

{"dispnum":"200001","towdate":"01/03/12","yearcar":"98"}

This is an example of the string.
I can add commas, quotes, or anything else I want.

How do I hook this with my form, so if I type in a dispatch number it would go out and
return this?

the guy that made Activevfp doesn't have enough documentation so I'm
struggling a bit. But I have gotten this far.

Your appery can see my database ... I can give you a link to try
if you need it.


ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 1:51 am
by abigdreamer

url -------- /master1/200001

this was the call to the json rest parser.


ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 2:05 am
by abigdreamer

http://docs.appery.io/documentation/a...

I'm reading this... but I don't know what my info would be.

I just put a Number in ... and I get back a json string.


ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 2:10 am
by abigdreamer

http://97.94.152.174:444/cfoxtow_web8...
Here is an example of a REAL live URL that you can try.

{"custId":"0001","custName":"Jacobs, Russell","custStat":"Active"}

It returns THIS...

What would I put in for the Rest Service URL and parameters.
What do I need to change on my end?


ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 2:17 am
by Illya Stepanov

Hello Mike -- thank you for the link we need to test it.


ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 2:37 am
by abigdreamer

Here is another company -- a competitor -- to the one I'm using
They obviously have better docs but its a lot more expensive.
----- I'm gonna try this one also and see if I can find the code so
I can understand how to talk to this Rest Service and get back
what I want.

https://www.west-wind.com/WestwindWeb...

Here is Rick's sample JSON page. See all these examples?

We have RAW URL examples... I saw that.. but what about examples with parameters like this one.

http://www.west-wind.com/WestWindWebT...


ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 3:01 am
by Illya Stepanov

Did you tried to make an "Automatic Service Response"? Image

I've tested and I get a Response Image


ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 3:15 am
by abigdreamer

I can do this. But I can't hard code each NUMBER in there. I have to have some sort of parameters in order to get back the record I want.

http://97.94.152.174:444/cfoxtow_web8...

take out the 0002 --- how do I get there as this 0002 being part of
the request -- a parameter.


ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 3:25 am
by abigdreamer

I was able to reproduce what you did, but that doesn't solve the problem of getting MY own info back. not 1 Hard coded ID at a time.


ActiveVfP rest JSON integration Visual FoxPro prg

Posted: Fri Jul 26, 2013 3:46 am
by Illya Stepanov

This part should help you :: http://docs.appery.io/documentation/a...