Discussion:
SOAP
Chris Davis
2018-09-06 12:31:05 UTC
Permalink
Is anyone able to share an example of working with a webservice purely in code?

Thanks

Chris.


--- StripMime Report -- processed MIME parts ---
multipart/alternative
text/plain (text body -- kept)
text/html
---

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@CWLP265MB1668.GBRP265.PROD.OUTLOOK.COM
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Stephen Russell
2018-09-06 13:30:00 UTC
Permalink
Too bad that Alan is no longer among us, he redid his application all in
Web Service calls years ago.

In general, the "service" is a replacement for a data store. You ask for
data from the service and it gives it to you in SOAP, xml that is. What
you actually receive is some sort of collection of data, that may have
collections within it. You could do the same thing in arrays if you wanted
in VFP.

Now the data is yours to use at your desire. You may have to package the
data back into XML that mimics the data they sent you for inserts, updates,
maybe even deletes. Now through the "service" you post that XML pack to
them.

Today the industry is changing the name from Web Service to API but in
general it works in much the same way.

On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk> wrote:

> Is anyone able to share an example of working with a webservice purely in
> code?
>
> Thanks
>
> Chris.
>
>
> --- StripMime Report -- processed MIME parts ---
> multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMY+***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-09-06 13:37:43 UTC
Permalink
Thanks for the reply Russell, I have now discovered this particular thing also supports REST api, just trying to figure out oAuth

-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen Russell
Sent: Thursday, 06 September 2018 14:30
To: ***@leafe.com
Subject: Re: SOAP

Too bad that Alan is no longer among us, he redid his application all in Web Service calls years ago.

In general, the "service" is a replacement for a data store. You ask for data from the service and it gives it to you in SOAP, xml that is. What you actually receive is some sort of collection of data, that may have collections within it. You could do the same thing in arrays if you wanted in VFP.

Now the data is yours to use at your desire. You may have to package the data back into XML that mimics the data they sent you for inserts, updates, maybe even deletes. Now through the "service" you post that XML pack to them.

Today the industry is changing the name from Web Service to API but in general it works in much the same way.

On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk> wrote:

> Is anyone able to share an example of working with a webservice purely
> in code?
>
> Thanks
>
> Chris.
>
>
> --- StripMime Report -- processed MIME parts --- multipart/alternative
> text/plain (text body -- kept)
> text/html
> ---
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@CWLP265MB1668.GBRP265.PROD.OUTLOOK.COM
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Stephen Russell
2018-09-06 14:19:51 UTC
Permalink
To be honest, REST is just a way that sets up an interaction in complex
ways without the client knowing anything beforehand about the server and
the resources it hosts. You define that the transmission is going to be
HTTP and then follow the rules for it.

Now your call to the API can be done from a web browser, an app on a phone
or a tablet.

here is something I wrote to get data for ExchangeRates.
apicall.Clear(); // This is a string to hold the params for the call I am
making for data

apicall.Append("api/historical/" + EOM);

apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
// get the dates for use in the string
HttpResponseMessage httpResponseMessage = await
client.GetAsync(apicall.ToString());
HttpResponseMessage response = httpResponseMessage;
if (response.IsSuccessStatusCode)
{ // put the data returend into a data object I have
local.
eRateReturn rate = await
response.Content.ReadAsAsync<eRateReturn>();



Here is eRateReturn class(s) for data:
public class Rates
{
public float GBP { get; set; }
public float CAD { get; set; }
public float USD { get; set; }
public float EUR { get; set; }
}

public class eRateReturn
{
public float timestamp { get; set; }
public string Base { get; set; }
public DateTime date { get; set; }
public Rates rates {get; set;}
}





On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:

> Thanks for the reply Russell, I have now discovered this particular thing
> also supports REST api, just trying to figure out oAuth
>
> -----Original Message-----
> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> Russell
> Sent: Thursday, 06 September 2018 14:30
> To: ***@leafe.com
> Subject: Re: SOAP
>
> Too bad that Alan is no longer among us, he redid his application all in
> Web Service calls years ago.
>
> In general, the "service" is a replacement for a data store. You ask for
> data from the service and it gives it to you in SOAP, xml that is. What
> you actually receive is some sort of collection of data, that may have
> collections within it. You could do the same thing in arrays if you wanted
> in VFP.
>
> Now the data is yours to use at your desire. You may have to package the
> data back into XML that mimics the data they sent you for inserts, updates,
> maybe even deletes. Now through the "service" you post that XML pack to
> them.
>
> Today the industry is changing the name from Web Service to API but in
> general it works in much the same way.
>
> On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk> wrote:
>
> > Is anyone able to share an example of working with a webservice purely
> > in code?
> >
> > Thanks
> >
> > Chris.
> >
> >
> > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > text/plain (text body -- kept)
> > text/html
> > ---
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMYLO0pw-***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Chris Davis
2018-09-06 15:24:02 UTC
Permalink
Thanks Stephen, I am struggling with oAuth at the moment, the documentation gives examples but obviously not in VFP and it looks like things like javascript and php include oauth modules.

So if I can reword my question, has anyone got any oauth code 😊

-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen Russell
Sent: Thursday, 06 September 2018 15:20
To: ***@leafe.com
Subject: Re: SOAP

To be honest, REST is just a way that sets up an interaction in complex ways without the client knowing anything beforehand about the server and the resources it hosts. You define that the transmission is going to be HTTP and then follow the rules for it.

Now your call to the API can be done from a web browser, an app on a phone or a tablet.

here is something I wrote to get data for ExchangeRates.
apicall.Clear(); // This is a string to hold the params for the call I am making for data

apicall.Append("api/historical/" + EOM);

apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
// get the dates for use in the string
HttpResponseMessage httpResponseMessage = await client.GetAsync(apicall.ToString());
HttpResponseMessage response = httpResponseMessage;
if (response.IsSuccessStatusCode)
{ // put the data returend into a data object I have
local.
eRateReturn rate = await
response.Content.ReadAsAsync<eRateReturn>();



Here is eRateReturn class(s) for data:
public class Rates
{
public float GBP { get; set; }
public float CAD { get; set; }
public float USD { get; set; }
public float EUR { get; set; }
}

public class eRateReturn
{
public float timestamp { get; set; }
public string Base { get; set; }
public DateTime date { get; set; }
public Rates rates {get; set;}
}





On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:

> Thanks for the reply Russell, I have now discovered this particular
> thing also supports REST api, just trying to figure out oAuth
>
> -----Original Message-----
> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> Russell
> Sent: Thursday, 06 September 2018 14:30
> To: ***@leafe.com
> Subject: Re: SOAP
>
> Too bad that Alan is no longer among us, he redid his application all
> in Web Service calls years ago.
>
> In general, the "service" is a replacement for a data store. You ask
> for data from the service and it gives it to you in SOAP, xml that is.
> What you actually receive is some sort of collection of data, that may
> have collections within it. You could do the same thing in arrays if
> you wanted in VFP.
>
> Now the data is yours to use at your desire. You may have to package
> the data back into XML that mimics the data they sent you for inserts,
> updates, maybe even deletes. Now through the "service" you post that
> XML pack to them.
>
> Today the industry is changing the name from Web Service to API but in
> general it works in much the same way.
>
> On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk> wrote:
>
> > Is anyone able to share an example of working with a webservice
> > purely in code?
> >
> > Thanks
> >
> > Chris.
> >
> >
> > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > text/plain (text body -- kept)
> > text/html
> > ---
> >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMYLO0pw-***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

Report [OT] Abuse: http://leafe.com/reportAbuse/CAJidMYLO0pw-***@mail.gmail.com
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@CWLP265MB1668.GBRP265.PROD.OUTLOOK.COM
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those l
Ted Roche
2018-09-06 15:31:17 UTC
Permalink
Chris:

I searched here: http://bfy.tw/Jl8C

and found this: https://archive.codeplex.com/?p=vfpoauth

HTH,

Ted

On Thu, Sep 6, 2018 at 11:24 AM Chris Davis <***@actongate.co.uk> wrote:

> Thanks Stephen, I am struggling with oAuth at the moment, the
> documentation gives examples but obviously not in VFP and it looks like
> things like javascript and php include oauth modules.
>
> So if I can reword my question, has anyone got any oauth code 😊
>
> -----Original Message-----
> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> Russell
> Sent: Thursday, 06 September 2018 15:20
> To: ***@leafe.com
> Subject: Re: SOAP
>
> To be honest, REST is just a way that sets up an interaction in complex
> ways without the client knowing anything beforehand about the server and
> the resources it hosts. You define that the transmission is going to be
> HTTP and then follow the rules for it.
>
> Now your call to the API can be done from a web browser, an app on a phone
> or a tablet.
>
> here is something I wrote to get data for ExchangeRates.
> apicall.Clear(); // This is a string to hold the params for the call I
> am making for data
>
> apicall.Append("api/historical/" + EOM);
>
>
> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
> // get the dates for use in the string
> HttpResponseMessage httpResponseMessage = await
> client.GetAsync(apicall.ToString());
> HttpResponseMessage response = httpResponseMessage;
> if (response.IsSuccessStatusCode)
> { // put the data returend into a data object I have
> local.
> eRateReturn rate = await
> response.Content.ReadAsAsync<eRateReturn>();
>
>
>
> Here is eRateReturn class(s) for data:
> public class Rates
> {
> public float GBP { get; set; }
> public float CAD { get; set; }
> public float USD { get; set; }
> public float EUR { get; set; }
> }
>
> public class eRateReturn
> {
> public float timestamp { get; set; }
> public string Base { get; set; }
> public DateTime date { get; set; }
> public Rates rates {get; set;}
> }
>
>
>
>
>
> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:
>
> > Thanks for the reply Russell, I have now discovered this particular
> > thing also supports REST api, just trying to figure out oAuth
> >
> > -----Original Message-----
> > From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> > Russell
> > Sent: Thursday, 06 September 2018 14:30
> > To: ***@leafe.com
> > Subject: Re: SOAP
> >
> > Too bad that Alan is no longer among us, he redid his application all
> > in Web Service calls years ago.
> >
> > In general, the "service" is a replacement for a data store. You ask
> > for data from the service and it gives it to you in SOAP, xml that is.
> > What you actually receive is some sort of collection of data, that may
> > have collections within it. You could do the same thing in arrays if
> > you wanted in VFP.
> >
> > Now the data is yours to use at your desire. You may have to package
> > the data back into XML that mimics the data they sent you for inserts,
> > updates, maybe even deletes. Now through the "service" you post that
> > XML pack to them.
> >
> > Today the industry is changing the name from Web Service to API but in
> > general it works in much the same way.
> >
> > On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk>
> wrote:
> >
> > > Is anyone able to share an example of working with a webservice
> > > purely in code?
> > >
> > > Thanks
> > >
> > > Chris.
> > >
> > >
> > > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > > text/plain (text body -- kept)
> > > text/html
> > > ---
> > >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACW6n4vU4GZ_aoG+OHRACRTCz5uN6XQtwSYat9+rjATdW==***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages f
Chris Davis
2018-09-06 15:39:53 UTC
Permalink
Thanks Ted I have found and downloaded vfpoauth but have failed to get it to work

-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Ted Roche
Sent: Thursday, 06 September 2018 16:31
To: ***@leafe.com
Subject: Re: SOAP

Chris:

I searched here: http://bfy.tw/Jl8C

and found this: https://archive.codeplex.com/?p=vfpoauth

HTH,

Ted

On Thu, Sep 6, 2018 at 11:24 AM Chris Davis <***@actongate.co.uk> wrote:

> Thanks Stephen, I am struggling with oAuth at the moment, the
> documentation gives examples but obviously not in VFP and it looks
> like things like javascript and php include oauth modules.
>
> So if I can reword my question, has anyone got any oauth code 😊
>
> -----Original Message-----
> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> Russell
> Sent: Thursday, 06 September 2018 15:20
> To: ***@leafe.com
> Subject: Re: SOAP
>
> To be honest, REST is just a way that sets up an interaction in
> complex ways without the client knowing anything beforehand about the
> server and the resources it hosts. You define that the transmission is
> going to be HTTP and then follow the rules for it.
>
> Now your call to the API can be done from a web browser, an app on a
> phone or a tablet.
>
> here is something I wrote to get data for ExchangeRates.
> apicall.Clear(); // This is a string to hold the params for the call
> I am making for data
>
> apicall.Append("api/historical/" + EOM);
>
>
> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
> // get the dates for use in the string
> HttpResponseMessage httpResponseMessage = await
> client.GetAsync(apicall.ToString());
> HttpResponseMessage response = httpResponseMessage;
> if (response.IsSuccessStatusCode)
> { // put the data returend into a data object I have
> local.
> eRateReturn rate = await
> response.Content.ReadAsAsync<eRateReturn>();
>
>
>
> Here is eRateReturn class(s) for data:
> public class Rates
> {
> public float GBP { get; set; }
> public float CAD { get; set; }
> public float USD { get; set; }
> public float EUR { get; set; }
> }
>
> public class eRateReturn
> {
> public float timestamp { get; set; }
> public string Base { get; set; }
> public DateTime date { get; set; }
> public Rates rates {get; set;}
> }
>
>
>
>
>
> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:
>
> > Thanks for the reply Russell, I have now discovered this particular
> > thing also supports REST api, just trying to figure out oAuth
> >
> > -----Original Message-----
> > From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> > Russell
> > Sent: Thursday, 06 September 2018 14:30
> > To: ***@leafe.com
> > Subject: Re: SOAP
> >
> > Too bad that Alan is no longer among us, he redid his application
> > all in Web Service calls years ago.
> >
> > In general, the "service" is a replacement for a data store. You
> > ask for data from the service and it gives it to you in SOAP, xml that is.
> > What you actually receive is some sort of collection of data, that
> > may have collections within it. You could do the same thing in
> > arrays if you wanted in VFP.
> >
> > Now the data is yours to use at your desire. You may have to
> > package the data back into XML that mimics the data they sent you
> > for inserts, updates, maybe even deletes. Now through the "service"
> > you post that XML pack to them.
> >
> > Today the industry is changing the name from Web Service to API but
> > in general it works in much the same way.
> >
> > On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk>
> wrote:
> >
> > > Is anyone able to share an example of working with a webservice
> > > purely in code?
> > >
> > > Thanks
> > >
> > > Chris.
> > >
> > >
> > > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > > text/plain (text body -- kept)
> > > text/html
> > > ---
> > >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CACW6n4vU4GZ_aoG+OHRACRTCz5uN6XQtwSYat9+rjATdW==***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Report [OT] Abuse: http://leafe.com/reportAbuse/CACW6n4vU4GZ_aoG+OHRACRTCz5uN6XQtwSYat9+rjATdW==***@mail.gmail.com
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@CWLP265MB1668.GBRP265.PROD.OUTLOOK.COM
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for th
Tracy Pearson
2018-09-06 18:15:43 UTC
Permalink
I have worked with oAuth on two integrations.
1) Google Calendar. We ended up switching gears and are using a C# exe outside our main exe.
2) Constant Contact. We ended up writing a C# Web service to handle the oAuth callback. Once the user finishes the login, they need to click a button to fetch details from our web service.

oAuth 2.0 requires a callback, if I'm remembering correctly. VFP doesn't have that ability natively. Time constraints prevented me from attempting putting that in an FLL.

Good luck,
Tracy

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, September 06, 2018 11:40 AM
To: ***@leafe.com
Subject: RE: SOAP

Thanks Ted I have found and downloaded vfpoauth but have failed to get it to work

-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Ted Roche
Sent: Thursday, 06 September 2018 16:31
To: ***@leafe.com
Subject: Re: SOAP

Chris:

I searched here: http://bfy.tw/Jl8C

and found this: https://archive.codeplex.com/?p=vfpoauth

HTH,

Ted

On Thu, Sep 6, 2018 at 11:24 AM Chris Davis <***@actongate.co.uk> wrote:

> Thanks Stephen, I am struggling with oAuth at the moment, the
> documentation gives examples but obviously not in VFP and it looks
> like things like javascript and php include oauth modules.
>
> So if I can reword my question, has anyone got any oauth code 😊
>
> -----Original Message-----
> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> Russell
> Sent: Thursday, 06 September 2018 15:20
> To: ***@leafe.com
> Subject: Re: SOAP
>
> To be honest, REST is just a way that sets up an interaction in
> complex ways without the client knowing anything beforehand about the
> server and the resources it hosts. You define that the transmission is
> going to be HTTP and then follow the rules for it.
>
> Now your call to the API can be done from a web browser, an app on a
> phone or a tablet.
>
> here is something I wrote to get data for ExchangeRates.
> apicall.Clear(); // This is a string to hold the params for the call
> I am making for data
>
> apicall.Append("api/historical/" + EOM);
>
>
> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
> // get the dates for use in the string
> HttpResponseMessage httpResponseMessage = await
> client.GetAsync(apicall.ToString());
> HttpResponseMessage response = httpResponseMessage;
> if (response.IsSuccessStatusCode)
> { // put the data returend into a data object I have
> local.
> eRateReturn rate = await
> response.Content.ReadAsAsync<eRateReturn>();
>
>
>
> Here is eRateReturn class(s) for data:
> public class Rates
> {
> public float GBP { get; set; }
> public float CAD { get; set; }
> public float USD { get; set; }
> public float EUR { get; set; }
> }
>
> public class eRateReturn
> {
> public float timestamp { get; set; }
> public string Base { get; set; }
> public DateTime date { get; set; }
> public Rates rates {get; set;}
> }
>
>
>
>
>
> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:
>
> > Thanks for the reply Russell, I have now discovered this particular
> > thing also supports REST api, just trying to figure out oAuth
> >
> > -----Original Message-----
> > From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> > Russell
> > Sent: Thursday, 06 September 2018 14:30
> > To: ***@leafe.com
> > Subject: Re: SOAP
> >
> > Too bad that Alan is no longer among us, he redid his application
> > all in Web Service calls years ago.
> >
> > In general, the "service" is a replacement for a data store. You
> > ask for data from the service and it gives it to you in SOAP, xml that is.
> > What you actually receive is some sort of collection of data, that
> > may have collections within it. You could do the same thing in
> > arrays if you wanted in VFP.
> >
> > Now the data is yours to use at your desire. You may have to
> > package the data back into XML that mimics the data they sent you
> > for inserts, updates, maybe even deletes. Now through the "service"
> > you post that XML pack to them.
> >
> > Today the industry is changing the name from Web Service to API but
> > in general it works in much the same way.
> >
> > On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk>
> wrote:
> >
> > > Is anyone able to share an example of working with a webservice
> > > purely in code?
> > >
> > > Thanks
> > >
> > > Chris.
> > >
> > >
> > > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > > text/plain (text body -- kept)
> > > text/html
> > > ---
> > >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/000301d4460d$a03cb800$e0b62800$@powerchurch.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the
Stephen Russell
2018-09-06 18:01:33 UTC
Permalink
This might help?

https://github.com/VFPX/VFPOAuth





On Thu, Sep 6, 2018 at 10:24 AM Chris Davis <***@actongate.co.uk> wrote:

> Thanks Stephen, I am struggling with oAuth at the moment, the
> documentation gives examples but obviously not in VFP and it looks like
> things like javascript and php include oauth modules.
>
> So if I can reword my question, has anyone got any oauth code 😊
>
> -----Original Message-----
> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> Russell
> Sent: Thursday, 06 September 2018 15:20
> To: ***@leafe.com
> Subject: Re: SOAP
>
> To be honest, REST is just a way that sets up an interaction in complex
> ways without the client knowing anything beforehand about the server and
> the resources it hosts. You define that the transmission is going to be
> HTTP and then follow the rules for it.
>
> Now your call to the API can be done from a web browser, an app on a phone
> or a tablet.
>
> here is something I wrote to get data for ExchangeRates.
> apicall.Clear(); // This is a string to hold the params for the call I
> am making for data
>
> apicall.Append("api/historical/" + EOM);
>
>
> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
> // get the dates for use in the string
> HttpResponseMessage httpResponseMessage = await
> client.GetAsync(apicall.ToString());
> HttpResponseMessage response = httpResponseMessage;
> if (response.IsSuccessStatusCode)
> { // put the data returend into a data object I have
> local.
> eRateReturn rate = await
> response.Content.ReadAsAsync<eRateReturn>();
>
>
>
> Here is eRateReturn class(s) for data:
> public class Rates
> {
> public float GBP { get; set; }
> public float CAD { get; set; }
> public float USD { get; set; }
> public float EUR { get; set; }
> }
>
> public class eRateReturn
> {
> public float timestamp { get; set; }
> public string Base { get; set; }
> public DateTime date { get; set; }
> public Rates rates {get; set;}
> }
>
>
>
>
>
> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:
>
> > Thanks for the reply Russell, I have now discovered this particular
> > thing also supports REST api, just trying to figure out oAuth
> >
> > -----Original Message-----
> > From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
> > Russell
> > Sent: Thursday, 06 September 2018 14:30
> > To: ***@leafe.com
> > Subject: Re: SOAP
> >
> > Too bad that Alan is no longer among us, he redid his application all
> > in Web Service calls years ago.
> >
> > In general, the "service" is a replacement for a data store. You ask
> > for data from the service and it gives it to you in SOAP, xml that is.
> > What you actually receive is some sort of collection of data, that may
> > have collections within it. You could do the same thing in arrays if
> > you wanted in VFP.
> >
> > Now the data is yours to use at your desire. You may have to package
> > the data back into XML that mimics the data they sent you for inserts,
> > updates, maybe even deletes. Now through the "service" you post that
> > XML pack to them.
> >
> > Today the industry is changing the name from Web Service to API but in
> > general it works in much the same way.
> >
> > On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk>
> wrote:
> >
> > > Is anyone able to share an example of working with a webservice
> > > purely in code?
> > >
> > > Thanks
> > >
> > > Chris.
> > >
> > >
> > > --- StripMime Report -- processed MIME parts --- multipart/alternative
> > > text/plain (text body -- kept)
> > > text/html
> > > ---
> > >
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/CAJidMYK8k+Ngs0e4cehFqjoXyh-Fsf=***@mail.gmail.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages fo
Chris Davis
2018-09-06 18:12:21 UTC
Permalink
Progress I have managed to use vfpoauth to get my access token now I need to work out how to sign a request in vfp , I can get it to work in postman

> On 6 Sep 2018, at 19:01, Stephen Russell <***@gmail.com> wrote:
>
> This might help?
>
> https://github.com/VFPX/VFPOAuth
>
>
>
>
>
>> On Thu, Sep 6, 2018 at 10:24 AM Chris Davis <***@actongate.co.uk> wrote:
>>
>> Thanks Stephen, I am struggling with oAuth at the moment, the
>> documentation gives examples but obviously not in VFP and it looks like
>> things like javascript and php include oauth modules.
>>
>> So if I can reword my question, has anyone got any oauth code 😊
>>
>> -----Original Message-----
>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>> Russell
>> Sent: Thursday, 06 September 2018 15:20
>> To: ***@leafe.com
>> Subject: Re: SOAP
>>
>> To be honest, REST is just a way that sets up an interaction in complex
>> ways without the client knowing anything beforehand about the server and
>> the resources it hosts. You define that the transmission is going to be
>> HTTP and then follow the rules for it.
>>
>> Now your call to the API can be done from a web browser, an app on a phone
>> or a tablet.
>>
>> here is something I wrote to get data for ExchangeRates.
>> apicall.Clear(); // This is a string to hold the params for the call I
>> am making for data
>>
>> apicall.Append("api/historical/" + EOM);
>>
>>
>> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
>> // get the dates for use in the string
>> HttpResponseMessage httpResponseMessage = await
>> client.GetAsync(apicall.ToString());
>> HttpResponseMessage response = httpResponseMessage;
>> if (response.IsSuccessStatusCode)
>> { // put the data returend into a data object I have
>> local.
>> eRateReturn rate = await
>> response.Content.ReadAsAsync<eRateReturn>();
>>
>>
>>
>> Here is eRateReturn class(s) for data:
>> public class Rates
>> {
>> public float GBP { get; set; }
>> public float CAD { get; set; }
>> public float USD { get; set; }
>> public float EUR { get; set; }
>> }
>>
>> public class eRateReturn
>> {
>> public float timestamp { get; set; }
>> public string Base { get; set; }
>> public DateTime date { get; set; }
>> public Rates rates {get; set;}
>> }
>>
>>
>>
>>
>>
>>> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:
>>>
>>> Thanks for the reply Russell, I have now discovered this particular
>>> thing also supports REST api, just trying to figure out oAuth
>>>
>>> -----Original Message-----
>>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>>> Russell
>>> Sent: Thursday, 06 September 2018 14:30
>>> To: ***@leafe.com
>>> Subject: Re: SOAP
>>>
>>> Too bad that Alan is no longer among us, he redid his application all
>>> in Web Service calls years ago.
>>>
>>> In general, the "service" is a replacement for a data store. You ask
>>> for data from the service and it gives it to you in SOAP, xml that is.
>>> What you actually receive is some sort of collection of data, that may
>>> have collections within it. You could do the same thing in arrays if
>>> you wanted in VFP.
>>>
>>> Now the data is yours to use at your desire. You may have to package
>>> the data back into XML that mimics the data they sent you for inserts,
>>> updates, maybe even deletes. Now through the "service" you post that
>>> XML pack to them.
>>>
>>> Today the industry is changing the name from Web Service to API but in
>>> general it works in much the same way.
>>>
>>> On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk>
>> wrote:
>>>
>>>> Is anyone able to share an example of working with a webservice
>>>> purely in code?
>>>>
>>>> Thanks
>>>>
>>>> Chris.
>>>>
>>>>
>>>> --- StripMime Report -- processed MIME parts --- multipart/alternative
>>>> text/plain (text body -- kept)
>>>> text/html
>>>> ---
>>>>
> [excessive quoting removed by server]
>
> _______________________________________________
> Post Messages to: ***@leafe.com
> Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
> OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
> Searchable Archive: http://leafe.com/archives/search/profox
> This message: http://leafe.com/archives/byMID/profox/CAJidMYK8k+Ngs0e4cehFqjoXyh-Fsf=***@mail.gmail.com
> ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
> Report [OT] Abuse: http://leafe.com/reportAbuse/CAJidMYK8k+Ngs0e4cehFqjoXyh-Fsf=***@mail.gmail.com
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/D515BE72-1059-4820-B1AF-***@actongate.co.uk
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the ob
Tracy Pearson
2018-09-06 18:30:48 UTC
Permalink
What are you using to make the web requests in VFP?

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, September 06, 2018 2:12 PM
To: ***@leafe.com
Subject: Re: SOAP

Progress I have managed to use vfpoauth to get my access token now I need to work out how to sign a request in vfp , I can get it to work in postman

> On 6 Sep 2018, at 19:01, Stephen Russell <***@gmail.com> wrote:
>
> This might help?
>
> https://github.com/VFPX/VFPOAuth
>
>
>
>
>
>> On Thu, Sep 6, 2018 at 10:24 AM Chris Davis <***@actongate.co.uk> wrote:
>>
>> Thanks Stephen, I am struggling with oAuth at the moment, the
>> documentation gives examples but obviously not in VFP and it looks like
>> things like javascript and php include oauth modules.
>>
>> So if I can reword my question, has anyone got any oauth code 😊
>>
>> -----Original Message-----
>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>> Russell
>> Sent: Thursday, 06 September 2018 15:20
>> To: ***@leafe.com
>> Subject: Re: SOAP
>>
>> To be honest, REST is just a way that sets up an interaction in complex
>> ways without the client knowing anything beforehand about the server and
>> the resources it hosts. You define that the transmission is going to be
>> HTTP and then follow the rules for it.
>>
>> Now your call to the API can be done from a web browser, an app on a phone
>> or a tablet.
>>
>> here is something I wrote to get data for ExchangeRates.
>> apicall.Clear(); // This is a string to hold the params for the call I
>> am making for data
>>
>> apicall.Append("api/historical/" + EOM);
>>
>>
>> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
>> // get the dates for use in the string
>> HttpResponseMessage httpResponseMessage = await
>> client.GetAsync(apicall.ToString());
>> HttpResponseMessage response = httpResponseMessage;
>> if (response.IsSuccessStatusCode)
>> { // put the data returend into a data object I have
>> local.
>> eRateReturn rate = await
>> response.Content.ReadAsAsync<eRateReturn>();
>>
>>
>>
>> Here is eRateReturn class(s) for data:
>> public class Rates
>> {
>> public float GBP { get; set; }
>> public float CAD { get; set; }
>> public float USD { get; set; }
>> public float EUR { get; set; }
>> }
>>
>> public class eRateReturn
>> {
>> public float timestamp { get; set; }
>> public string Base { get; set; }
>> public DateTime date { get; set; }
>> public Rates rates {get; set;}
>> }
>>
>>
>>
>>
>>
>>> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:
>>>
>>> Thanks for the reply Russell, I have now discovered this particular
>>> thing also supports REST api, just trying to figure out oAuth
>>>
>>> -----Original Message-----
>>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>>> Russell
>>> Sent: Thursday, 06 September 2018 14:30
>>> To: ***@leafe.com
>>> Subject: Re: SOAP
>>>
>>> Too bad that Alan is no longer among us, he redid his application all
>>> in Web Service calls years ago.
>>>
>>> In general, the "service" is a replacement for a data store. You ask
>>> for data from the service and it gives it to you in SOAP, xml that is.
>>> What you actually receive is some sort of collection of data, that may
>>> have collections within it. You could do the same thing in arrays if
>>> you wanted in VFP.
>>>
>>> Now the data is yours to use at your desire. You may have to package
>>> the data back into XML that mimics the data they sent you for inserts,
>>> updates, maybe even deletes. Now through the "service" you post that
>>> XML pack to them.
>>>
>>> Today the industry is changing the name from Web Service to API but in
>>> general it works in much the same way.
>>>
>>> On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk>
>> wrote:
>>>
>>>> Is anyone able to share an example of working with a webservice
>>>> purely in code?
>>>>
>>>> Thanks
>>>>
>>>> Chris.
>>>>
>>>>
>>>> --- StripMime Report -- processed MIME parts --- multipart/alternative
>>>> text/plain (text body -- kept)
>>>> text/html
>>>> ---
>>>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/000401d4460f$bba87460$32f95d20$@powerchurch.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stup
Chris Davis
2018-09-06 18:50:36 UTC
Permalink
Keeping it basic at the moment with MsXml2.XmlHttp

But I have noticed in the middle of vfpoauth there is a signrequest method that doesn't seem to be used ... I have also ventured into the vfptweetapi and that has the same function so I will delve deeper tomorrow


-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Tracy Pearson
Sent: Thursday, 06 September 2018 19:31
To: ***@leafe.com
Subject: RE: SOAP

What are you using to make the web requests in VFP?

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, September 06, 2018 2:12 PM
To: ***@leafe.com
Subject: Re: SOAP

Progress I have managed to use vfpoauth to get my access token now I need to work out how to sign a request in vfp , I can get it to work in postman

> On 6 Sep 2018, at 19:01, Stephen Russell <***@gmail.com> wrote:
>
> This might help?
>
> https://github.com/VFPX/VFPOAuth
>
>
>
>
>
>> On Thu, Sep 6, 2018 at 10:24 AM Chris Davis <***@actongate.co.uk> wrote:
>>
>> Thanks Stephen, I am struggling with oAuth at the moment, the
>> documentation gives examples but obviously not in VFP and it looks
>> like things like javascript and php include oauth modules.
>>
>> So if I can reword my question, has anyone got any oauth code 😊
>>
>> -----Original Message-----
>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>> Russell
>> Sent: Thursday, 06 September 2018 15:20
>> To: ***@leafe.com
>> Subject: Re: SOAP
>>
>> To be honest, REST is just a way that sets up an interaction in
>> complex ways without the client knowing anything beforehand about the
>> server and the resources it hosts. You define that the transmission
>> is going to be HTTP and then follow the rules for it.
>>
>> Now your call to the API can be done from a web browser, an app on a
>> phone or a tablet.
>>
>> here is something I wrote to get data for ExchangeRates.
>> apicall.Clear(); // This is a string to hold the params for the call
>> I am making for data
>>
>> apicall.Append("api/historical/" + EOM);
>>
>>
>> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
>> // get the dates for use in the string HttpResponseMessage
>> httpResponseMessage = await client.GetAsync(apicall.ToString());
>> HttpResponseMessage response = httpResponseMessage;
>> if (response.IsSuccessStatusCode)
>> { // put the data returend into a data object I have
>> local.
>> eRateReturn rate = await
>> response.Content.ReadAsAsync<eRateReturn>();
>>
>>
>>
>> Here is eRateReturn class(s) for data:
>> public class Rates
>> {
>> public float GBP { get; set; }
>> public float CAD { get; set; }
>> public float USD { get; set; }
>> public float EUR { get; set; }
>> }
>>
>> public class eRateReturn
>> {
>> public float timestamp { get; set; }
>> public string Base { get; set; }
>> public DateTime date { get; set; }
>> public Rates rates {get; set;}
>> }
>>
>>
>>
>>
>>
>>> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:
>>>
>>> Thanks for the reply Russell, I have now discovered this particular
>>> thing also supports REST api, just trying to figure out oAuth
>>>
>>> -----Original Message-----
>>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>>> Russell
>>> Sent: Thursday, 06 September 2018 14:30
>>> To: ***@leafe.com
>>> Subject: Re: SOAP
>>>
>>> Too bad that Alan is no longer among us, he redid his application
>>> all in Web Service calls years ago.
>>>
>>> In general, the "service" is a replacement for a data store. You
>>> ask for data from the service and it gives it to you in SOAP, xml that is.
>>> What you actually receive is some sort of collection of data, that
>>> may have collections within it. You could do the same thing in
>>> arrays if you wanted in VFP.
>>>
>>> Now the data is yours to use at your desire. You may have to
>>> package the data back into XML that mimics the data they sent you
>>> for inserts, updates, maybe even deletes. Now through the "service"
>>> you post that XML pack to them.
>>>
>>> Today the industry is changing the name from Web Service to API but
>>> in general it works in much the same way.
>>>
>>> On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk>
>> wrote:
>>>
>>>> Is anyone able to share an example of working with a webservice
>>>> purely in code?
>>>>
>>>> Thanks
>>>>
>>>> Chris.
>>>>
>>>>
>>>> --- StripMime Report -- processed MIME parts ---
>>>> multipart/alternative text/plain (text body -- kept) text/html
>>>> ---
>>>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/000401d4460f$bba87460$32f95d20$@powerchurch.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Report [OT] Abuse: http://leafe.com/reportAbuse/000401d4460f$bba87460$32f95d20$@powerchurch.com
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@LO2P265MB1679.GBRP265.PROD.OUTLOOK.COM
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid
Tracy Pearson
2018-09-06 19:13:54 UTC
Permalink
You need to add a header. How it is formatted depends on the API.
I have this code, I'm also using the Chilkat ActiveX control for the HTTP requests.
oHTTPRequest.AddHeader("Authorization", "Bearer " + Token)

As an side note, I started using the Chilkat control over the MSXML control because the logging.
The MSXML doesn't have connectivity logging to diagnose problems. Chilkat does.

Have fun,
Tracy

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, September 06, 2018 2:51 PM
To: ***@leafe.com
Subject: RE: SOAP

Keeping it basic at the moment with MsXml2.XmlHttp

But I have noticed in the middle of vfpoauth there is a signrequest method that doesn't seem to be used ... I have also ventured into the vfptweetapi and that has the same function so I will delve deeper tomorrow


-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Tracy Pearson
Sent: Thursday, 06 September 2018 19:31
To: ***@leafe.com
Subject: RE: SOAP

What are you using to make the web requests in VFP?

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, September 06, 2018 2:12 PM
To: ***@leafe.com
Subject: Re: SOAP

Progress I have managed to use vfpoauth to get my access token now I need to work out how to sign a request in vfp , I can get it to work in postman

> On 6 Sep 2018, at 19:01, Stephen Russell <***@gmail.com> wrote:
>
> This might help?
>
> https://github.com/VFPX/VFPOAuth
>
>
>
>
>
>> On Thu, Sep 6, 2018 at 10:24 AM Chris Davis <***@actongate.co.uk> wrote:
>>
>> Thanks Stephen, I am struggling with oAuth at the moment, the
>> documentation gives examples but obviously not in VFP and it looks
>> like things like javascript and php include oauth modules.
>>
>> So if I can reword my question, has anyone got any oauth code 😊
>>
>> -----Original Message-----
>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>> Russell
>> Sent: Thursday, 06 September 2018 15:20
>> To: ***@leafe.com
>> Subject: Re: SOAP
>>
>> To be honest, REST is just a way that sets up an interaction in
>> complex ways without the client knowing anything beforehand about the
>> server and the resources it hosts. You define that the transmission
>> is going to be HTTP and then follow the rules for it.
>>
>> Now your call to the API can be done from a web browser, an app on a
>> phone or a tablet.
>>
>> here is something I wrote to get data for ExchangeRates.
>> apicall.Clear(); // This is a string to hold the params for the call
>> I am making for data
>>
>> apicall.Append("api/historical/" + EOM);
>>
>>
>> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
>> // get the dates for use in the string HttpResponseMessage
>> httpResponseMessage = await client.GetAsync(apicall.ToString());
>> HttpResponseMessage response = httpResponseMessage;
>> if (response.IsSuccessStatusCode)
>> { // put the data returend into a data object I have
>> local.
>> eRateReturn rate = await
>> response.Content.ReadAsAsync<eRateReturn>();
>>
>>
>>
>> Here is eRateReturn class(s) for data:
>> public class Rates
>> {
>> public float GBP { get; set; }
>> public float CAD { get; set; }
>> public float USD { get; set; }
>> public float EUR { get; set; }
>> }
>>
>> public class eRateReturn
>> {
>> public float timestamp { get; set; }
>> public string Base { get; set; }
>> public DateTime date { get; set; }
>> public Rates rates {get; set;}
>> }
>>
>>
>>
>>
>>
>>> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:
>>>
>>> Thanks for the reply Russell, I have now discovered this particular
>>> thing also supports REST api, just trying to figure out oAuth
>>>
>>> -----Original Message-----
>>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>>> Russell
>>> Sent: Thursday, 06 September 2018 14:30
>>> To: ***@leafe.com
>>> Subject: Re: SOAP
>>>
>>> Too bad that Alan is no longer among us, he redid his application
>>> all in Web Service calls years ago.
>>>
>>> In general, the "service" is a replacement for a data store. You
>>> ask for data from the service and it gives it to you in SOAP, xml that is.
>>> What you actually receive is some sort of collection of data, that
>>> may have collections within it. You could do the same thing in
>>> arrays if you wanted in VFP.
>>>
>>> Now the data is yours to use at your desire. You may have to
>>> package the data back into XML that mimics the data they sent you
>>> for inserts, updates, maybe even deletes. Now through the "service"
>>> you post that XML pack to them.
>>>
>>> Today the industry is changing the name from Web Service to API but
>>> in general it works in much the same way.
>>>
>>> On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk>
>> wrote:
>>>
>>>> Is anyone able to share an example of working with a webservice
>>>> purely in code?
>>>>
>>>> Thanks
>>>>
>>>> Chris.
>>>>
>>>>
>>>> --- StripMime Report -- processed MIME parts ---
>>>> multipart/alternative text/plain (text body -- kept) text/html
>>>> ---
>>>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/000801d44615$c15d6d10$44184730$@powerchurch.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obv
Chris Davis
2018-09-06 20:54:29 UTC
Permalink
Cheers tracey I am going to pick apart the vfptweetapi as it seems to contain everything I need

-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Tracy Pearson
Sent: Thursday, 06 September 2018 20:14
To: ***@leafe.com
Subject: RE: SOAP

You need to add a header. How it is formatted depends on the API.
I have this code, I'm also using the Chilkat ActiveX control for the HTTP requests.
oHTTPRequest.AddHeader("Authorization", "Bearer " + Token)

As an side note, I started using the Chilkat control over the MSXML control because the logging.
The MSXML doesn't have connectivity logging to diagnose problems. Chilkat does.

Have fun,
Tracy

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, September 06, 2018 2:51 PM
To: ***@leafe.com
Subject: RE: SOAP

Keeping it basic at the moment with MsXml2.XmlHttp

But I have noticed in the middle of vfpoauth there is a signrequest method that doesn't seem to be used ... I have also ventured into the vfptweetapi and that has the same function so I will delve deeper tomorrow


-----Original Message-----
From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Tracy Pearson
Sent: Thursday, 06 September 2018 19:31
To: ***@leafe.com
Subject: RE: SOAP

What are you using to make the web requests in VFP?

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
Sent: Thursday, September 06, 2018 2:12 PM
To: ***@leafe.com
Subject: Re: SOAP

Progress I have managed to use vfpoauth to get my access token now I need to work out how to sign a request in vfp , I can get it to work in postman

> On 6 Sep 2018, at 19:01, Stephen Russell <***@gmail.com> wrote:
>
> This might help?
>
> https://github.com/VFPX/VFPOAuth
>
>
>
>
>
>> On Thu, Sep 6, 2018 at 10:24 AM Chris Davis <***@actongate.co.uk> wrote:
>>
>> Thanks Stephen, I am struggling with oAuth at the moment, the
>> documentation gives examples but obviously not in VFP and it looks
>> like things like javascript and php include oauth modules.
>>
>> So if I can reword my question, has anyone got any oauth code 😊
>>
>> -----Original Message-----
>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>> Russell
>> Sent: Thursday, 06 September 2018 15:20
>> To: ***@leafe.com
>> Subject: Re: SOAP
>>
>> To be honest, REST is just a way that sets up an interaction in
>> complex ways without the client knowing anything beforehand about the
>> server and the resources it hosts. You define that the transmission
>> is going to be HTTP and then follow the rules for it.
>>
>> Now your call to the API can be done from a web browser, an app on a
>> phone or a tablet.
>>
>> here is something I wrote to get data for ExchangeRates.
>> apicall.Clear(); // This is a string to hold the params for the call
>> I am making for data
>>
>> apicall.Append("api/historical/" + EOM);
>>
>>
>> apicall.Append(".json?app_id=bbfaf8b299c54f93811b2144f9d33c3e&symbols=GBP,EUR,CAD");
>> // get the dates for use in the string HttpResponseMessage
>> httpResponseMessage = await client.GetAsync(apicall.ToString());
>> HttpResponseMessage response = httpResponseMessage;
>> if (response.IsSuccessStatusCode)
>> { // put the data returend into a data object I have
>> local.
>> eRateReturn rate = await
>> response.Content.ReadAsAsync<eRateReturn>();
>>
>>
>>
>> Here is eRateReturn class(s) for data:
>> public class Rates
>> {
>> public float GBP { get; set; }
>> public float CAD { get; set; }
>> public float USD { get; set; }
>> public float EUR { get; set; }
>> }
>>
>> public class eRateReturn
>> {
>> public float timestamp { get; set; }
>> public string Base { get; set; }
>> public DateTime date { get; set; }
>> public Rates rates {get; set;}
>> }
>>
>>
>>
>>
>>
>>> On Thu, Sep 6, 2018 at 8:38 AM Chris Davis <***@actongate.co.uk> wrote:
>>>
>>> Thanks for the reply Russell, I have now discovered this particular
>>> thing also supports REST api, just trying to figure out oAuth
>>>
>>> -----Original Message-----
>>> From: ProfoxTech <profoxtech-***@leafe.com> On Behalf Of Stephen
>>> Russell
>>> Sent: Thursday, 06 September 2018 14:30
>>> To: ***@leafe.com
>>> Subject: Re: SOAP
>>>
>>> Too bad that Alan is no longer among us, he redid his application
>>> all in Web Service calls years ago.
>>>
>>> In general, the "service" is a replacement for a data store. You
>>> ask for data from the service and it gives it to you in SOAP, xml that is.
>>> What you actually receive is some sort of collection of data, that
>>> may have collections within it. You could do the same thing in
>>> arrays if you wanted in VFP.
>>>
>>> Now the data is yours to use at your desire. You may have to
>>> package the data back into XML that mimics the data they sent you
>>> for inserts, updates, maybe even deletes. Now through the "service"
>>> you post that XML pack to them.
>>>
>>> Today the industry is changing the name from Web Service to API but
>>> in general it works in much the same way.
>>>
>>> On Thu, Sep 6, 2018 at 7:31 AM Chris Davis <***@actongate.co.uk>
>> wrote:
>>>
>>>> Is anyone able to share an example of working with a webservice
>>>> purely in code?
>>>>
>>>> Thanks
>>>>
>>>> Chris.
>>>>
>>>>
>>>> --- StripMime Report -- processed MIME parts ---
>>>> multipart/alternative text/plain (text body -- kept) text/html
>>>> ---
>>>>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/000801d44615$c15d6d10$44184730$@powerchurch.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Report [OT] Abuse: http://leafe.com/reportAbuse/000801d44615$c15d6d10$44184730$@powerchurch.com
_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@CWLP265MB1668.GBRP265.PROD.OUTLOOK.COM
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see
m***@mbsoftwaresolutions.com
2018-09-06 21:14:01 UTC
Permalink
On 2018-09-06 09:30, Stephen Russell wrote:
> Today the industry is changing the name from Web Service to API but in
> general it works in much the same way.


But I get the impression that it's easier to work with the APIs?

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@mbsoftwaresolutions.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Paul Newton
2018-09-06 13:49:33 UTC
Permalink
Chris

There are several articles on Web Services that you may find useful on Rick Strahl's web site (west-wind.com)

Paul

-----Original Message-----
From: ProfoxTech [mailto:profoxtech-***@leafe.com] On Behalf Of Chris Davis
Sent: 06 September 2018 13:31
To: ***@leafe.com
Subject: SOAP

Sent by an external sender
------------------------------

Is anyone able to share an example of working with a webservice purely in code?

Thanks

Chris.


--- StripMime Report -- processed MIME parts --- multipart/alternative
text/plain (text body -- kept)
text/html
---

[excessive quoting removed by server]

_______________________________________________
Post Messages to: ***@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/***@SN1PR0201MB1856.namprd02.prod.outlook.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Continue reading on narkive:
Loading...