Examples of Stub


Examples of javax.xml.rpc.Stub

        System.out.println("trustStore: " + trustStore);
        System.out.println("trustStorePassword: " + trustStorePassword);
        System.out.println("Endpoint address = " + endpointAddress);

        try {
            Stub stub = createProxy();

            System.setProperty("javax.net.ssl.keyStore", keyStore);
            System.setProperty("javax.net.ssl.keyStorePassword", keyStorePassword);
            System.setProperty("javax.net.ssl.trustStore", trustStore);
            System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);

            stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
                endpointAddress);

            HelloIF hello = (HelloIF)stub;
            System.out.println();
            System.out.println(hello.sayHello(" Duke (secure)" ));
View Full Code Here

Examples of javax.xml.rpc.Stub

    public static void main(String[] args) {

        System.out.println("Endpoint address = " + args[0]);
        try {
            Stub stub = createProxy();

            stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
                    args[0]);
            HelloIF hello = (HelloIF) stub;

            System.out.println(hello.sayHello("Duke!"));
        } catch (Exception ex) {
View Full Code Here

Examples of javax.xml.rpc.Stub

    private SupplierIF supplier;

    public OrderCaller(String endpoint) {

        try {
        Stub stub = (Stub)(new Supplier_Impl().getSupplierIFPort());
            //stub = (SupplierIF_Stub)(new Supplier_Impl().getSupplierIFPort());
            stub._setProperty(
                javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
                endpoint);
            supplier = (SupplierIF) stub;
        } catch (Exception ex) {
            ex.printStackTrace();
View Full Code Here

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

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

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

        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

          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

    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

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("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
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.