Try letting HTTPAPI set the soap action for you. Remove the <Action></Action> section and before you run your request do this:
On Tue, 2020-11-10 at 14:16 -0800, Braden Lincoln wrote:
Indeed, the DOJ had not provided us a complete URL for the service. We got that, so we are over that hump. Now I am dealing with other issues.
The SOAP envelope is confusing me. If I omit the "<Action> tag in the envelope, I get an HTTP 500 Error. If I include that tag formatted as it is shown in their example, I get an HTTP 400 error. I have tried every which way I can think of to format
this differently, without success. I am suspecting there is something else I need to do with HTTPAPI to get this to work. I see things in the service program related to "SOAPAction", and I am wondering if this is something I need to set.
I have attached logs and the program source.
Ya, I see this a lot. Documentation doesn't keep up with the actual service endpoints. If I see a redirect, I always contact them and ask for the actual current endpoint.
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.
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
Kevin Bucknum
Senior Programmer Analyst
MEDDATA /
MEDTRON
120 Innwood Drive
Covington LA 70433
Local: 985-893-2550
Toll Free: 877-893-2550
https://www.medtronsoftware.com
CONFIDENTIALITY NOTICE
This document and any accompanying this email transmission contain confidential information, belonging to the sender that is legally privileged.
This information is intended only for the use of the individual or entity named above. The authorized recipient of this information is prohibited from disclosing this information to any other party and is required to destroy the information after its stated
need has been fulfilled. If you are not the intended recipient, or the employee of agent responsible to deliver it to the intended recipient, you are hereby notified that any disclosure, copying, distribution or action taken in reliance on the contents of
these documents is STRICTLY PROHIBITED. If you have received this email in error, please notify the sender immediately to arrange for return or destruction of these documents.
|