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

AW: Webservices via HTTPS with user/pass



Sender: =?utf-8?Q?Alexander_Gr=C3=BCnwald?= <alexander.gruenwald@xxxxxxxxxxx>

Yes, I have done that with HTTPAPI. I set up SSL-Mode and connect to the Service with http_xproc to read the response and get the Cookie Information from the first connection response (necessary in my case). Afterwards I send my Login-SOAP Message to the Server with http_url_post (I made it easier for me and created the regular SOAP message with predefined SOAP-String). The returned answers from WebService are stored in IFS and read from there to get to the next http_url_post for additional requests. Hard to define it in few words, but it works properly.

Mit freundlichen Grüßen/Best regards Mag. Alexander Grünwald

Geschäftsführer/Projektmanagement
SOB Datenverarbeitungsges.m.b.H.
Kierlingerstraße 11
A-3400 Klosterneuburg

Tel. +43/2243/37201
Fax. +43/2243/37201/5
Mail: alexander.gruenwald@xxxxxxxxxxx 

 

-----Ursprüngliche Nachricht-----
Von: owner-ftpapi@xxxxxxxxxxxxx [mailto:owner-ftpapi@xxxxxxxxxxxxx]Im
Auftrag von Mendoza, German (RCIS)
Gesendet: Mittwoch, 08. Februar 2006 03:09
An: ftpapi@xxxxxxxxxxxxx
Betreff: 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 APIs) 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?

 

Heres 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 dont 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
-----------------------------------------------------------------------


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------