Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.Service


        }

    }

    public void testCreateObjectService() throws JAXRException {
        Service service = (Service) manager.createObject(LifeCycleManager.SERVICE);
        assertEquals(ServiceImpl.class, service.getClass());
        assertSame(manager, service.getLifeCycleManager());
    }
View Full Code Here


            System.out.println("\nCreating temporary organization...\n");
            Organization tmpOrg = createTempOrg();
            Key tmpOrgKey = tmpOrg.getKey();
           
            System.out.println("\nCreating service...\n");
            Service tmpSvc = createTempService(tmpOrg);
            Key tmpSvcKey = tmpSvc.getKey();
           
            System.out.println("\nCreating service binding...\n");
            Key sbKey = createServiceBinding(tmpSvc);
                      
           
View Full Code Here

      }
    }

    private Service createTempService(Organization tmpOrg) throws JAXRException {
     
        Service service = blm.createService(getIString(serviceName));
        service.setDescription(getIString("Services in UDDI Registry"));
        service.setProvidingOrganization(tmpOrg);

        ArrayList<Service> services = new ArrayList<Service>();
        services.add(service);

        BulkResponse br = blm.saveServices(services);
        if (br.getStatus() == JAXRResponse.STATUS_SUCCESS)
        {
            System.out.println("Service Saved");
            Key key = (Key) br.getCollection().iterator().next();
            System.out.println("Saved Key=" + key.getId());
            service.setKey(key);
        } else
        {
            System.err.println("JAXRExceptions " +
                    "occurred during save:");
            Collection exceptions = br.getExceptions();
View Full Code Here

            }
      // TODO:Need to look further at the mapping b/w BindingTemplate and
      // Jaxr ServiceBinding

      // Get Service information
           Service svc = serve.getService();
      if (svc != null && svc.getKey() != null && svc.getKey().getId() != null) {
              bt.setServiceKey(svc.getKey().getId());
           }
     
      InternationalString idesc = ((RegistryObject) serve).getDescription();
           
            if (idesc != null) {
View Full Code Here

        post.setType(type);
        return post;
    }

    public Service createService(InternationalString name) throws JAXRException {
        Service ser = (Service) this.createObject(LifeCycleManager.SERVICE);
        ser.setName(name);
        return ser;
    }
View Full Code Here

    public void addServices(Collection collection) throws JAXRException
    {
        // do this by hand to ensure all members are actually instances of Service
        for (Iterator iterator = collection.iterator(); iterator.hasNext();)
        {
            Service service = (Service) iterator.next();

            addService(service);
        }
    }
View Full Code Here

   }

   public static Service getService(BusinessService bs, LifeCycleManager lcm)
           throws JAXRException
   {
      Service serve = new ServiceImpl(lcm);

      String keystr = bs.getServiceKey();

      if (keystr != null)
      {
         serve.setKey(lcm.createKey(keystr));
      }

      Name[] namearr = bs.getNameArray();

      Name n = namearr != null && namearr.length > 0 ? namearr[0] : null;

      if (n != null) {
        String name = n.getStringValue();
        serve.setName(lcm.createInternationalString(getLocale(n.getLang()), name));
      }

      Description[] descarr = bs.getDescriptionArray();
      Description desc = descarr != null && descarr.length > 0 ? descarr[0] : null;
      if (desc != null ) {
          serve.setDescription(lcm.createInternationalString(getLocale(desc.getLang()), desc.getStringValue()));
      }
     
      //Populate the ServiceBindings for this Service
      BindingTemplates bts = bs.getBindingTemplates();
      BindingTemplate[] btarr = bts != null ? bts.getBindingTemplateArray() : null;
      for (int i = 0; btarr != null && i < btarr.length; i++)
      {
        BindingTemplate bindingTemplate = (BindingTemplate)btarr[i];
          serve.addServiceBinding(getServiceBinding(bindingTemplate, lcm));
      }
     
      serve.addClassifications(getClassifications(bs.getCategoryBag(), lcm));
     
      return serve;
   }
View Full Code Here

   }

   public static Service getService(ServiceInfo si, LifeCycleManager lcm)
           throws JAXRException
   {
      Service service = new ServiceImpl(lcm);

      String keystr = si.getServiceKey();

      if (keystr != null)
      {
         service.setKey(lcm.createKey(keystr));
      }

      Name[] namearr = si.getNameArray();
      Name n = namearr != null && namearr.length > 0 ? namearr[0] : null;

      if (n != null) {
        String name = n.getStringValue();
        service.setName(lcm.createInternationalString(getLocale(n.getLang()), name));
      }

      return service;
   }
View Full Code Here

      ServiceBinding serviceBinding = new ServiceBindingImpl(lcm);

      String keystr = bs.getServiceKey();
      if (keystr != null)
      {
         Service svc = new ServiceImpl(lcm);
         svc.setKey(lcm.createKey(keystr));
         ((ServiceBindingImpl)serviceBinding).setService(svc);
      }
      String bindingKey = bs.getBindingKey();
      if(bindingKey != null) serviceBinding.setKey(new KeyImpl(bindingKey));
    
View Full Code Here

                    BindingTemplate si = bindarr[i];
                    ServiceBinding sb =  ScoutUddiJaxrHelper.getServiceBinding(si,
                            registryService.getBusinessLifeCycleManager());
                    col.add(sb);
                   //Fill the Service object by making a call to registry
                   Service s = (Service)getRegistryObject(serviceKey.getId(), LifeCycleManager.SERVICE);
                   ((ServiceBindingImpl)sb).setService(s);
                }

                blkRes.setCollection(col);
            }
View Full Code Here

TOP

Related Classes of javax.xml.registry.infomodel.Service

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.