Package org.apache.juddi.v3.client.transport.wrapper

Examples of org.apache.juddi.v3.client.transport.wrapper.UDDIPublicationService


   * configuration.
   */
  public void registerAnnotatedServices() {
    Map<String,UDDIClerk> uddiClerks = clientConfig.getUDDIClerks();
    if (uddiClerks.size() > 0) {
      AnnotationProcessor ap = new AnnotationProcessor();
      for (UDDIClerk uddiClerk : uddiClerks.values()) {
        Collection<BusinessService> services = ap.readServiceAnnotations(
            uddiClerk.getClassWithAnnotations(),uddiClerk.getUDDINode().getProperties());
        for (BusinessService businessService : services) {
          log.info("Node=" + uddiClerk.getUDDINode().getApiNode().getName());
          uddiClerk.register(businessService, uddiClerk.getUDDINode().getApiNode());
        }
View Full Code Here


   * @throws RemoteException
   */
  public void unRegisterAnnotatedServices() {
    Map<String,UDDIClerk> clerks = clientConfig.getUDDIClerks();
    if (clerks.size() > 0) {
      AnnotationProcessor ap = new AnnotationProcessor();
      for (UDDIClerk clerk : clerks.values()) {
        Collection<BusinessService> services = ap.readServiceAnnotations(
            clerk.getClassWithAnnotations(),clerk.getUDDINode().getProperties());
        for (BusinessService businessService : services) {
          clerk.unRegisterService(businessService.getServiceKey(),clerk.getUDDINode().getApiNode());
        }
      }
View Full Code Here

   */
  public void unRegisterBindingsOfAnnotatedServices(boolean removeServiceWithNoBindingTemplates) {
   
      Map<String,UDDIClerk> clerks = clientConfig.getUDDIClerks();
      if (clerks.size() > 0) {
        AnnotationProcessor ap = new AnnotationProcessor();
        for (UDDIClerk clerk : clerks.values()) {
          Collection<BusinessService> services = ap.readServiceAnnotations(
              clerk.getClassWithAnnotations(),clerk.getUDDINode().getProperties());
          for (BusinessService businessService : services) {
            if (businessService.getBindingTemplates() != null) {
              List<BindingTemplate> bindingTemplates = businessService.getBindingTemplates().getBindingTemplate();
              for (BindingTemplate bindingTemplate : bindingTemplates) {
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());
          assertEquals("uddi:juddi.apache.org:services-helloworld",service.getServiceKey());
        } else {
         Assert.fail("Could not find expected clerk='default'");
        }
View Full Code Here

   * @throws ConfigurationException
   */
  @Test
  public void testDefaultAuthenticator()
  {
    Authenticator auth = new JUDDIAuthenticator();
    try {
      API_010_PublisherTest api010 = new API_010_PublisherTest();
      api010.saveJoePublisher();
      api010.saveSamSyndicator();

      auth.authenticate("joepublisher","password");
      auth.authenticate("ssyndicator","badpass");
     
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
View Full Code Here

   */
  @Test
  public void testXMLDocAuthenticator()
  {
    try {
      Authenticator auth = new XMLDocAuthenticator();
      auth.authenticate("anou_mana","password");
      auth.authenticate("bozo","clown");
      auth.authenticate("sviens","password");
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
  }
View Full Code Here

   * @throws JAXBException
   */
  @Test(expected=UnknownUserException.class)
  public void testBadCryptedXMLDocAuthenticator() throws Exception
  {
    Authenticator auth = new CryptedXMLDocAuthenticator();
    auth.authenticate("anou_mana","badpass");
  }
View Full Code Here

   * @throws ConfigurationException
   */
  @Test
  public void testDefaultAuthenticator()
  {
    Authenticator auth = new JUDDIAuthenticator();
    try {
      API_010_PublisherTest api010 = new API_010_PublisherTest();
      api010.saveJoePublisher();
      api010.saveSamSyndicator();

      auth.authenticate("joepublisher","password");
      auth.authenticate("ssyndicator","badpass");
     
    } catch (Exception e) {
      logger.error(e.getMessage(),e);
      Assert.fail("unexpected");
    }
View Full Code Here

  }
  @Test
  public void testCreateJuddiUsers() throws Exception
  {
    try {
      JuddiUsers juddiUsers = new JuddiUsers();
      juddiUsers.getUser().add(new User("anou_mana","password"));
      juddiUsers.getUser().add(new User("bozo","clown"));
      juddiUsers.getUser().add(new User("sviens","password"));
     
      StringWriter writer = new StringWriter();
      JAXBContext context = JAXBContext.newInstance(juddiUsers.getClass());
      Marshaller marshaller = context.createMarshaller();
      marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
      marshaller.marshal(juddiUsers, writer);
      logger.info("\n" +  writer.toString());
    } catch (Exception e) {
View Full Code Here

  @Test
  public void testCreateJuddiUsersEncrypted() throws Exception
  {
    try {
      Cryptor cryptor = (Cryptor) CryptorFactory.getCryptor();
      JuddiUsers juddiUsers = new JuddiUsers();
      juddiUsers.getUser().add(new User("anou_mana",cryptor.encrypt("password")));
      juddiUsers.getUser().add(new User("bozo",cryptor.encrypt("clown")));
      juddiUsers.getUser().add(new User("sviens",cryptor.encrypt("password")));
     
      StringWriter writer = new StringWriter();
      JAXBContext context = JAXBContext.newInstance(juddiUsers.getClass());
      Marshaller marshaller = context.createMarshaller();
      marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
      marshaller.marshal(juddiUsers, writer);
      logger.info("\n" +  writer.toString());
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.transport.wrapper.UDDIPublicationService

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.