Package org.apache.juddi.v3.client.mapping

Examples of org.apache.juddi.v3.client.mapping.WSDL2UDDI


public class UDDIClerkManagerTest {
 
     @Test
     public void testReadingTheConfig() {
       try {
         UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(null);
         manager.start();
         manager.getClientConfig().getUDDINode("default");
         assertEquals(2,manager.getClientConfig().getUDDIClerks().size());
         Thread.sleep(500);
         manager.stop();
       } catch (Exception e) {
         //we should not have any issues reading the config
           e.printStackTrace();
           Assert.fail();
       }
View Full Code Here


     }
    
     @Test
     public void testMultipleClientConfigFiles() {
       try {
         UDDIClerkManager manager = new UDDIClerkManager("META-INF/uddi.xml");
         manager.start();
       assertEquals("test-manager", manager.getName());
      
         UDDIClerkManager manager2 = new UDDIClerkManager("META-INF/uddi2.xml");
         manager2.start();
       assertEquals("second-manager", manager2.getName());
       Thread.sleep(500);
       manager.stop();
       manager2.stop();
      
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      Assert.fail("No exceptions are expected");
View Full Code Here

     }
    
     @Test
     public void testDefaultConfigFile() {
       try {
         UDDIClerkManager manager = new UDDIClerkManager(null);
         //We're expecting the manager defined in the META-INF/uddi.xml file.
         manager.start();
       assertEquals("test-manager", manager.getName());
       Thread.sleep(500);
       manager.stop();
      
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      Assert.fail("No exceptions are expected");
View Full Code Here

     public void testDefaultManager() {
       try {   
         //This is a special case where the manager in the META-INF/uddi.xml file is
         //instantiated and started simply by getting it.
         //This functionality was add for backwards compatibility.
         UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(null);
         manager.start();
       assertEquals("test-manager", manager.getName());
       assertEquals("default", manager.getClientConfig().getHomeNode().getName());
       Thread.sleep(500);
       manager.stop();
      
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      Assert.fail("No exceptions are expected");
View Full Code Here

     }
    
     @Test
     public void testReadingAnnotations() {
       try {
         UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(null);
         Map<String,UDDIClerk> clerks = manager.getClientConfig().getUDDIClerks();
        AnnotationProcessor ap = new AnnotationProcessor();
        if (clerks.containsKey("default")) {
          UDDIClerk clerk = clerks.get("default");
          BusinessService service = ap.readServiceAnnotations(
              HelloWorldMockup.class.getName(), clerk.getUDDINode().getProperties());
View Full Code Here

    logger.debug("Publisher " + publisher + " sending getSubscription request..");
    try {
      boolean isMatchingClerk=false;
      UDDIClerk toClerk = null;
      UDDIClerkManager manager = WebHelper.getUDDIClerkManager(session.getServletContext());
      UDDINode homeNode = WebHelper.getUDDIHomeNode(session.getServletContext());
      Map<String, UDDIClerk> clerks = manager.getClientConfig().getUDDIClerks();
      for (UDDIClerk clerk : clerks.values()) {
        if (publisher.equals(clerk.getPublisher())
            && homeNode.getName().equals(clerk.getUDDINode().getName())) {
          toClerk = clerk;
        }
      }
      for (UDDIClerk clerk : clerks.values()) {
        if (publisher.equals(clerk.getPublisher())) {
View Full Code Here

  }

  private Node getSubscriptions(HttpSession session, UDDIClerk clerk, UDDIClerk toClerk) {

    Node modelNode = new Node();
    UDDINode node = clerk.getUDDINode();
    modelNode.setName(node.getName());
    modelNode.setClerkName(clerk.getName());
    modelNode.setDescription(node.getDescription());
    try {
      UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(clerk.getManagerName());
      String clazz = manager.getClientConfig().getUDDINode(clerk.getUDDINode().getName()).getProxyTransport();
      Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);
      Transport transport = (Transport) transportClass.getConstructor(String.class,String.class).newInstance(clerk.getManagerName(),clerk.getUDDINode().getName())
View Full Code Here

    logger.info("Sending saveSubscriptions request..");
    try {
      //before sending this we need to ready the listener node
      UDDIClerkManager manager = WebHelper.getUDDIClerkManager(session.getServletContext());
      UDDINode homeNode = WebHelper.getUDDIHomeNode(session.getServletContext());
      UDDIClerk clerk = manager.getClientConfig().getUDDIClerks().get(modelSubscription.getFromClerkName());
      UDDIClerk toClerk = manager.getClientConfig().getUDDIClerks().get(modelSubscription.getToClerkName());
      if (toClerk==null) {
        String publisher = (String) session.getAttribute("UserName");
        Map<String, UDDIClerk> clerks = manager.getClientConfig().getUDDIClerks();
        for (UDDIClerk uddiClerk : clerks.values()) {
          if (publisher.equals(uddiClerk.getPublisher())
              && homeNode.getName().equals(uddiClerk.getUDDINode().getName())) {
            toClerk = uddiClerk;
          }
        }
      }
     
View Full Code Here

        registrationInfo.setPortName(portName);
        registrationInfo.setServiceUrl(serviceUrl);
        registrationInfo.setWsdlUrl(wsdlURL);
        registrationInfo.setWsdlDefinition(wsdlDefinition);
        registrationInfo.setRegistrationType(RegistrationType.BPEL);
        registration = new AsyncRegistration(bpelClerk, urlLocalizer, properties, registrationInfo);
        Thread thread = new Thread(registration);
        thread.start();
      } catch (Exception e) {
        log.error("Unable to register service " + serviceQName
            + " ." + e.getMessage(),e);
View Full Code Here

   * @param wsdlRef
   */
  public void unRegisterBPELEPR(QName serviceName, String portName, URL serviceURL) {
    if (selfRegister) {
      try {
        BPEL2UDDI bpel2UDDI = new BPEL2UDDI(bpelClerk, urlLocalizer, properties);
        String serviceKey = bpel2UDDI.unRegister(serviceName, portName, serviceURL);
        if (registration.getServiceLocator(bpelClerk.getName())!=null) {
          registration.getServiceLocator(bpelClerk.getName()).removeService(serviceKey);
        }
      } catch (Exception e) {
        log.error("Unable to unRegister EPR for " + serviceName
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.mapping.WSDL2UDDI

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.