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 GetRegistryInfoHandler.java
Date Fri, 11 Mar 2005 03:51:40 GMT
sviens      2005/03/10 19:51:40

  Modified:    src/java/org/apache/juddi/handler
                        GetRegistryInfoHandler.java
  Log:
  Added a test driver for get_registryInfo
  
  Revision  Changes    Path
  1.4       +23 -0     ws-juddi/src/java/org/apache/juddi/handler/GetRegistryInfoHandler.java
  
  Index: GetRegistryInfoHandler.java
  ===================================================================
  RCS file: /home/cvs/ws-juddi/src/java/org/apache/juddi/handler/GetRegistryInfoHandler.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- GetRegistryInfoHandler.java	8 Mar 2005 03:17:02 -0000	1.3
  +++ GetRegistryInfoHandler.java	11 Mar 2005 03:51:40 -0000	1.4
  @@ -19,6 +19,7 @@
   
   import org.apache.juddi.datatype.RegistryObject;
   import org.apache.juddi.datatype.request.GetRegistryInfo;
  +import org.apache.juddi.util.xml.XMLUtils;
   import org.w3c.dom.Element;
   
   /**
  @@ -77,5 +78,27 @@
     public static void main(String args[])
       throws Exception
     {
  +    HandlerMaker maker = HandlerMaker.getInstance();
  +    AbstractHandler handler = maker.lookup(GetRegistryInfoHandler.TAG_NAME);
  +
  +    Element parent = XMLUtils.newRootElement();
  +    Element child = null;
  +
  +    GetRegistryInfo service = new GetRegistryInfo();
  +    System.out.println();
  +
  +    RegistryObject regObject = service;
  +    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);
     }
   }
  \ No newline at end of file
  
  
  

Mime
View raw message