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

Re: [Ftpapi] HTTPAPI help neded



Hi Scott,

I coded the redirect handling, which did what it was supposed to, but all I got was the actual login page echoed back to me.  I'm thinking the CA DOJ hasn't given us the full and correct URL.  How is their server supposed to know we are requesting a SOAP web service?  Shouldn't the URL point us to that service, or at least a directory where services reside?  In most examples I have seen, the URL points to the actual service.  Is there some kind of "discovery" request I can make to find the service I need?

Again, thanks for your help.

On Fri, Nov 6, 2020 at 1:10 PM Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:
Hi Braden,

It is sending you an HTTP 302 response.  This means that it wants you to
to visit a different URL than the one you requested.  In a web browser,
it would automatically visit the new URL, but in HTTPAPI, you have to
code the request to the new url yourself.

So it would be something like:

rc = http_req( parameter : parameter: etc);
if rc = 302;
   rc = http_req( 'GET': http_redir_loc(): parameter: parameter);
endif;

So if you get a 302 response, you use http_redir_loc() to get the URL
its redirecting you to, and then you can make the new request against
that page.

Normally this doesn't come up with APIs, though...  but, I'm not
familiar with this particular one, so maybe it's an exception to the rule?

-SK

On 11/6/2020 7:22 AM, Braden Lincoln wrote:
> I am a newbie on this.  I am using HttpAPI to attempt to send a soap
> request that is supposed to download a file to the server.  I am
> getting connected, and I can see my soap envelope being sent. 
> Authentication is supposed to happen via the soap service, with the
> credentials being within the soap envelope.  But I am getting
> redirected to a login page, rather than the soap service being
> invoked.  VBelos is the full log. Any help would be appreciated. 
> Thanks, Braden Lincoln
>
--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi
-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi