Package javax.xml.rpc

Examples of javax.xml.rpc.ServiceFactory.createService()


   {
      URL url = new URL("http://localhost:8080/jboss-ejb3-tutorial-webservice/CalculatorBean?wsdl");
      QName qname = new QName("http://bean.webservice.tutorial.jboss.org/", "CalculatorBeanService");

      ServiceFactory factory = ServiceFactory.newInstance();
      Service service = factory.createService(url, qname);

      Calculator calculator = (Calculator) service.getPort(Calculator.class);

      System.out.println("1 + 1 = " + calculator.add(1, 1));
      System.out.println("1 - 1 = " + calculator.subtract(1, 1));
View Full Code Here


                    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 (Throwable t) {
View Full Code Here

                }
                try {
                    if (wsdlRefAddr == null) {
                        service = factory.createService( serviceQname );
                    } else {
                        service = factory.createService( new URL(wsdlRefAddr),
                                serviceQname );
                    }
                } catch (Throwable t) {
                    NamingException ex = new NamingException
                    ("Could not create service");
View Full Code Here

            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

        String wsdlLocation = "http://" + thisHost + ":" + thisPort + "/axis/services/AddressBookNoImplSEI?WSDL";
        URL orgWsdlUrl = new URL(wsdlLocation);

        ServiceFactory serviceFactory = ServiceFactory.newInstance();
        Service addressBookService =
                serviceFactory.createService(orgWsdlUrl,
                        new QName(nameSpaceUri, serviceName));

        // Add the typemapping entries
        TypeMappingRegistry registry = addressBookService.getTypeMappingRegistry();
        TypeMapping map = registry.getDefaultTypeMapping();
View Full Code Here

    public void test1() throws Exception {
        try {
            String wsdlLocation = "http://www.xmethods.net/sd/2001/TemperatureService.wsdl";
            String wsdlNsp = "http://www.xmethods.net/sd/TemperatureService.wsdl";
            ServiceFactory factory = ServiceFactory.newInstance();
            Service service = factory.createService(new URL(wsdlLocation),
                                  new QName(wsdlNsp, "TemperatureService"));
            Call[] calls = service.getCalls(new QName(wsdlNsp,"TemperaturePort"));
            assertTrue(calls != null);
            assertEquals(calls[0].getOperationName().getLocalPart(),"getTemp");
            ((org.apache.axis.client.Call)calls[0]).setTimeout(new Integer(15*1000));
 
View Full Code Here

                    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) {
View Full Code Here

                }
                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");
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.