[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Ftpapi Digest, Vol 44, Issue 1



Hi,

I'm still working on doing my first attempt to send to an HTTPS server using HTTPAPI.
I'm using a slightly modified version of Example 16.
I actually made some progress and got a little further..  I'm not sure how to do a debug log of the HTTPAPI itself.
I've been walking through the RPG in regular debug.

First, I got this message: (GSKit) Access to the key database is not allowed. 
Problem solved:  I found the solution in the archives, an authority issue which I had our Operations manager fix.

Then, I got this message:  (GSKit) Handle is not valid. 
I did a reclaim activation group to solve that.
Question:  When I write my 'real' application, will I have to reclaim activation group before every call?

Now that I got through those issues, I made it to this:

I tried structuring my link two different ways, with and without a trailing "/"

Here's my command, I just changed the "xxx" part.

rc = http_url_post_xml('https://beta.xxx.com/cf/as400'
                      : %addr(postData) + 2              
                      : %len(postData)                   
                      : %paddr(StartOfElement)           
                      : %paddr(EndOfElement)             
                      : *NULL );                         

Alternate, with the trailing /:

rc = http_url_post_xml('https://beta.xxx.com/cf/as400/'

1.  When I do the first version (without the trailing "/") I get error 302

Error:  HTTP/1.1 302 Moved Temporarily

2. When I do the second version (with the trailing "/") I get -1

Error:  XML parse failed at line 2, col 0: no element found

Thanks,
Charlie
 
>Please tell us what the error message is.  The -1 by itself just means 
>"something went wrong".   Your program then needs to call http_error() 
>o determine WHAT went wrong.

>Or even better yet, create a debug log that shows everything that HTTPAPI is going through, and where it's getting the error.

>Please also move this conversation to the FTPAPI mailing list (which is the proper place to discuss both the HTTPAPI and 
>FTPAPI projects) rather than on Midrange.com


On 2/1/2010 2:58 PM, Versfelt, Charles wrote:
>
> Hi again,
>
> Please forgive me for my "beginner" questions, it's frustrating that 
> no one at my company knows the socket/HTTPS/HTTPAPI And I have to learn it on the fly...
>
> My web guy, of course, doesn't know RPG or iSeries or HTTPAPI... He only knows the web.
>
> When I asked on here about sending nonsense, you (Scott) gave the analogy of calling an operator and saying "bibbity bobbity."
>
> I'm suspecting from that answer, that what my web guy asked me to do on the outset of this project... Makes no sense.
> That my request has been "bibbity bobbity" and that's why I'm trying to do "bibbity bobbity."
>
> Here's the situation:  The actual project, we will have an https site to send and receive payment data, is not yet ready.
> That is, I'm still waiting for people in the management end for the "outside" site I'm ultimately going to send and receive data.
>
> In the meantime, I've been asked as a "proof of concept" to prove that 
> I can send something, anything, from an RPG program on the iSeries to an https site.
>
> My company has its own https site, as well as a beta development https site, which is used for other purposes.
>
> Our web guy told me, just send anything to that site.  He set up a folder on the site, he gave me a URL, in the form of "https://xxx.abc/def/ghi";) and said, "Send me something there, anything."
>
> I said, "I was told it has to be valid XML instructions," I even gave the analogy of the "bibbity bobbity."
> He said, "Sure, send me any XML, I don't care what it is.  Drop it into this folder and I'll see if I can open and look at it."
> I described the sample program with the UPS tracking#, he said just to send that, whatever the UPS site gets in the sample program.  He seems to think that I can send anything and it will show up in his folder as something he can read.
>
> Correct me if I'm wrong..... What he's asking for doesn't make any sense, does it?
> I can't just send him anything... Can I?
>
> Doesn't the https site itself have to have some web programming on his end (analogy:  "the operator") that is looking for specific type of intructions (XML in the format expected by the site, in the analogy, speak the language the operator understands, as for example, a UPS site has some sort of web programming that expects to see<AccessRequest>  and then, inside that,<AccessLicenseNumber>  and etc.) and if the https: site doesn't have some sort of web program expecting to see those commands, then it's like a telephone with no operator and it all becomes gobbeldy gook?
>
> He seems very sure that I should be able to just get a connection from my AS400 by plugging in the URL and then drop anything into his folder, and he can read it.
>
> I tried taking the EXAMPLE programs (5 and 12)  and changing the UPS URLs to the URL the web guy gave me, and then just run them exactly as is.
>
> They come back with rc = -1.  My web guy sees nothing.
>
> Am I getting -1 because I really need to hit an https site that is expecting something meaningful to it, that the https: site has to have something waiting for specific XML commands?
>
> Charlie
>
-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------