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

Re: [Ftpapi] Fwd: HTTP API Question



Hi Scott,

Thanks for your response and i will make sure to put the correct subject line going forward. I will check on your suggestions. 

On Tue, May 22, 2018 at 9:27 PM, Scott Klement <sk@xxxxxxxxxxxxxxxx> wrote:

Vino,

In the future, could you please use a more meaningful subject on your e-mails?  Nearly all of the e-mails sent to this list are HTTPAPI questions, so using "HTTPAPI question" as the subject does not help us understand what your message is about.  Instead, please use a subject like "Problem with userid and password" so that we understand better.

With regards to the problem you're experiencing...  I do not know why your screen is saying that it expects a userid and password, since that information has not been made clear to us. The code that Alasdair provided looks correct to me, and has worked on all of the sites I've used it with (assuming the site expects basic authentication)

I can only take guesses...  but, here are some thoughts based on similar messages I've seen in the past:

1) Perhaps this site requires a different method of signing on instead of basic authentication?

2) If basic authetnication was correct, then perhaps there's a mistake in the user/password you've provided?

3) Or perhaps there are special characters in the user/password that are mistranslated due to an incorrect CCSID setting?

Since I do not run the site that is sending you this message, it is difficult for me to know why it's not working.  If you're unable to get things working with the above thoughts, your best bet is to get detailed information from whomever runs the site for how they expect the user/pass to be sent to them.  If possible, it'd be helpful for them to tell you why your method isn't working.

Good luck!
-SK


On 5/22/18 2:02 PM, Vino wrote:
Hi, 

Thanks for response. Even though i set HTTP_AUTH_BASIC, still i am getting below error.

"This page requires a user-id & password" . Is there anything else i am missing? 

Thanks.

On Tue, May 22, 2018 at 2:31 AM, Alasdair Macdonald <alasdairgmacdonald@xxxxxxxxx> wrote:
Authentication :

Callp     http_setauth(HTTP_AUTH_BASIC
                      : %trim ( User )
                      : %trim ( Pass ) )

Send data from file; receive response into file :

Eval      ErrorCodeHttp = http_url_post_stmf (
                            %trim ( URL )
                          : PostFile
                          : ResponseFile
                          : HTTP_TIMEOUT
                          : HTTP_USERAGENT
                          : 'application/xml'
                          : SOAPaction     )

Scan HTTP_API_H for "http_url_post_stmf" and read the comments. You
might need to use text/xml instead of application/xml.

With a robust program, and a system that you are familiar with, you
might find some advantages to sending data from, and receiving the
response into memory (as opposed to IFS files). But this can make
troubleshooting harder, and I would recommend starting with file
transfers.







On 21 May 2018 at 18:38, Vino <vinomails@xxxxxxxxx> wrote:
> Hi Team,
>
> I need to send SOAP request as a XML file to another server with basic
> authentication. I am little confused which procedures to use for
> authentication and send xml file.
--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi





--
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi


-- 
_______________________________________________
Ftpapi mailing list
Ftpapi@xxxxxxxxxxxxxxxxxxxxxx
http://scottklement.com/mailman/listinfo/ftpapi