Package org.apache.juddi.v3.client.cryptor

Examples of org.apache.juddi.v3.client.cryptor.Cryptor


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


      publisher = user.getName();
    }
    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())
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;
          }
        }
      }
     
      logger.info("Updating homeNode server using jUDDI specific API..");
      Transport defaultTransport = WebHelper.getTransport(session.getServletContext());
      JUDDIApiPortType juddiApiService = defaultTransport.getJUDDIApiService();
     
      //making sure our node info is there and up to date.
      SaveNode saveNode = new SaveNode();
      saveNode.setAuthInfo(userAuthToken);
      saveNode.getNode().add(clerk.getApiClerk().getNode());
      juddiApiService.saveNode(saveNode);
      //making sure our clerk info is there and up to date
      SaveClerk saveClerk = new SaveClerk();
      saveClerk.setAuthInfo(userAuthToken);
      saveClerk.getClerk().add(clerk.getApiClerk());
      juddiApiService.saveClerk(saveClerk);
      //making sure our node info is there and up to date.
      SaveNode saveToNode = new SaveNode();
      saveToNode.setAuthInfo(userAuthToken);
      saveToNode.getNode().add(toClerk.getApiClerk().getNode());
      juddiApiService.saveNode(saveToNode);
      //making sure our clerk info is there and up to date
      SaveClerk saveToClerk = new SaveClerk();
      saveToClerk.setAuthInfo(userAuthToken);
      saveToClerk.getClerk().add(toClerk.getApiClerk());
      juddiApiService.saveClerk(saveToClerk);
      logger.debug("Updating default UDDI server completed.");
     
      SaveClientSubscriptionInfo saveClientSubscriptionInfo = new SaveClientSubscriptionInfo();
      saveClientSubscriptionInfo.setAuthInfo(userAuthToken);
      ClientSubscriptionInfo clientSubscriptionInfo = new ClientSubscriptionInfo();
      clientSubscriptionInfo.setSubscriptionKey(modelSubscription.getSubscriptionKey());
      clientSubscriptionInfo.setFromClerk(clerk.getApiClerk());
      clientSubscriptionInfo.setToClerk(toClerk.getApiClerk());
     
      saveClientSubscriptionInfo.getClientSubscriptionInfo().add(clientSubscriptionInfo);
      //save clientSubscription to the listening UDDI default server.
      juddiApiService.saveClientSubscriptionInfo(saveClientSubscriptionInfo);
      logger.debug("Saved ClientSubscriptionInfo to the default UDDI server");
View Full Code Here

    String error = null;
    try {
   
      try {
        UDDIClerkManager manager = WebHelper.getUDDIClerkManager(session.getServletContext());
        UDDIClerk clerk = manager.getClientConfig().getUDDIClerks().get(modelSubscription.getFromClerkName());
        Transport transport = WebHelper.getTransport(session.getServletContext(), clerk.getUDDINode());
        UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
        DeleteSubscription deleteSubscription = new DeleteSubscription();
        String authToken = (String) session.getAttribute("token-" + clerk.getName());
        deleteSubscription.setAuthInfo(authToken);
        deleteSubscription.getSubscriptionKey().add(modelSubscription.getSubscriptionKey());
        subscriptionService.deleteSubscription(deleteSubscription);
        logger.info("Deleted Subscription " + modelSubscription.getSubscriptionKey()
            + " from UDDI server " + clerk.getUDDINode().getName());
      } catch (Exception e) {
        error = "Could not delete subscription. Reason: " + e.getMessage();
        logger.error(error, e);
      }
      try {
View Full Code Here

   
    properties.put("nodeName", JBossDSPFactory.getServerConfig().getUddiNodeName());
    String bpelUDDIConfig = properties.getProperty(BPEL_UDDI_CONFIG);
    if (bpelUDDIConfig!=null) {
      try {
        UDDIClerkManager clerkManager = new UDDIClerkManager(bpelUDDIConfig, properties);
            clerkManager.start();
            selfRegister = clerkManager.getClientConfig().isRegisterOnStartup();
            Map<String,UDDIClerk> clerks = clerkManager.getClientConfig().getUDDIClerks();
            String clerkName = properties.getProperty(BPEL_UDDI_CLERK, DEFAULT_BPEL_UDDI_CLERK);
        bpelClerk = clerks.get(clerkName);
        //Add the properties from the uddi.xml
        properties.putAll(bpelClerk.getUDDINode().getProperties());
        if (bpelClerk==null) {
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;
        }
View Full Code Here

    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())
      String authToken = (String) session.getAttribute("token-" + clerk.getName());

      UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
View Full Code Here

    SubscriptionResponse response = new SubscriptionResponse();

    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

   
    String error = null;
    try {
   
      try {
        UDDIClerkManager manager = WebHelper.getUDDIClerkManager(session.getServletContext());
        UDDIClerk clerk = manager.getClientConfig().getUDDIClerks().get(modelSubscription.getFromClerkName());
        Transport transport = WebHelper.getTransport(session.getServletContext(), clerk.getUDDINode());
        UDDISubscriptionPortType subscriptionService = transport.getUDDISubscriptionService();
        DeleteSubscription deleteSubscription = new DeleteSubscription();
        String authToken = (String) session.getAttribute("token-" + clerk.getName());
        deleteSubscription.setAuthInfo(authToken);
View Full Code Here

*/
public class UDDI_010_PublisherIntegrationTest {
 
  @BeforeClass
  public static void startRegistry() throws ConfigurationException {
    UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(null);
    String clazz = manager.getClientConfig().getUDDINode("default").getProxyTransport();
    if (InVMTransport.class.getName().equals(clazz)) {
      Registry.start();
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.juddi.v3.client.cryptor.Cryptor

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.