@SuppressWarnings("unchecked") /* See constructor comments. */
  public void setAuthorization(Object soapClient, AdsSession adsSession)
      throws AuthenticationException {
    final String authorizationHeader =
        authorizationHeaderProvider.getAuthorizationHeader(adsSession,
            soapClientHandler.getEndpointAddress(soapClient));
    soapClientHandler.putAllHttpHeaders(soapClient, new HashMap<String, String>() {
      {
        put("Authorization", authorizationHeader);
      }
    });
  }
@ SuppressWarnings ( "unchecked" ) public void setAuthorization ( Object soapClient , AdsSession adsSession ) throws AuthenticationException { final String authorizationHeader = authorizationHeaderProvider . getAuthorizationHeader ( adsSession , soapClientHandler . getEndpointAddress ( soapClient ) ) ; soapClientHandler . putAllHttpHeaders ( soapClient , new HashMap < String , String > ( ) { { put ( "Authorization" , authorizationHeader ) ; } } ) ; }
Sets the authorization header created from the session on the soap client.

@param soapClient the SOAP client to set the HTTP header on
@param adsSession the session
@throws AuthenticationException if the authorization header could not be
created