Package org.apache.axis.client

Examples of org.apache.axis.client.Stub


  /**
   * Tests that the headers are set correctly.
   */
  public void testGenerateServiceStub_v13Headers() throws ServiceException {
    Stub stub = (Stub) testUser.getService(AdWordsService.V13.ACCOUNT_SERVICE);
    for (SOAPHeaderElement soapHeaderElement : stub.getHeaders()) {
      if (soapHeaderElement.getLocalName().equals("email")) {
        assertEquals("email", testUser.getEmail(), soapHeaderElement.getValue());
      } else if (soapHeaderElement.getLocalName().equals("password")) {
        assertEquals("password", testUser.getPassword(), soapHeaderElement.getValue());
      } else if (soapHeaderElement.getLocalName().equals("developerToken")) {
View Full Code Here


  /**
   * Tests that the headers are set correctly.
   */
  public void testGenerateServiceStub_v200909Headers() throws ServiceException {
    testUser.setAuthToken("testAuthToken");
    Stub stub = AdWordsServiceFactory.generateServiceStub(
        AdWordsService.V200909.ADGROUP_AD_SERVICE, testUser);

    for (SOAPHeaderElement soapHeaderElement : stub.getHeaders()) {
      com.google.api.adwords.v200909.cm.SoapHeader header =
          (com.google.api.adwords.v200909.cm.SoapHeader) soapHeaderElement.getObjectValue();

      assertEquals("authToken", "testAuthToken", header.getAuthToken());
      assertEquals("clientEmail", testUser.getClientEmail(), header.getClientEmail());
View Full Code Here

    try {
      Service axisService =
          generateAxisService(service.getLocatorClass(),
              AdWordsUser.getUseClasspathClientConfig());
      setEndpointAddress(axisService, service.getEndpointAddress(endpointServer));
      Stub stub = getConfiguredStub(axisService, service.getInterfaceClass(),
          service.getVersion(), user, validateOnly);
      ServiceAccountantManager.getInstance().putService(stub, user);
      return stub;
    } catch (InstantiationException e) {
      throw new ServiceException("Instace of stub could not be created.", e);
View Full Code Here

   *     {@link AdWordsVersion#setHeaders(Stub, AdWordsUser, boolean)}.
   */
  private static Stub getConfiguredStub(Service axisService,
      Class<? extends Remote> interfaceClass, AdWordsVersion version, AdWordsUser user,
      boolean validateOnly) throws ServiceException {
    Stub stub = (Stub) axisService.getPort(interfaceClass);
    version.setHeaders(stub, user, validateOnly);
    return stub;
  }
View Full Code Here

    try {
      Service axisService =
          generateAxisService(service.getLocatorClass(),
              DfpUser.getUseClasspathClientConfig());
      setEndpointAddress(axisService, service.getEndpointAddress(endpointServer));
      Stub stub = getConfiguredStub(axisService, service.getInterfaceClass(),
          service.getVersion(), user);
      ServiceAccountantManager.getInstance().putService(stub, user);
      return stub;
    } catch (InstantiationException e) {
      throw new ServiceException("Instace of stub could not be created.", e);
View Full Code Here

   *     {@link DfpVersion#setHeaders(Stub, DfpUser)}.
   */
  private static Stub getConfiguredStub(Service axisService,
      Class<? extends Remote> interfaceClass, DfpVersion version, DfpUser user)
      throws ServiceException {
    Stub stub = (Stub) axisService.getPort(interfaceClass);
    version.setHeaders(stub, user);
    return stub;
  }
View Full Code Here

  private void _initDataSourcesSDKServiceProxy() {
    try {
      it.eng.spagobi.sdk.datasources.stub.DataSourcesSDKServiceServiceLocator locator = new it.eng.spagobi.sdk.datasources.stub.DataSourcesSDKServiceServiceLocator();
      Remote remote = locator.getPort(it.eng.spagobi.sdk.datasources.stub.DataSourcesSDKService.class);
      Stub axisPort = (Stub) remote;
      axisPort._setProperty(WSHandlerConstants.USER, cch.getUsername());
      axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, cch);
      dataSourcesSDKService = (it.eng.spagobi.sdk.datasources.stub.DataSourcesSDKService) axisPort;       
      //dataSourcesSDKService = (new DataSourcesSDKServiceServiceLocator()).getDataSourcesSDKService();
      if (dataSourcesSDKService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)dataSourcesSDKService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
View Full Code Here

 
  private void _initTestConnectionServiceProxy() {
    try {
    it.eng.spagobi.sdk.test.stub.TestConnectionServiceServiceLocator locator = new it.eng.spagobi.sdk.test.stub.TestConnectionServiceServiceLocator();
    Remote remote = locator.getPort(it.eng.spagobi.sdk.test.stub.TestConnectionService.class);
        Stub axisPort = (Stub) remote;
        axisPort._setProperty(WSHandlerConstants.USER, cch.getUsername());
        axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, cch);
        testConnectionService = (it.eng.spagobi.sdk.test.stub.TestConnectionService) axisPort;
     
      if (testConnectionService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)testConnectionService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
View Full Code Here

 
  private void _initEnginesServiceProxy() {
      try {
      it.eng.spagobi.sdk.engines.stub.EnginesServiceServiceLocator locator = new it.eng.spagobi.sdk.engines.stub.EnginesServiceServiceLocator();
      Remote remote = locator.getPort(it.eng.spagobi.sdk.engines.stub.EnginesService.class);
          Stub axisPort = (Stub) remote;
          axisPort._setProperty(WSHandlerConstants.USER, cch.getUsername());
          axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, cch);
          enginesService = (it.eng.spagobi.sdk.engines.stub.EnginesService) axisPort;
     
        if (enginesService != null) {
          if (_endpoint != null)
            ((javax.xml.rpc.Stub)enginesService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
View Full Code Here

 
  private void _initDataSetsSDKServiceProxy() {
    try {
    it.eng.spagobi.sdk.datasets.stub.DataSetsSDKServiceServiceLocator locator = new it.eng.spagobi.sdk.datasets.stub.DataSetsSDKServiceServiceLocator();
    Remote remote = locator.getPort(it.eng.spagobi.sdk.datasets.stub.DataSetsSDKService.class);
        Stub axisPort = (Stub) remote;
        axisPort._setProperty(WSHandlerConstants.USER, cch.getUsername());
        axisPort._setProperty(WSHandlerConstants.PW_CALLBACK_REF, cch);
        dataSetsSDKService = (it.eng.spagobi.sdk.datasets.stub.DataSetsSDKService) axisPort;
      if (dataSetsSDKService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)dataSetsSDKService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
View Full Code Here

TOP

Related Classes of org.apache.axis.client.Stub

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.