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

Consume https web service with userid and password.

I am consuming a web service.  I first consumed it using SoapUI, then took the soap request
that it built, and plugged it into an rpg program.

Then i used the httpapi to get the results, sample of the call below.

rc = http_url_post(Url                                    
                  :%addr(Soap) + 2 :len                   
It is an https url and via some mechanism in the soap header, the user id and
password are fed to the request/web service.

The soap request is below.

Basically, i've just exhausted everything that didn't work until i got it to work,
so, i don't really know what i'm doing. (what else is new)

Can someone explain what kind of security/authentication this is and/or what's going on?
Is there something 'built in' to the httpapi to automagically implement this?

Any guidance, suggestions or explanations are much appreciated.



Soap = '<?xml version="1.0" encoding="UTF-8"?>'                       
 + '<soapenv:Envelope xmlns:soapenv="'                                
 + 'http://schemas.xmlsoap.org/soap/envelope/"; '                      
 + 'xmlns:jbr="urn:com.workday.report/JBR_Custom_Report1">'           
 + '<soapenv:Header>'                                                 
 + '<wsse:Security soapenv:mustUnderstand="1" '                       
 + 'xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/'              
 +   'oasis-200401-wss-wssecurity-secext-1.0.xsd" '                   
 + 'xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/'               
 +   'oasis-200401-wss-wssecurity-utility-1.0.xsd">'                  
 + '<wsse:UsernameToken wsu:Id="UsernameToken-2">'                    
 + '<wsse:Username>'                                                  
   + 'fakeuseridhere'                                   
 + '</wsse:Username>'                                                 
 + '<wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/'     
 +   'oasis-200401-wss-username-token-profile-1.0#PasswordText">'     
 +     'fakepasswordhere</wsse:Password>'                              
 + '<wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/'
 +   'oasis-200401-wss-soap-message-security-1.0#Base64Binary">'      
 + 'ABCDEV9FfuqzOjbjBr1Q/w==</wsse:Nonce>'                            
 + '<wsu:Created>2014-04-11T20:24:12.980Z</wsu:Created>'              
 + '</wsse:UsernameToken></wsse:Security>'                            
 + '</soapenv:Header>'                                                
 + '<soapenv:Body>'                                                   
 +       '<jbr:Execute_Report>'                                       
 +          '<!--Optional:-->'                                        
 +          '<jbr:Report_Parameters>'                                 
 +             '<!--Optional:-->'                                     
 +             '<jbr:Start_Date>2011-01-01</jbr:Start_Date>'          
 +             '<!--Optional:-->'                                     
 +             '<jbr:End_Date>2011-12-31</jbr:End_Date>'              
 +          '</jbr:Report_Parameters>'                                
 +          '<!--Optional:-->'                                        
 +       '</jbr:Execute_Report>'                                      
 +    '</soapenv:Body>'                                               
 + '</soapenv:Envelope>';                                              
This is the FTPAPI mailing list.  To unsubscribe, please go to: