Package javax.xml.rpc

Examples of javax.xml.rpc.ServiceFactory$PropertyAccessAction


                "http://localhost:8080/axis/services/EchoService2";
        String qnameService = "EchoService2";
        String qnamePort = "EchoServicePort";
        Call call;
        String echoString = "my echo string";
        ServiceFactory serviceFactory = ServiceFactory.newInstance();
        Service service = serviceFactory.createService(new QName(qnameService));
        call = service.createCall(new QName(qnamePort));
        call.setTargetEndpointAddress(serviceEndpointUrl);
        call.setOperationName(new QName("http://soapinterop.org/", "echo"));
        String returnString = null;
        try {
View Full Code Here


                "http://localhost:8080/axis/services/EchoService3";
        String qnameService = "EchoService3";
        String qnamePort = "EchoServicePort";
        Call call;
        String echoString = "Joe";
        ServiceFactory serviceFactory = ServiceFactory.newInstance();
        Service service = serviceFactory.createService(new QName(qnameService));
        call = service.createCall(new QName(qnamePort));
        call.setTargetEndpointAddress(serviceEndpointUrl);
        call.setOperationName(new QName("http://soapinterop.org/", "echo"));
        String returnString = null;
        try {
View Full Code Here

            // ClassLoader
            ClassLoader tcl =
                Thread.currentThread().getContextClassLoader();
            if (tcl == null)
                tcl = this.getClass().getClassLoader();
            ServiceFactory factory = ServiceFactory.newInstance();
            javax.xml.rpc.Service service = null;

            // Service Interface
            RefAddr tmp = ref.get(ServiceRef.SERVICE_INTERFACE);
            String serviceInterface = null;
            if (tmp != null)
                serviceInterface = (String) tmp.getContent();

            // WSDL
            tmp = ref.get(ServiceRef.WSDL);
            String wsdlRefAddr = null;
            if (tmp != null)
                wsdlRefAddr = (String) tmp.getContent();

            // PortComponent
            Hashtable<String,QName> portComponentRef = new Hashtable<>();

            // Create QName object
            QName serviceQname = null;
            tmp = ref.get(ServiceRef.SERVICE_LOCAL_PART);
            if (tmp != null) {
                String serviceLocalPart = (String) tmp.getContent();
                tmp = ref.get(ServiceRef.SERVICE_NAMESPACE);
                if (tmp == null) {
                    serviceQname = new QName(serviceLocalPart);
                } else {
                    String serviceNamespace = (String) tmp.getContent();
                    serviceQname = new QName(serviceNamespace,
                            serviceLocalPart);
                }
            }
            Class<?> serviceInterfaceClass = null;

            // Create service object
            if (serviceInterface == null) {
                if (serviceQname == null) {
                    throw new NamingException
                    ("Could not create service-ref instance");
                }
                try {
                    if (wsdlRefAddr == null) {
                        service = factory.createService( serviceQname );
                    } else {
                        service = factory.createService( new URL(wsdlRefAddr),
                                serviceQname );
                    }
                } catch (Exception e) {
                    NamingException ex = new NamingException
                    ("Could not create service");
                    ex.initCause(e);
                    throw ex;
                }
            } else {
                // Loading service Interface
                try {
                    serviceInterfaceClass = tcl.loadClass(serviceInterface);
                } catch(ClassNotFoundException e) {
                    NamingException ex = new NamingException
                    ("Could not load service Interface");
                    ex.initCause(e);
                    throw ex;
                }
                if (serviceInterfaceClass == null) {
                    throw new NamingException
                    ("Could not load service Interface");
                }
                try {
                    if (wsdlRefAddr == null) {
                        if (!Service.class.isAssignableFrom(serviceInterfaceClass)) {
                            throw new NamingException
                            ("service Interface should extend javax.xml.rpc.Service");
                        }
                        service = factory.loadService( serviceInterfaceClass );
                    } else {
                        service = factory.loadService( new URL(wsdlRefAddr),
                                serviceInterfaceClass,
                                new Properties() );
                    }
                } catch (Exception e) {
                    NamingException ex = new NamingException
View Full Code Here

        String nameSpaceUri = "http://hello.jaxrpc.samples/";
        String serviceName = "HelloWorld";
        String portName = "HelloPort";

        URL helloWsdlUrl = new URL(UrlString);
        ServiceFactory serviceFactory = ServiceFactory.newInstance();
        Service helloService = serviceFactory.createService(helloWsdlUrl,
                new QName(nameSpaceUri, serviceName));

        java.util.List list = helloService.getHandlerRegistry().getHandlerChain(new QName(nameSpaceUri, portName));
        list.add(new javax.xml.rpc.handler.HandlerInfo(ClientHandler.class,null,null));
View Full Code Here

        URL urlWsdl = new URL("http://localhost:8080/axis/services/Address?wsdl");
        String nameSpaceUri = "http://address.jaxrpc.samples";
        String serviceName = "AddressServiceService";
        String portName = "Address";

        ServiceFactory serviceFactory = ServiceFactory.newInstance();
        Service service = serviceFactory.createService(urlWsdl, new
                QName(nameSpaceUri, serviceName));
        AddressService myProxy = (AddressService) service.getPort(new
                QName(nameSpaceUri, portName), AddressService.class);
        AddressBean addressBean = new AddressBean();
        addressBean.setStreet("55, rue des Lilas");
View Full Code Here

   * @see #setServiceName
   * @see #setWsdlDocumentUrl
   * @see #postProcessJaxRpcService
   */
  public Service createJaxRpcService() throws ServiceException {
    ServiceFactory serviceFactory = getServiceFactory();
    if (serviceFactory == null) {
      serviceFactory = createServiceFactory();
    }

    // Create service based on this factory's settings.
View Full Code Here

            // do operation in a doPrivivileged block.  JAXRPC RI should
            // probably have the doPrivileged as well.

            final URL wsdlFileURL = privilegedGetServiceRefWsdl(serviceRef);
            final QName serviceName = serviceRef.getServiceName();
            final ServiceFactory serviceFactory = ServiceFactory.newInstance();

            service = (javax.xml.rpc.Service)
                java.security.AccessController.doPrivileged
                (new java.security.PrivilegedExceptionAction() {
                        public java.lang.Object run() throws Exception {
                            return serviceFactory.createService
                                (wsdlFileURL, serviceName);
                        }
                    });

        } catch(PrivilegedActionException pae) {
View Full Code Here

            // do operation in a doPrivivileged block.  JAXRPC RI should
            // probably have the doPrivileged as well.

            final URL wsdlFileURL = privilegedGetServiceRefWsdl(serviceRef);
            final QName serviceName = serviceRef.getServiceName();
            final ServiceFactory serviceFactory = ServiceFactory.newInstance();

            service = (javax.xml.rpc.Service)
                java.security.AccessController.doPrivileged
                (new java.security.PrivilegedExceptionAction() {
                        public java.lang.Object run() throws Exception {
                            return serviceFactory.createService
                                (wsdlFileURL, serviceName);
                        }
                    });

        } catch(PrivilegedActionException pae) {
View Full Code Here

            // do operation in a doPrivivileged block.  JAXRPC RI should
            // probably have the doPrivileged as well.

            final URL wsdlFileURL = privilegedGetServiceRefWsdl(serviceRef);
            final QName serviceName = serviceRef.getServiceName();
            final ServiceFactory serviceFactory = ServiceFactory.newInstance();

            service = (javax.xml.rpc.Service)
                java.security.AccessController.doPrivileged
                (new java.security.PrivilegedExceptionAction() {
                        public java.lang.Object run() throws Exception {
                            return serviceFactory.createService
                                (wsdlFileURL, serviceName);
                        }
                    });

        } catch(PrivilegedActionException pae) {
View Full Code Here

            // do operation in a doPrivivileged block.  JAXRPC RI should
            // probably have the doPrivileged as well.

            final URL wsdlFileURL = privilegedGetServiceRefWsdl(serviceRef);
            final QName serviceName = serviceRef.getServiceName();
            final ServiceFactory serviceFactory = ServiceFactory.newInstance();

            service = (javax.xml.rpc.Service)
                java.security.AccessController.doPrivileged
                (new java.security.PrivilegedExceptionAction() {
                        public java.lang.Object run() throws Exception {
                            return serviceFactory.createService
                                (wsdlFileURL, serviceName);
                        }
                    });

        } catch(PrivilegedActionException pae) {
View Full Code Here

TOP

Related Classes of javax.xml.rpc.ServiceFactory$PropertyAccessAction

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.