Search in sources :

Example 1 with SoapCall

use of com.google.api.ads.common.lib.soap.SoapCall in project googleads-java-lib by googleads.

the class JaxWsHandlerTest method testInvokeSoapCall.

@Test
public void testInvokeSoapCall() throws SecurityException, NoSuchMethodException {
    CampaignServiceInterface soapClient = new CampaignServiceInterfaceImpl();
    Method soapCallMethod = CampaignServiceInterface.class.getMethod("getTestMessage", new Class<?>[0]);
    SoapCall<BindingProvider> soapCall = new SoapCall<BindingProvider>(soapCallMethod, soapClient, new Object[0]);
    RemoteCallReturn returnedValue = jaxWsHandler.invokeSoapCall(soapCall);
    assertEquals("Here!", returnedValue.getReturnValue());
    assertEquals(null, returnedValue.getException());
    assertEquals(CampaignServiceInterfaceImpl.endpointAddress, returnedValue.getRequestInfo().getUrl());
}
Also used : CampaignServiceInterface(com.google.api.ads.common.lib.soap.jaxws.testing.mocks.CampaignServiceInterface) Method(java.lang.reflect.Method) BindingProvider(javax.xml.ws.BindingProvider) SoapCall(com.google.api.ads.common.lib.soap.SoapCall) CampaignServiceInterfaceImpl(com.google.api.ads.common.lib.soap.jaxws.testing.mocks.CampaignServiceInterfaceImpl) RemoteCallReturn(com.google.api.ads.common.lib.client.RemoteCallReturn) Test(org.junit.Test)

Aggregations

RemoteCallReturn (com.google.api.ads.common.lib.client.RemoteCallReturn)1 SoapCall (com.google.api.ads.common.lib.soap.SoapCall)1 CampaignServiceInterface (com.google.api.ads.common.lib.soap.jaxws.testing.mocks.CampaignServiceInterface)1 CampaignServiceInterfaceImpl (com.google.api.ads.common.lib.soap.jaxws.testing.mocks.CampaignServiceInterfaceImpl)1 Method (java.lang.reflect.Method)1 BindingProvider (javax.xml.ws.BindingProvider)1 Test (org.junit.Test)1