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


      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

    } // getProxyWithWSDL

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

                                              Object logClassRef)
                          throws FailTransferException {
       
        String oiEndpointAddress = null;
        try {
            Stub addressStub = createOpenInterfaceAddressProxy();
            addressStub._setProperty(
                javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY,
                openInterfaceHost + WORKSPACE_ADMIN_WEBAPP + '/' + ADDRESS_SERVICE);
            OpenInterfaceAddressIF oiAddress = (OpenInterfaceAddressIF) addressStub;
            oiEndpointAddress = oiAddress.getOpenInterfaceAddress(organizationName);
        } catch(RemoteException e) {
View Full Code Here

     * @param oiEndpointAddress Workspace OpenInterface endpoint address (URL suffix)
     * @param openInterfaceHost Workspace OpenInterface host address (URL)
     * @return OpenInterface remote interface stub
     */
    public static OpenInterfaceIF getOpenInterfaceIF(String oiEndpointAddress, String openInterfaceHost) {
        Stub stub = createOpenInterfaceProxy();

        /*
         * If host string contains one or more slash ('/') character(s), we need to remove
         * everything after and including the slash char. Otherwise OI problems (HTTP error 404)
         * will occur with installations not located in the document root path.
         */

        int hostNameStartIndex = 0;
        String fullAddress;
        if(openInterfaceHost.indexOf("://") != -1) {
            hostNameStartIndex = openInterfaceHost.indexOf("://") + 3; // Skip slash characters in protocol
                                                          // specification

        }
        if(openInterfaceHost.indexOf('/', hostNameStartIndex) != -1) {
            fullAddress = openInterfaceHost.substring(0, openInterfaceHost.indexOf('/', hostNameStartIndex))
                    + oiEndpointAddress;
        } else {
            fullAddress = openInterfaceHost + oiEndpointAddress;
        }
       
        stub._setProperty(javax.xml.rpc.Stub.ENDPOINT_ADDRESS_PROPERTY, fullAddress);
        OpenInterfaceIF oi = (OpenInterfaceIF) stub;
        return oi;
    }
View Full Code Here

        System.out.println("username: " + username);
        System.out.println("password: " + password);
        System.out.println("Endpoint address = " + endpointAddress);

        try {
            Stub stub = createProxy();

            stub._setProperty(javax.xml.rpc.Stub.USERNAME_PROPERTY,
                username);
            stub._setProperty(javax.xml.rpc.Stub.PASSWORD_PROPERTY,
                password);
            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

        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

    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

    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

      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

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.