Package com.google.api.ads.common.lib.soap

Examples of com.google.api.ads.common.lib.soap.SoapCallReturn$Builder


    Method soapCallMethod = CampaignServiceInterface.class.getMethod(
        "getTestMessage", new Class<?>[0]);
    SoapCall<BindingProvider> soapCall = new SoapCall<BindingProvider>(
        soapCallMethod, soapClient, new Object[0]);

    SoapCallReturn returnedValue = jaxWsHandler.invokeSoapCall(soapCall);

    assertEquals("Here!", returnedValue.getReturnValue());
    assertEquals(null, returnedValue.getException());
    assertEquals(CampaignServiceInterfaceImpl.endpointAddress,
        returnedValue.getRequestInfo().getUrl());
  }
View Full Code Here


   * @param soapCall the call to send to the SOAP client
   * @return the return value from the {@code soapCall}
   */
  @Override
  protected synchronized SoapCallReturn callSoapClient(SoapCall<Object> soapCall) {
    SoapCallReturn soapCallReturn = super.callSoapClient(soapCall);
    if (tokenExpirationDetector.isTokenExpiredException(soapCallReturn.getException())) {
      try {
        getAdsSession().setToken(loginTokens.generateToken(
            getAdsServiceDescriptor().getInterfaceClass().getPackage().getName(),
            getAdsSession()));
        setHeaders();
View Full Code Here

            adsServiceDescriptor, soapClientHandler, headerHandler, adsServiceLoggers) {};
  }

  @Test
  public void testLogSoapCall() {
    SoapCallReturn soapCallReturn = Mockito.mock(SoapCallReturn.class);

    adsServiceClient.logSoapCall(soapCallReturn);

    verify(adsServiceLoggers).logRequest(soapCallReturn);
    verify(adsServiceLoggers).logSoapXml(soapCallReturn);
View Full Code Here

  @SuppressWarnings({"unchecked", "rawtypes"}) // Using raw type for mocking.
  @Test
  public void testCallSoapCall_callFailed_tokenExpired() throws Exception {
    Exception apiException = new Exception();
    SoapCallReturn soapCallReturn2 = Mockito.mock(SoapCallReturn.class);

    when(soapClientHandler.invokeSoapCall(soapCall)).thenReturn(soapCallReturn)
        .thenReturn(soapCallReturn2);
    when(soapCallReturn.getException()).thenReturn(apiException);
    when(tokenExpirationDetector.isTokenExpiredException(apiException)).thenReturn(true);
View Full Code Here

TOP

Related Classes of com.google.api.ads.common.lib.soap.SoapCallReturn$Builder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.