Package com.sun.xml.registry.uddi.bindings_v2_2

Examples of com.sun.xml.registry.uddi.bindings_v2_2.BindingTemplate


    /**
     * Create an instance of {@link TModelInstanceInfo }
     *
     */
    public TModelInstanceInfo createTModelInstanceInfo() {
        return new TModelInstanceInfo();
    }
View Full Code Here


    /**
     * Create an instance of {@link TModelList }
     *
     */
    public TModelList createTModelList() {
        return new TModelList();
    }
View Full Code Here

    /**
     * Create an instance of {@link ValidateValues }
     *
     */
    public ValidateValues createValidateValues() {
        return new ValidateValues();
    }
View Full Code Here

  /**
   * Copies the TemplateBinding from one UDDI to another UDDI.
   */
  public void xRegisterServiceBinding() {
    try {
      BindingTemplate bindingTemplate = fromClerk.findServiceBinding(entityKey,fromClerk.getUDDINode().getApiNode());
      log.info("xregister binding " + bindingTemplate.getBindingKey()+ " + from "
          + fromClerk.getName() + " to " + toClerk.getName());
      toClerk.register(bindingTemplate,toClerk.getUDDINode().getApiNode());
    } catch (Exception e) {
      log.error("Could not " + toString() + ". " + e.getMessage() + " " + e.getCause(),e);
    }
View Full Code Here

      if (result == null)
        Assert.fail("Null result from find binding operation");
      List<BindingTemplate> btList = result.getBindingTemplate();
      if (btList == null || btList.size() == 0)
        Assert.fail("No result from find binding operation");
      BindingTemplate btOut = btList.get(0);
     
      BindingTemplate btIn = (BindingTemplate)EntityCreator.buildFromDoc(TckBindingTemplate.JOE_BINDING_XML, "org.uddi.api_v3");
     
      assertEquals(btIn.getServiceKey(), btOut.getServiceKey());
      assertEquals(btIn.getBindingKey(), btOut.getBindingKey());
     
      TckValidator.checkDescriptions(btIn.getDescription(), btOut.getDescription());
      TckValidator.checkCategories(btIn.getCategoryBag(), btOut.getCategoryBag());
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail("No exception should be thrown:  " + e.getMessage());
    }
View Full Code Here

    try {
      // First save the entity
      SaveBinding sb = new SaveBinding();
      sb.setAuthInfo(authInfo);
     
      BindingTemplate btIn = (BindingTemplate)EntityCreator.buildFromDoc(bindingXML, "org.uddi.api_v3");
      sb.getBindingTemplate().add(btIn);
      publication.saveBinding(sb);
     
      // Now get the entity and check the values
      GetBindingDetail gb = new GetBindingDetail();
      gb.getBindingKey().add(bindingKey);
      BindingDetail bd = inquiry.getBindingDetail(gb);
      List<BindingTemplate> btOutList = bd.getBindingTemplate();
      BindingTemplate btOut = btOutList.get(0);

      assertEquals(btIn.getServiceKey(), btOut.getServiceKey());
      assertEquals(btIn.getBindingKey(), btOut.getBindingKey());
     
      TckValidator.checkDescriptions(btIn.getDescription(), btOut.getDescription());
      TckValidator.checkCategories(btIn.getCategoryBag(), btOut.getCategoryBag());
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
      Assert.fail("No exception should be thrown: " + e.getMessage());
    }
View Full Code Here

  public void saveNotifierBinding(String authInfo, String bindingXML, String bindingKey) {
    try {
      SaveBinding sb = new SaveBinding();
      sb.setAuthInfo(authInfo);
     
      BindingTemplate btIn = (BindingTemplate)EntityCreator.buildFromDoc(bindingXML, "org.uddi.api_v3");
      sb.getBindingTemplate().add(btIn);
      publication.saveBinding(sb);   
    }
    catch(Exception e) {
      logger.error(e.getMessage(), e);
View Full Code Here

    }
    assertEquals(bts1.getBindingTemplate().size(), bts2.getBindingTemplate().size());
    Iterator<BindingTemplate> bt1Iter  = bts1.getBindingTemplate().iterator();
    Iterator<BindingTemplate> bt2Iter  = bts2.getBindingTemplate().iterator();
    while (bt1Iter.hasNext()) {
      BindingTemplate bt1 = bt1Iter.next();
      BindingTemplate bt2 = bt2Iter.next();
      assertEquals(bt1.getAccessPoint().getValue(),bt2.getAccessPoint().getValue());
      assertEquals(bt1.getAccessPoint().getUseType(),bt2.getAccessPoint().getUseType());
      assertEquals(bt1.getBindingKey(),bt2.getBindingKey());
      checkCategories(bt1.getCategoryBag(), bt2.getCategoryBag());
      checkDescriptions(bt1.getDescription(),bt2.getDescription());
      checkHostingRedirector(bt1.getHostingRedirector(),bt2.getHostingRedirector());
      //the inbound apiBindingTemplate can have a null serviceKey
      if (bt1.getServiceKey()!=null) {
        assertEquals(bt1.getServiceKey(),bt2.getServiceKey());
      }
      checkTModelInstanceDetails(bt1.getTModelInstanceDetails(),bt2.getTModelInstanceDetails());
    }
  }
View Full Code Here

   * Register a service binding.
   *
   */
  public BindingTemplate register(BindingTemplate binding, Node node) {
   
    BindingTemplate bindingTemplate=null;
    log.info("Registering bindingTemplate with key " + binding.getBindingKey());
    try {
      String authToken = getAuthToken(node.getSecurityUrl());
      SaveBinding saveBinding = new SaveBinding();
      saveBinding.setAuthInfo(authToken);
      saveBinding.getBindingTemplate().add(binding);
      BindingDetail bindingDetail = getUDDINode().getTransport().getUDDIPublishService(node.getPublishUrl()).saveBinding(saveBinding);
      bindingTemplate = bindingDetail.getBindingTemplate().get(0);
    } catch (Exception e) {
      log.error("Unable to register template binding " + bindingTemplate.getBindingKey()
          + " ." + e.getMessage(),e);
    } catch (Throwable t) {
      log.error("Unable to register template binding " + bindingTemplate.getBindingKey()
          + " ." + t.getMessage(),t);
    }
    log.info("Registering template binding " + binding.getBindingKey() + " completed.");
    return bindingTemplate;
  }
View Full Code Here

   @Test
     public void testReadingServiceBindingAnnotation() {
       try {
        Class classWithAnnotations = Loader.loadClass(HelloWorldMockup.class.getName());
        AnnotationProcessor ap = new AnnotationProcessor();
        BindingTemplate bindingTemplate = ap.parseServiceBinding(classWithAnnotations, "en", null, null);
        assertNotNull(bindingTemplate);
        //expecting references to two keys
        assertEquals(2, bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().size());
        assertEquals("tModelKey1",bindingTemplate.getTModelInstanceDetails().getTModelInstanceInfo().get(0).getTModelKey());
        //expecting two KeyedReferences in the CategoryBag
        assertEquals(2, bindingTemplate.getCategoryBag().getKeyedReference().size());
        KeyedReference keyedReference2 = bindingTemplate.getCategoryBag().getKeyedReference().get(1);
       assertEquals("uddi-org:types:wsdl2",keyedReference2.getKeyName());
       assertEquals("wsdlDeployment2",keyedReference2.getKeyValue());
       assertEquals("uddi:uddi.org:categorization:types2",keyedReference2.getTModelKey());
       } catch (Exception e) {
         //we should not have any issues reading the annotations
View Full Code Here

TOP

Related Classes of com.sun.xml.registry.uddi.bindings_v2_2.BindingTemplate

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.