Examples of Stub


Examples of javax.xml.rpc.Stub

    factory.setPortInterface(IRemoteBean.class);
    factory.afterPropertiesSet();
    assertTrue("Correct singleton value", factory.isSingleton());

    assertTrue(factory.getPortStub() instanceof Stub);
    Stub stub = (Stub) factory.getPortStub();
    assertEquals("ea", stub._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY));
    assertTrue(((Boolean) stub._getProperty(Stub.SESSION_MAINTAIN_PROPERTY)).booleanValue());
    assertEquals(new Integer(1), stub._getProperty("myProp"));
    assertEquals("myOtherValue", stub._getProperty("myOtherProp"));

    assertTrue(factory.getObject() instanceof IRemoteBean);
    IRemoteBean proxy = (IRemoteBean) factory.getObject();
    proxy.setName("myName");
    assertEquals("myName", RemoteBean.name);
View Full Code Here

Examples of javax.xml.rpc.Stub

          if (!(remoteObj instanceof Stub)) {
            throw new RemoteLookupFailureException("Port stub of class [" + remoteObj.getClass().getName() +
                "] is not a valid JAX-RPC stub: it does not implement interface [javax.xml.rpc.Stub]");
          }
          Stub stub = (Stub) remoteObj;

          // Apply properties to JAX-RPC stub.
          preparePortStub(stub);

          // Allow for custom post-processing in subclasses.
View Full Code Here

Examples of javax.xml.rpc.Stub

    } // getProxyWithWSDL

    private TypeTest getProxy() {
        try {
            Service service = ServiceFactory.newInstance().createService(null);
            Stub binding = (Stub) service.getPort(TypeTest.class);
            binding._setProperty(Call.ENDPOINT_ADDRESS_PROPERTY,
                    "http://localhost:8080/axis/services/TypeTest");
            return (TypeTest) binding;
           
        }
        catch (ServiceException jre) {
View Full Code Here

Examples of javax.xml.rpc.Stub

            } // End switch (methodType)

            returnValue = methodToInvoke.invoke(serviceToInvoke, argsForInvoke);

            if( returnValue instanceof Stub ) {
                Stub stub = (Stub) returnValue;
                setStubProperties(stub, methodTypeToInvoke, methodToInvoke,
                        argsForInvoke);
            } else if( returnValue instanceof Call ) {
                Call[] calls = new Call[1];
                calls[0] = (Call) returnValue;
View Full Code Here

Examples of javax.xml.rpc.Stub

        try {
            //Stub stub=(Stub)(new org.tempuri.IExhibitSrvserviceLocator().getIExhibitSrvPort());
            //org.tempuri.IExhibitSrvbindingStub s=(org.tempuri.IExhibitSrvbindingStub)stub;
           
            Stub stub=(Stub)(new org.tempuri.ILOGIN_SERVserviceLocator().getILOGIN_SERVPort());
            org.tempuri.ILOGIN_SERVbindingStub s=(org.tempuri.ILOGIN_SERVbindingStub)stub;


            /*uExhibitClasses.TExchangeSettings a=s.getExchangeSettings();
            System.out.println(a.getDecimalSeparator());
View Full Code Here

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

Examples of org.apache.axis.client.Stub

  /**
   * 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

Examples of org.apache.axis.client.Stub

    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

Examples of org.apache.axis.client.Stub

   *     {@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

Examples of org.apache.axis.client.Stub

    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
TOP
Copyright © 2018 www.massapi.com. 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.