Examples of Service


Examples of javax.wsdl.Service

        exporter.handleRequest(request, response);
        InputSource source = new InputSource(new ByteArrayInputStream(response.getContentAsByteArray()));
        WSDLFactory factory = WSDLFactory.newInstance();
        WSDLReader reader = factory.newWSDLReader();
        Definition definition = reader.readWSDL("", source);
        Service service = definition.getService(new QName(namespace, name));
        assertNotNull(service);
        assertEquals(namespace, service.getQName().getNamespaceURI());
        // The service name should be equal to th
        assertEquals(name, service.getQName().getLocalPart());
        Binding binding = definition.getBinding(new QName(namespace, "EchoServiceHttpBinding"));
        assertNotNull(binding);
        SOAPBinding soapBinding = (SOAPBinding) binding.getExtensibilityElements().get(0);
        assertNotNull(soapBinding);
        assertEquals(SoapConstants.STYLE_DOCUMENT, soapBinding.getStyle());
View Full Code Here

Examples of javax.xml.registry.infomodel.Service

            }


            org = (Organization) bqm.getRegistryObject(orgKey.getId(), LifeCycleManager.ORGANIZATION);

            Service service = blm.createService(serviceName);
            org.addService(service);
            Collection services = new ArrayList();
            services.add(service);
            br = blm.saveServices(services);
            if (br.getExceptions() != null)
            {
                fail("Save Services failed ");
            }
            serviceKeys = br.getCollection();
            iter = serviceKeys.iterator();
            while (iter.hasNext())
            {
                serviceKey = (Key) iter.next();
            }

            service = (Service) bqm.getRegistryObject(serviceKey.getId(), LifeCycleManager.SERVICE);

            //Save some concepts
            Concept testConcept = (Concept) blm.createObject(LifeCycleManager.CONCEPT);
            testConcept.setName(blm.createInternationalString(conceptName));
            Collection concepts = new ArrayList();
            concepts.add(testConcept);
            br = blm.saveConcepts(concepts);
            if (br.getExceptions() != null)
            {
                fail("Save Concepts failed ");
            }
            conceptKeys = br.getCollection();
            iter = conceptKeys.iterator();
            while (iter.hasNext())
            {
                conceptKey = (Key) iter.next();
            }

            testConcept = (Concept) bqm.getRegistryObject(conceptKey.getId(), LifeCycleManager.CONCEPT);
            SpecificationLink sl = blm.createSpecificationLink();
            sl.setSpecificationObject(testConcept);
            ServiceBinding sb = blm.createServiceBinding();
            sb.setDescription(blm.createInternationalString(sbDescription));
            sb.setAccessURI(accessURI);
            sb.addSpecificationLink(sl);
            service.addServiceBinding(sb);
            Collection sbs = new ArrayList();
            sbs.add(sb);
            br = blm.saveServiceBindings(sbs);
            if (br.getExceptions() != null)
            {
                fail("Save ServiceBindings failed ");
            }


            Collection specifications = new ArrayList();
            specifications.add(testConcept);

            br = bqm.findServiceBindings(serviceKey, null, null, specifications);
            sbs = br.getCollection();
            iter = sbs.iterator();
            while (iter.hasNext())
            {
                sb = (ServiceBinding) iter.next();
                Service storedService = sb.getService();
                if (!(storedService.getName().getValue().equals(serviceName)))
                {
                    fail("Error: service name");
                }
                Organization storedOrg = storedService.getProvidingOrganization();
                if (!(storedOrg.getName().getValue().equals(orgname)))
                {
                    fail("Error: unexpected organization name \n");
                }
                if (!(sb.getDescription().getValue().equals(sbDescription)))
                {
                    fail("Error: servicebinding description");
                }
                if (!(sb.getAccessURI().equals(accessURI)))
                {
                    fail("Error: unexpected accessURI name");
                }
            }

            //Lets update the ServiceBinding
            sbs = new ArrayList();
            sb.setAccessURI("http://newURI");
            sbs.add(sb);
            br = blm.saveServiceBindings(sbs);
            br = bqm.findServiceBindings(serviceKey, null, null, specifications);
            sbs = br.getCollection();
            iter = sbs.iterator();
            while (iter.hasNext())
            {
                sb = (ServiceBinding) iter.next();
                Service storedService = sb.getService();
                if (!(storedService.getName().getValue().equals(serviceName)))
                {
                    fail("Error: service name");
                }
                Organization storedOrg = storedService.getProvidingOrganization();
                if (!(storedOrg.getName().getValue().equals(orgname)))
                {
                    fail("Error: unexpected organization name \n");
                }
                if (!(sb.getDescription().getValue().equals(sbDescription)))
View Full Code Here

Examples of javax.xml.rpc.Service

   }

   public void testBasicSecuredServiceAccess() throws Exception
   {
      InitialContext iniCtx = getClientContext();
      Service service = (Service)iniCtx.lookup("java:comp/env/service/BasicSecured");
      Organization endpoint = (Organization)service.getPort(new QName(nsURI, "BasicSecuredPort"), Organization.class);

      try
      {
         endpoint.getContactInfo("mafia");
         fail("Security exception expected");
View Full Code Here

Examples of javax.xml.ws.Service

        QName portName=new QName("http://www.jboss.org/bpel/examples/wsdl", "SecureHelloPort");
       
        URL wsdlURL = new URL("http://127.0.0.1:8080/Quickstart_bpel_secure_serviceWS?wsdl");
       
        Service service = Service.create(wsdlURL, SERVICE_NAME);
        Dispatch<SOAPMessage> dispatcher = service.createDispatch(
            portName, SOAPMessage.class, Service.Mode.MESSAGE);
      
        MessageFactory factory = MessageFactory.newInstance();
       
        String str="<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:wsdl=\"http://www.jboss.org/bpel/examples/wsdl\">"+
View Full Code Here

Examples of jeeves.interfaces.Service

            name = pack + name;
        }

        //--- create instance

        Service service = (Service) Class.forName(name).newInstance();

        service.init(appPath, new ServiceConfig(clas.getChildren(ConfigFile.Class.Child.PARAM)));

        return service;
    }
