juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svi...@apache.org
Subject cvs commit: ws-juddi/src/java/org/apache/juddi/handler AuthTokenHandler.java AuthInfoHandler.java
Date Tue, 15 Feb 2005 08:36:18 GMT
sviens      2005/02/15 00:36:18

  Modified:    src/java/org/apache/juddi/handler AuthTokenHandler.java
                        AuthInfoHandler.java
  Log:
  Added test driver in main()
  
  Revision  Changes    Path
  1.5       +27 -0     ws-juddi/src/java/org/apache/juddi/handler/AuthTokenHandler.java
  
  Index: AuthTokenHandler.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/handler/AuthTokenHandler.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AuthTokenHandler.java	30 May 2004 11:39:38 -0000	1.4
  +++ AuthTokenHandler.java	15 Feb 2005 08:36:18 -0000	1.5
  @@ -112,5 +112,32 @@
     public static void main(String args[])
       throws Exception
     {
  +    HandlerMaker maker = HandlerMaker.getInstance();
  +    AbstractHandler handler = maker.lookup(AuthTokenHandler.TAG_NAME);
  +    Element parent = XMLUtils.newRootElement();
  +    Element child = null;
  +    
  +    AuthToken object = new AuthToken();
  +    object.setAuthInfo(new AuthInfo("authToken:c9613c3c-fe55-4f34-a3da-b3167afbca4a"));
  +    object.setGeneric(IRegistry.UDDI_V2_GENERIC);
  +    object.setOperator("jUDDI.org");
  +    
  +    System.out.println();
  +    
  +    RegistryObject regObject = object;
  +    handler.marshal(regObject,parent);
  +    child = (Element)parent.getFirstChild();
  +    parent.removeChild(child);
  +    XMLUtils.writeXML(child,System.out);
  +    
  +    System.out.println();
  +    
  +    regObject = handler.unmarshal(child);
  +    handler.marshal(regObject,parent);
  +    child = (Element)parent.getFirstChild();
  +    parent.removeChild(child);
  +    XMLUtils.writeXML(child,System.out);
  +    
  +    System.out.println();
     }
   }
  \ No newline at end of file
  
  
  
  1.4       +25 -0     ws-juddi/src/java/org/apache/juddi/handler/AuthInfoHandler.java
  
  Index: AuthInfoHandler.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/handler/AuthInfoHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- AuthInfoHandler.java	6 Feb 2005 02:52:07 -0000	1.3
  +++ AuthInfoHandler.java	15 Feb 2005 08:36:18 -0000	1.4
  @@ -73,5 +73,30 @@
     public static void main(String args[])
       throws Exception
     {
  +    HandlerMaker maker = HandlerMaker.getInstance();
  +    AbstractHandler handler = maker.lookup(AuthInfoHandler.TAG_NAME);
  +    Element parent = XMLUtils.newRootElement();
  +    Element child = null;
  +    
  +    AuthInfo object = new AuthInfo();
  +    object.setValue("authToken:c9613c3c-fe55-4f34-a3da-b3167afbca4a");
  +    
  +    System.out.println();
  +    
  +    RegistryObject regObject = object;
  +    handler.marshal(regObject,parent);
  +    child = (Element)parent.getFirstChild();
  +    parent.removeChild(child);
  +    XMLUtils.writeXML(child,System.out);
  +    
  +    System.out.println();
  +    
  +    regObject = handler.unmarshal(child);
  +    handler.marshal(regObject,parent);
  +    child = (Element)parent.getFirstChild();
  +    parent.removeChild(child);
  +    XMLUtils.writeXML(child,System.out);
  +    
  +    System.out.println();
     }
   }
  \ No newline at end of file
  
  
  

Mime
View raw message