Go Back   SmartClient Forums > Technical Q&A
Wiki Register Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 5th Aug 2008, 11:27
gurugubelli gurugubelli is offline
Registered Developer
 
Join Date: May 2008
Posts: 43
Default Webservice Http Security

How to implement Basic Http Security(Pass Scurity headers) in smartclient (Webservice Data Source)?

For example i can use following in my java class
Code:
//Create SOAP Message
SOAPMessage soap;
//Add Basic Http Authentication
MimeHeaders headers=soap.getMimeHeaders();
//Encode it authorization header to 64 Bit
headers.addHeader("Authorization", authorization);
Reply With Quote
  #2  
Old 5th Aug 2008, 12:44
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,613
Default

See rpcRequest.httpHeaders
Reply With Quote
  #3  
Old 5th Aug 2008, 13:03
gurugubelli gurugubelli is offline
Registered Developer
 
Join Date: May 2008
Posts: 43
Default

I have given like following
Code:
isc.WebService.create({
..............................Code...................
getHeaderData : function (dsRequest) {		
        var headerData = {};
        headerData.Authorization = {   Authorization:'cGh1YnVpOlIzcEFuVzVwQHNzIQ==' };		
        return headerData;
    }
}
but not authorizing ....... I have username and password and i am Encoding using 64Bit.....
Reply With Quote
  #4  
Old 5th Aug 2008, 13:07
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,613
Default

Are you trying to set SOAP headers or HTTP headers? getHeaderData() is for SOAP headers.

If you're trying to set SOAP headers, getHeaderData() is the right override point, but your data may not be correct. If so, there are messages in the Developer Console that will tell you what's going wrong.
Reply With Quote
  #5  
Old 5th Aug 2008, 13:10
gurugubelli gurugubelli is offline
Registered Developer
 
Join Date: May 2008
Posts: 43
Default

Infact i have to http headers only ...... How do we set httpHeaders in DataSource fetch operation .......
Reply With Quote
  #6  
Old 5th Aug 2008, 13:14
Isomorphic Isomorphic is offline
Administrator
 
Join Date: May 2006
Posts: 30,613
Default

Via rpcRequest.httpHeaders as previously indicated. Have you looked it up? a WSRequest and DSRequest extend rpcRequest, so the property is valid on those objects as well.
Reply With Quote
  #7  
Old 6th Aug 2008, 09:33
gurugubelli gurugubelli is offline
Registered Developer
 
Join Date: May 2008
Posts: 43
Default

Its working fine
dsRequest.httpHeaders={Authorization:'Basic 64BitEncodedString'}; in transformRequest.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search


© 2010,2011 Isomorphic Software. All Rights Reserved