[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Webservices via HTTPS with user/pass
Sender: "Mendoza, German \(RCIS\)" <German.Mendoza@xxxxxxxx>
No, it isn't. I'm able to connect with a username/password to an https but I can't seem to call a web service after I'm connected.
-----Original Message-----
From: owner-ftpapi@xxxxxxxxxxxxx <owner-ftpapi@xxxxxxxxxxxxx>
To: ftpapi@xxxxxxxxxxxxx <ftpapi@xxxxxxxxxxxxx>
Sent: Tue Feb 07 18:53:03 2006
Subject: RE: Webservices via HTTPS with user/pass
I have done something like this. I place the user name/password in a data area and call it into my program and then place it properly spaced into the site I am calling. Works great. Is this what you are looking for?
________________________________
From: owner-ftpapi@xxxxxxxxxxxxx [mailto:owner-ftpapi@xxxxxxxxxxxxx] On Behalf Of Mendoza, German (RCIS)
Sent: Tuesday, February 07, 2006 3:50 PM
To: ftpapi@xxxxxxxxxxxxx
Subject: Webservices via HTTPS with user/pass
Has anybody been able to call a web service via HTTPS and also supplying a username/password? I have worked with EXAMPLE7 (Example of supplying USER/PASS to HTTP server) with a mixture of EXAMPLE3 (to initialize the SSL API’s) and been able to retrieve a page (via http_url_get) and save that to the IFS. But can this be modified to use http_url_POST?
Here’s a sample snippet:
c eval URL = 'https://dvcifyiapp1:563/default.aspx'
c eval rc = http_url_get(URL: '/tmp/default.aspx')
c if rc <> 1
c callp http_error(err)
c if err <> HTTP_NDAUTH
c eval msg = HTTP_ERROR
c dsply msg
c return
c endif
*--the getpasswd routine is in example7
c exsr getpasswd
c eval rc = http_url_get(URL: '/tmp/default.aspx’)
This saves the file just fine… then I change the URL, modify the data, then do a url_post to call a web service:
c eval URL = 'https://dvcifyiapp1:563' +
c '/CimaxReturnType_clsXMLReturn.asmx' +
c '/LoadROList'
c eval data = 'sintCropYear=2005&sintStateId=27&sintInsuranceType=11'
c eval rc = http_url_post(URL : %addr(data) : %len(%trimr(data))
c : ‘/tmp/results.xml’ : HTTP_TIMEOUT : HTTP_USERAGENT
c : ‘application/x-www-form-urlencoded’)
I get the HTTP 1.1/500 Internal Server error..
When I don’t use https with username/password to the same web service:
data = 'sintCropYear=2005&sintStateId=27&sintInsuranceType=11';
rc = http_url_POST('http://dvcifyiapp1:8080/'
+ 'CimaxReturnType_clsXMLReturn.asmx'
+ '/LoadROList'
: %addr(data)
: %len(%trimr(data))
: '/tmp/results.xml'
: HTTP_TIMEOUT
: HTTP_USERAGENT
: 'application/x-www-form-urlencoded');
This works just fine and saves to results.xml on the IFS.
Thanks
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------