Package javax.xml.rpc

Examples of javax.xml.rpc.Stub


      catch (RemoteException ignore)
      {
         // ignore expected exception
      }

      Stub stub = (Stub)endpoint;
      stub._setProperty(Stub.USERNAME_PROPERTY, USERNAME);
      stub._setProperty(Stub.PASSWORD_PROPERTY, PASSWORD);

      String info = endpoint.getContactInfo("mafia");
      assertEquals("The 'mafia' boss is currently out of office, please call again.", info);
   }
View Full Code Here


          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

        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

          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

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

    assertTrue(factory.getPortStub() instanceof Stub);
    Stub stub = (Stub) factory.getPortStub();
    assertEquals("user", stub._getProperty(Stub.USERNAME_PROPERTY));
    assertEquals("pw", stub._getProperty(Stub.PASSWORD_PROPERTY));
    assertEquals("ea", stub._getProperty(Stub.ENDPOINT_ADDRESS_PROPERTY));
    assertTrue(((Boolean) stub._getProperty(Stub.SESSION_MAINTAIN_PROPERTY)).booleanValue());

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

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

    assertTrue(factory.getPortStub() instanceof Stub);
    Stub stub = (Stub) factory.getPortStub();
    assertEquals("user", stub._getProperty(Stub.USERNAME_PROPERTY));
    assertEquals("pw", stub._getProperty(Stub.PASSWORD_PROPERTY));
    assertEquals("myValue", stub._getProperty("myProp"));

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

    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

          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

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

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

TOP

Related Classes of javax.xml.rpc.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.