Thanks, Ed!
I also appeared to be running into Authority issues, so I sent an
email to the folks at the USGA to find out if something has been
changed. I have tried the command using both the %20 (Space) and %00
(Null), and to no luck. As of yesterday afternoon, and having been
pointed in alternate direction, I began to work on an IBM I SQL
solution using XMLTABLE and XMLPARSE within an SQL Statement, that
uses the SYSTOOLS/HTTPGETCLOB Service Program. It seems like it might
be a good alternate solution, so I am going to continue to work on
both solutions for now, at least until I can get one of them to work.
Thanks again, for all of your input and suggestions with this. Here’s
an example of the SQL solution that retrieves xml data from the BBC
News Feed:
select *
from xmltable('$result/rss/channel/item'
passing xmlparse(
document
systools.httpgetclob('http://feeds.bbci.co.uk/news/world/rss.xml
?edition=uk', '')
) as "result"
Columns
title varchar(128) path 'title',
description varchar(1024) path 'description',
link varchar(255) path 'link',
pubDate varchar(20) path 'substring(pubDate, 1, 16)'
) as result
*Roger Mesker*
IBM i Programmer / Analyst | The Villages^® Technology Solutions Group
Direct: 352.674.1562 | Support: 352.674.1530
*From:*ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] *On Behalf Of *Ed DeRyder
*Sent:* Tuesday, April 18, 2017 5:11 PM
*To:* FTPAPI/HTTPAPI mailing list
*Subject:* Re: [Ftpapi] HTTPAPI from an IBM i command line?
For what it's worth, I tried this:
HTTPAPI
URL('http://ghp.ghin.com/ghponline/dataservices/golfermethods.asmx/ClubRoster?username=joe&password=test&association=123&club=456&service=0&activeOnly=false&includeLowHandicapIndex=false&includeCombinedClubs=false&returnDistinctMembers=false&type3Only=false')
DOWNLOAD('/tmp/edtest.xml') DEBUG('/tmp/golfdebug.txt')
and got the same 500 internal server error. When I tried the form
with those same values, I received an error indicating login failed.
The debug file said the last name was missing. I added the last name,
first name and gender parameters with %20 values and tried it again.
HTTPAPI
URL('http://ghp.ghin.com/ghponline/dataservices/golfermethods.asmx/ClubRoster?username=joe&password=test&association=123&club=456&service=0&lastName=%20&firstName=%20&gender=%20&activeOnly=false&includeLowHandicapIndex=false&includeCombinedClubs=false&returnDistinctMembers=false&type3Only=false')
DOWNLOAD('/tmp/edtest.xml') DEBUG('/tmp/golfdebug.txt')
It failed again, this time with the same login failed error I got when
using the form:
GHPSecurityLoginException: Login Failed
at GHPSecurity.IsOKAssociationClub(Int32 association, Int32 club,
GHINAppRights minLevel)
at GHPSecurity.IsOKAssociationClub(String username, String
password, Int32 association, In
at GolferMethods.ClubRosterLoad(String username, String password,
Int32 association, Int32
at GolferMethods.ClubRoster(String username, String password, Int32
association, Int32 clu
What does your debug file say?
Ed
------------------------------------------------------------------------
*From:*ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
<mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
[ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Ed DeRyder
[EDeRyder@xxxxxxxxxxxxxxxxxxxxxxxx]
*Sent:* Tuesday, April 18, 2017 3:40 PM
*To:* FTPAPI/HTTPAPI mailing list
*Subject:* Re: [Ftpapi] HTTPAPI from an IBM i command line?
Roger,
A 500 Internal Server Error usually means there was a problem with the
service at ghin.com. At least that's a different response.
The link I sent with the details on how to format your URL also has a
sample post form. If you try your values in that form, does that also
generate a 500 error? They could be having a problem on their end.
Without knowing exactly what you're sending in place of asterisks,
there's not much else help we can offer. If some of those parameters
are optional, maybe you can start with a simpler request to see if you
can identify a parameter that isn't populated correctly. Maybe the
blank first name, last name and gender parameters can be dropped
completely, for instance.
The WSDL at this link:
http://ghp.ghin.com/ghponline/dataservices/golfermethods.asmx?WSDL
indicates username, password, gender, first name and last name are
optional parameters.
If you think all of your values are set correctly, then you'll
probably need to work with the provider to have them identify the
problem.
Ed
------------------------------------------------------------------------
*From:*ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
<mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
[ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mesker, Roger
[Roger.Mesker@xxxxxxxxxxxxxxxxxx]
*Sent:* Tuesday, April 18, 2017 3:08 PM
*To:* FTPAPI/HTTPAPI mailing list
*Subject:* Re: [Ftpapi] HTTPAPI from an IBM i command line?
Thanks Ed!
I changed my statement as follows, as you suggested, and this time I
got an error message (13 HTTP/1.1 500 Internal Server Error):
HTTPAPI
URL('http://ghp.ghin.com/ghponline/dataservices/golfermethods.asmx/ClubRoster?username=*****&password=*****&association=*****&club=*****&service=*****&lastName=%20&firstName=%20&gender=%20&activeOnly=*****&includeLowHandicapIndex=*****&includeCombinedClubs=*****&returnDistinctMembers=*****&type3Only=*****')
DOWNLOAD('/meskerr/GHPClubData_Test_04-18-2017_3H.xml')
REQTYPE(*GET) TYPE('text/xml')
DEBUG('/meskerr/xmldebug3H')
*Roger Mesker*
IBM i Programmer / Analyst | The Villages^® Technology Solutions Group
Direct: 352.674.1562 | Support: 352.674.1530
*From:*ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
<mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] *On Behalf Of *Ed DeRyder
*Sent:* Tuesday, April 18, 2017 2:27 PM
*To:* FTPAPI/HTTPAPI mailing list
*Subject:* Re: [Ftpapi] HTTPAPI from an IBM i command line?
Roger,
I found the documentation for the service here:
http://ghp.ghin.com/ghponline/dataservices/golfermethods.asmx?op=ClubRoster
This is part of your URL:
*/GHPOnline/DataServices/golferMethods.asmx?op=ClubRoster&username*
The documentation for the HTTP GET shows that same section looking
like this:
*/ghponline/dataservices/golfermethods.asmx/ClubRoster?username*
The way they specify the ClubRoster method is different from yours.
Try it their way and see if it helps. Also, and I don't know if this
will matter, you may want to make your URL match the same case as
shown in the documentation.
Ed
------------------------------------------------------------------------
*From:*ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
<mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
[ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mesker, Roger
[Roger.Mesker@xxxxxxxxxxxxxxxxxx]
*Sent:* Tuesday, April 18, 2017 12:54 PM
*To:* FTPAPI/HTTPAPI mailing list
*Subject:* Re: [Ftpapi] HTTPAPI from an IBM i command line?
Hello again Ed!
I made the additional modifications you had suggested for using the
HTTPAPI Command on the IBM i command line, and it still does not seem
to recognize the Parameters. Any additional help you can offer will
be greatly appreciated.
*HTTPAPI
URL('http://ghp.ghin.com/GHPOnline/DataServices/golferMethods.asmx?op=ClubRoster&username=*********&password=**********&association=*****&club=*****&service=*****&lastName=%20&firstName=%20&gender=%20&activeOnly=**********&includeLowHandicapIndex=**********&includeCombinedClubs=**********&returnDistinctMembers=**********&type3Only=***********')*
*DOWNLOAD('/meskerr/GHPClubData_Test_04-18-2017_3F.xml') *
*REQTYPE(*GET) *
*TYPE('text/xml') *
*DEBUG('/meskerr/xmldebug3F') *
Roger Mesker
IBM i Programmer / Analyst | The Villages® Technology Solutions Group
Direct: 352.674.1562 | Support: 352.674.1530
-----Original Message-----
From: Mesker, Roger
Sent: Thursday, April 13, 2017 7:29 PM
To: FTPAPI/HTTPAPI mailing list
Subject: RE: HTTPAPI from an IBM i command line?
Ed,
Thank you very much, I will modify my process accordingly, and let you
all know how it comes out.
Roger
______________________________________
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
<mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
[ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] on behalf of Ed DeRyder
[EDeRyder@xxxxxxxxxxxxxxxxxxxxxxxx]
Sent: Thursday, April 13, 2017 5:27 PM
To: FTPAPI/HTTPAPI mailing list
Subject: Re: [Ftpapi] HTTPAPI from an IBM i command line?
As Kevin said in his other email, if you need spaces, they should be
URL-encoded: %20
It's my experience that parameters are typically separated by
ampersands like this, though:
golferMethods.asmx?/op=ClubRoster&username=**********&password=**********&association=***&club=***
You should have some way of seeing this in documentation from the
website, possibly even in the response you're getting back.
Ed
________________________________
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
<mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
[ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mesker, Roger
[Roger.Mesker@xxxxxxxxxxxxxxxxxx]
Sent: Thursday, April 13, 2017 4:11 PM
To: FTPAPI/HTTPAPI mailing list
Subject: Re: [Ftpapi] HTTPAPI from an IBM i command line?
Ed,
Yes, I do have spaces, and not ampersands. Should I be using
ampersands in between the parameters?
Roger Mesker
IBM i Programmer / Analyst | The Villages® Technology Solutions Group
Direct: 352.674.1562 | Support: 352.674.1530
From: ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
<mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>
[mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Ed DeRyder
Sent: Thursday, April 13, 2017 3:46 PM
To: FTPAPI/HTTPAPI mailing list
Subject: Re: [Ftpapi] HTTPAPI from an IBM i command line?
Roger,
I'm a relative newbie to this, but one thing I see is that you have
spaces between your parameters, not ampersands. Is that how you're
sending the URL or was that just how you edited it for your email?
Ed
________________________________
From:
ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx<mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx
<mailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx%3cmailto:ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx>>
[ftpapi-bounces@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of Mesker, Roger
[Roger.Mesker@xxxxxxxxxxxxxxxxxx]
Sent: Thursday, April 13, 2017 2:07 PM
To: 'ftpapi@xxxxxxxxxxxxxxxxxxxxxx'
Subject: Re: [Ftpapi] HTTPAPI from an IBM i command line?
Hello Scott!
Thank you so much for all of your contributions to the world. Your
generosity in sharing your knowledge and time are a tremendous asset
to everyone. We are huge fans of yours here at The Villages.
I have been working on invoking the HTTPAPI command from an IBM I
command line, and while I can get it to make the connection to the
outside server, it is only returning a listing of the available
Methods, and not the .xml data I am looking for. I have tried
multiple ways, and so far, all I get is the same result.
Here is an example of a “get” I have been running. Any advice, and/or
help you can offer will be GREATLY appreciated.
HTTPAPI
URL('http://ghp.ghin.com/GHPOnline/DataServices/golferMethods.asmx?/op=ClubRoster
username=********** password=********** association=*** club=***
service=*** activeOnly=***** includeLowHandicapIndex=*****
includeCombinedClubs=***** returnDistinctMembers=*****
type3Only=*****') DOWNLOAD('/meskerr/GHPClubData_Test_04-13-2017_17.xml')
REQTYPE(*GET)
TYPE('text/xml')
PROXYUSER('**********')
PROXYPASS('**********')
DEBUG('/meskerr/xmldebug1H/')
Everything in the URL between the ClubRoster? and the DOWNLOAD are
parameters required to access and return the xml data to the IBM I IFS
folder. I asterisked out all of the sensitive data within the URL
string. Do the parameters within the URL string have to be single or
double quoted? I have tried multiple variations of the command, using
both Get & Post, and so far, I have not been successful in getting any
of them to return the actual data.
NOTE: I even tried SoapUI tool, and still received the same results there.
Best regards,
[tsg-color (003)]
Roger Mesker
IBM i Programmer/Analyst | The Villages® Technology Solutions Group
1026 Canal Street | The Villages, FL 32162
Main: 352.750.1515 | Support: 352.674.1530
Direct: 352.674.1562 | Fax: 352.750.1616
Roger.mesker@xxxxxxxxxxxxxxxxxx<mailto:Roger.mesker@xxxxxxxxxxxxxxxxxx
<mailto:Roger.mesker@xxxxxxxxxxxxxxxxxx%3cmailto:Roger.mesker@xxxxxxxxxxxxxxxxxx>>
| http://www.TheVillagesTSG.com<http://www.thevillagestsg.com/
<https://mail.silveredgeconsulting.com/owa/UrlBlockedError.aspx>>