Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    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);

    #2
    See rpcRequest.httpHeaders

    Comment


      #3
      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.....

      Comment


        #4
        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.

        Comment


          #5
          Infact i have to http headers only ...... How do we set httpHeaders in DataSource fetch operation .......

          Comment


            #6
            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.

            Comment


              #7
              Its working fine
              dsRequest.httpHeaders={Authorization:'Basic 64BitEncodedString'}; in transformRequest.

              Comment

              Working...
              X