Package org.apache.juddi.model

Examples of org.apache.juddi.model.BindingTemplate


*/
public class NotifierTest
  @Test
  public void testHTTPNotifier() throws IllegalArgumentException, SecurityException, URISyntaxException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
    BindingTemplate bindingTemplate = new BindingTemplate();
    bindingTemplate.setEntityKey("uddi:uddi.joepublisher.com:bindingnotifier");
    bindingTemplate.setAccessPointType(AccessPointType.END_POINT.toString());
    bindingTemplate.setAccessPointUrl("http://localhost:12345/tcksubscriptionlistener");
    TmodelInstanceInfo instanceInfo = new TmodelInstanceInfo();
    instanceInfo.setTmodelKey("uddi:uddi.org:transport:http");
    bindingTemplate.getTmodelInstanceInfos().add(instanceInfo);
   
    Notifier notifier = new NotifierFactory().getNotifier(bindingTemplate);
   
    Assert.assertEquals(HTTPNotifier.class, notifier.getClass());
  }
View Full Code Here


   
    Assert.assertEquals(HTTPNotifier.class, notifier.getClass());
  }
  @Test
  public void testSMTPNotifier() throws IllegalArgumentException, SecurityException, URISyntaxException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
    BindingTemplate bindingTemplate = new BindingTemplate();
    bindingTemplate.setEntityKey("uddi:uddi.joepublisher.com:bindingnotifier");
    bindingTemplate.setAccessPointType(AccessPointType.END_POINT.toString());
    bindingTemplate.setAccessPointUrl("mailto:order@islandtrading.example");
    TmodelInstanceInfo instanceInfo = new TmodelInstanceInfo();
    instanceInfo.setTmodelKey("uddi:uddi.org:transport:smtp");
    bindingTemplate.getTmodelInstanceInfos().add(instanceInfo);
   
    Notifier notifier = new NotifierFactory().getNotifier(bindingTemplate);
   
    Assert.assertEquals(SMTPNotifier.class, notifier.getClass());
  }
View Full Code Here

    Assert.assertEquals(SMTPNotifier.class, notifier.getClass());
  }
  //Expected error because we can't connect to the registry on localhost:11099
  @Test(expected=java.lang.reflect.InvocationTargetException.class)
  public void testRMINotifier() throws IllegalArgumentException, SecurityException, URISyntaxException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
    BindingTemplate bindingTemplate = new BindingTemplate();
    bindingTemplate.setEntityKey("uddi:uddi.joepublisher.com:bindingnotifier");
    bindingTemplate.setAccessPointType(AccessPointType.END_POINT.toString());
    bindingTemplate.setAccessPointUrl("rmi://localhost:11099/tcksubscriptionlistener");
    TmodelInstanceInfo instanceInfo = new TmodelInstanceInfo();
    instanceInfo.setTmodelKey("uddi:uddi.org:transport:rmi");
    bindingTemplate.getTmodelInstanceInfos().add(instanceInfo);
   
    Notifier notifier = new NotifierFactory().getNotifier(bindingTemplate);
   
    Assert.assertEquals(RMINotifier.class, notifier.getClass());
  }
View Full Code Here

    Assert.assertEquals(RMINotifier.class, notifier.getClass());
  }
  //Expected error because we did not specify a correct InitialContext
  @Test(expected=java.lang.reflect.InvocationTargetException.class)
  public void testJNDIRMINotifier() throws IllegalArgumentException, SecurityException, URISyntaxException, InstantiationException, IllegalAccessException, InvocationTargetException, NoSuchMethodException, ClassNotFoundException {
    BindingTemplate bindingTemplate = new BindingTemplate();
    bindingTemplate.setEntityKey("uddi:uddi.joepublisher.com:bindingnotifier");
    bindingTemplate.setAccessPointType(AccessPointType.END_POINT.toString());
    bindingTemplate.setAccessPointUrl("jndi-rmi://localhost:11099/tcksubscriptionlistener");
    TmodelInstanceInfo instanceInfo = new TmodelInstanceInfo();
    instanceInfo.setTmodelKey("uddi:uddi.org:transport:jndi-rmi");
    bindingTemplate.getTmodelInstanceInfos().add(instanceInfo);
   
    Notifier notifier = new NotifierFactory().getNotifier(bindingTemplate);
   
    Assert.assertEquals(JNDI_RMINotifier.class, notifier.getClass());
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.model.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.