Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.ServiceBinding


   }

   public static ServiceBinding getServiceBinding(BindingTemplate bs, LifeCycleManager lcm)
           throws JAXRException
   {
      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));
    
      //Access URI
      AccessPoint access = bs.getAccessPoint();
      if (access != null) serviceBinding.setAccessURI(access.getStringValue());

      //Description
      Description[] da = bs.getDescriptionArray();
      if (da != null && da.length > 0)
      {
         Description des = da[0];
         serviceBinding.setDescription(new InternationalStringImpl(des.getStringValue()));
      }
      /**Section D.10 of JAXR 1.0 Specification */
     
      TModelInstanceDetails details = bs.getTModelInstanceDetails();
      TModelInstanceInfo[] tmodelInstanceInfoArray = details.getTModelInstanceInfoArray();
      for (int i = 0; tmodelInstanceInfoArray != null && i < tmodelInstanceInfoArray.length; i++)
      {
         TModelInstanceInfo info = (TModelInstanceInfo)tmodelInstanceInfoArray[i];
         if (info!=null && info.getInstanceDetails()!=null) {
           InstanceDetails idetails = info.getInstanceDetails();
           Collection<ExternalLink> elinks = getExternalLinks(idetails.getOverviewDoc(),lcm);
           SpecificationLink slink = new SpecificationLinkImpl(lcm);
           slink.addExternalLinks(elinks);
           serviceBinding.addSpecificationLink(slink);
          
           ConceptImpl c = new ConceptImpl(lcm);
           c.setExternalLinks(elinks);
           c.setKey(lcm.createKey(info.getTModelKey()));
           c.setName(lcm.createInternationalString(idetails.getInstanceParms()));
           c.setValue(idetails.getInstanceParms());
          
           slink.setSpecificationObject(c);
         }
      }
     
      HostingRedirector hr = bs.getHostingRedirector();
      if(hr != null)
      {
         ServiceBinding sb = lcm.createServiceBinding();
         sb.setKey(new KeyImpl(hr.getBindingKey()));
         serviceBinding.setTargetBinding(sb);
      }

      return serviceBinding;
   }
View Full Code Here


                BindingTemplate[] bindarr= l.getBindingTemplateArray();
                LinkedHashSet<ServiceBinding> col = new LinkedHashSet<ServiceBinding>();

                for (int i=0; bindarr != null && i < bindarr.length; i++) {
                    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);
View Full Code Here

                Vector bindvect= l.getBindingTemplateVector();
                Collection col = new ArrayList();

                for (int i=0; bindvect != null && i < bindvect.size(); i++) {
                    BindingTemplate si = (BindingTemplate) bindvect.elementAt(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);
View Full Code Here

         assertEquals("Services of XML Registry", getDescription(svc));

         Collection serviceBindings = svc.getServiceBindings();
         for (Iterator sbIter = serviceBindings.iterator(); sbIter.hasNext();)
         {
            ServiceBinding sb = (ServiceBinding)sbIter.next();
            log.debug("  Binding Description: " + getDescription(sb));
            log.debug("  Access URI: " + sb.getAccessURI());
            assertEquals("http://testjboss.org", sb.getAccessURI());
            assertEquals("Service Binding", getDescription(sb));
         }
      }
   }
View Full Code Here

      Organization org = blm.createOrganization(getIString(orgname));
      org.setDescription(getIString("JBoss Inc"));
      Service service = blm.createService(getIString("JBOSS JAXR Service"));
      service.setDescription(getIString("Services of XML Registry"));
      //Create serviceBinding
      ServiceBinding serviceBinding = blm.createServiceBinding();
      serviceBinding.setDescription(blm.createInternationalString("Service Binding"));

      //Turn validation of URI off
      serviceBinding.setValidateURI(false);
      serviceBinding.setAccessURI("http://testjboss.org");

      // Add the serviceBinding to the service
      service.addServiceBinding(serviceBinding);

      User user = blm.createUser();
View Full Code Here

        assertEquals(ServiceImpl.class, service.getClass());
        assertSame(manager, service.getLifeCycleManager());
    }

    public void testCreateObjectServiceBinding() throws JAXRException {
        ServiceBinding service = (ServiceBinding) manager.createObject(LifeCycleManager.SERVICE_BINDING);
        assertEquals(ServiceBindingImpl.class, service.getClass());
        assertSame(manager, service.getLifeCycleManager());
    }
View Full Code Here

            System.out.println(" Service name: " + getName(svc));
            System.out.println(" Service description: " + getDescription(svc));
            Collection serviceBindings = svc.getServiceBindings();
            for (Iterator sbIter = serviceBindings.iterator(); sbIter.hasNext();)
            {
                ServiceBinding sb = (ServiceBinding) sbIter.next();
                System.out.println("  Binding Description: " + getDescription(sb));
                System.out.println("  Access URI: " + sb.getAccessURI());
            }
        }
    }
View Full Code Here

            System.out.println(" Service name: " + getName(svc));
            System.out.println(" Service description: " + getDescription(svc));
            Collection serviceBindings = svc.getServiceBindings();
            for (Iterator sbIter = serviceBindings.iterator(); sbIter.hasNext();)
            {
                ServiceBinding sb = (ServiceBinding) sbIter.next();
                System.out.println("  Binding Description: " + getDescription(sb));
                System.out.println("  Access URI: " + sb.getAccessURI());
            }
        }
    }
View Full Code Here

         assertEquals("Services of XML Registry", getDescription(svc));

         Collection serviceBindings = svc.getServiceBindings();
         for (Iterator sbIter = serviceBindings.iterator(); sbIter.hasNext();)
         {
            ServiceBinding sb = (ServiceBinding)sbIter.next();
            log.debug("  Binding Description: " + getDescription(sb));
            log.debug("  Access URI: " + sb.getAccessURI());
            assertEquals("http://testjboss.org", sb.getAccessURI());
            assertEquals("Test Service Binding", getDescription(sb));
         }
      }
   }
View Full Code Here

      Organization org = blm.createOrganization(getIString(orgname));
      org.setDescription(getIString("JBoss Inc"));
      Service service = blm.createService(getIString("JBOSS JAXR Service"));
      service.setDescription(getIString("Services of XML Registry"));
      //Create serviceBinding
      ServiceBinding serviceBinding = blm.createServiceBinding();
      serviceBinding.setDescription(blm.createInternationalString("Test Service Binding"));

      //Turn validation of URI off
      serviceBinding.setValidateURI(false);
      serviceBinding.setAccessURI("http://testjboss.org");

      // Add the serviceBinding to the service
      service.addServiceBinding(serviceBinding);

      User user = blm.createUser();
View Full Code Here

TOP

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

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.