View Full Code Here

Examples of jnr.netdb.Service

            DatagramPacket sendDP = null;

            int port;
            if (_port instanceof RubyString) {

                Service service = Service.getServiceByName(_port.asJavaString(), "udp");

                if (service != null) {
                    port = service.getPort();
                } else {
                    port = (int)_port.convertToInteger("to_i").getLongValue();
                }

            } else {
View Full Code Here

Examples of jsprit.core.problem.job.Service

    assertEquals(s2,vrp.getJobs().get("s2"));
  }
 
  @Test
  public void whenServicesAreAdded_vrpShouldContainThem(){
    Service s1 = mock(Service.class);
    when(s1.getId()).thenReturn("s1");
    Service s2 = mock(Service.class);
    when(s2.getId()).thenReturn("s2");
   
    VehicleRoutingProblem.Builder vrpBuilder = VehicleRoutingProblem.Builder.newInstance();
    vrpBuilder.addJob(s1).addJob(s2);
   
    VehicleRoutingProblem vrp = vrpBuilder.build();
View Full Code Here

Examples of lcmc.crm.domain.Service

    }


    public void removeFromServiceInfoHash(final ServiceInfo serviceInfo) {
        // TODO: it comes here twice sometimes
        final Service service = serviceInfo.getService();
        lockNameToServiceInfo();
        final Map<String, ServiceInfo> idToInfoHash = nameToServiceInfoHash.get(service.getName());
        if (idToInfoHash != null) {
            idToInfoHash.remove(service.getId());
            if (idToInfoHash.isEmpty()) {
                nameToServiceInfoHash.remove(service.getName());
            }
        }
        unlockNameToServiceInfo();
    }
View Full Code Here

Examples of net.caece.pri.hibernate.Service

        sess = null;

        // show the service
        Combobox serviceCB = (Combobox) getFellow("service");
        for (int index = 0; index < ServiceList.size(); index++) {
            Service service = (Service) ServiceList.get(index);
            Comboitem item = new Comboitem();
            item.setLabel(service.getServiceName());
            item.setValue(service);
            item.setParent(serviceCB);
        }
    }
View Full Code Here

Examples of net.csdn.annotation.Service

                        bind(clzz).in(Scopes.SINGLETON);
                    }
                });
                continue;
            }
            final Service service = (Service) clzz.getAnnotation(Service.class);

            if (service == null) continue;
            if (clzz.isInterface() && service.implementedBy() == null)
                throw new AnnotationException(format("{} no implemented class configured", clzz.getName()));

            moduleList.add(new AbstractModule() {
                @Override
                protected void configure() {
                    if (clzz.isInterface()) {
                        logger.info("load  service with @Service => " + clzz.getName() + " to " + service.implementedBy().getName() + " in " + service.value().getName());
                        bind(clzz).to(service.implementedBy()).in(service.value());
                    } else {
                        logger.info("load  service with @Service => " + clzz.getName() + " in " + service.value().getName());
                        bind(clzz).in(service.value());
                    }

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