Search in sources :

Example 1 with AdWordsServiceDescriptor

use of com.google.api.ads.adwords.lib.client.AdWordsServiceDescriptor in project googleads-java-lib by googleads.

the class AdWordsJaxWsHeaderHandlerTest method setUp.

@Before
@SuppressWarnings("unchecked")
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    headerHandler = new AdWordsJaxWsHeaderHandler(soapClientHandler, adWordsApiConfiguration, adsLibConfiguration, authorizationHeaderHandler, userAgentCombiner);
    adWordsSession = new AdWordsSession.Builder().withClientCustomerId(CLIENT_CUSTOMER_ID).withOAuth2Credential(new Credential(BearerToken.authorizationHeaderAccessMethod())).withDeveloperToken(DEVELOPER_TOKEN).withUserAgent(USER_AGENT).build();
    adWordsServiceDescriptor = new AdWordsServiceDescriptor(interfaceClass, VERSION, adWordsApiConfiguration);
}
Also used : Credential(com.google.api.client.auth.oauth2.Credential) AdWordsServiceDescriptor(com.google.api.ads.adwords.lib.client.AdWordsServiceDescriptor) Before(org.junit.Before)

Example 2 with AdWordsServiceDescriptor

use of com.google.api.ads.adwords.lib.client.AdWordsServiceDescriptor in project googleads-java-lib by googleads.

the class AdWordsJaxWsModule method configure.

@Override
public void configure() {
    bind(new TypeLiteral<HeaderHandler<AdWordsSession, AdWordsServiceDescriptor>>() {
    }).to(new TypeLiteral<AdWordsJaxWsHeaderHandler>() {
    });
    install(new JaxWsModule());
    install(new AdWordsModule());
    install(new AdWordsSoapModule());
    configureConfigurations(this.getClass().getResource("conf/props/build.properties"));
}
Also used : TypeLiteral(com.google.inject.TypeLiteral) AdWordsModule(com.google.api.ads.adwords.lib.AdWordsModule) AdWordsSoapModule(com.google.api.ads.adwords.lib.AdWordsSoapModule) AdWordsSession(com.google.api.ads.adwords.lib.client.AdWordsSession) AdWordsServiceDescriptor(com.google.api.ads.adwords.lib.client.AdWordsServiceDescriptor) JaxWsModule(com.google.api.ads.common.lib.soap.jaxws.JaxWsModule)

Example 3 with AdWordsServiceDescriptor

use of com.google.api.ads.adwords.lib.client.AdWordsServiceDescriptor in project googleads-java-lib by googleads.

the class AdWordsAxisModule method configure.

@Override
public void configure() {
    bind(new TypeLiteral<AxisSoapHeaderFactory<AdWordsServiceDescriptor>>() {
    }).to(new TypeLiteral<AdWordsAxisSoapHeaderFactory>() {
    });
    bind(new TypeLiteral<HeaderHandler<AdWordsSession, AdWordsServiceDescriptor>>() {
    }).to(new TypeLiteral<AdWordsAxisHeaderHandler>() {
    });
    install(new AxisModule());
    install(new AdWordsModule());
    install(new AdWordsSoapModule());
    configureConfigurations(this.getClass().getResource("conf/props/build.properties"));
}
Also used : TypeLiteral(com.google.inject.TypeLiteral) AdWordsModule(com.google.api.ads.adwords.lib.AdWordsModule) AdWordsSoapModule(com.google.api.ads.adwords.lib.AdWordsSoapModule) AdWordsSession(com.google.api.ads.adwords.lib.client.AdWordsSession) AdWordsServiceDescriptor(com.google.api.ads.adwords.lib.client.AdWordsServiceDescriptor) AxisModule(com.google.api.ads.common.lib.soap.axis.AxisModule)

Aggregations

AdWordsServiceDescriptor (com.google.api.ads.adwords.lib.client.AdWordsServiceDescriptor)3 AdWordsModule (com.google.api.ads.adwords.lib.AdWordsModule)2 AdWordsSoapModule (com.google.api.ads.adwords.lib.AdWordsSoapModule)2 AdWordsSession (com.google.api.ads.adwords.lib.client.AdWordsSession)2 TypeLiteral (com.google.inject.TypeLiteral)2 AxisModule (com.google.api.ads.common.lib.soap.axis.AxisModule)1 JaxWsModule (com.google.api.ads.common.lib.soap.jaxws.JaxWsModule)1 Credential (com.google.api.client.auth.oauth2.Credential)1 Before (org.junit.Before)1