src/test/java/org/jboss/test/util/test/xml/DOMWriterTestCase.java
/** The envelope defines a default namespace
    */
The envelope defines a default namespace
The envelope defines a default namespace
public void testNamespaceCompletionDefault() throws Exception
   {
      String inStr = 
         "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns='http://somens'>" +
          "<env:Body>" +
           "<rpc>" +
            "<param1/>" +
            "<param2/>" +
           "</rpc>" +
          "</env:Body>" +
         "</env:Envelope>";
      Element env = DOMUtils.parse(inStr);
      Element body = DOMUtils.getFirstChildElement(env);
      Element rpc = DOMUtils.getFirstChildElement(body);
      String expStr = 
         "<rpc xmlns='http://somens'>" +
          "<param1/>" +
          "<param2/>" +
         "</rpc>";
      String wasStr = DOMWriter.printNode(rpc, false);
      assertEquals(expStr, wasStr);
   }
public void testNamespaceCompletionDefault ( ) throws Exception { String inStr = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/' xmlns='http://somens'>" + "<env:Body>" + "<rpc>" + "<param1/>" + "<param2/>" + "</rpc>" + "</env:Body>" + "</env:Envelope>" ; Element env = DOMUtils . parse ( inStr ) ; Element body = DOMUtils . getFirstChildElement ( env ) ; Element rpc = DOMUtils . getFirstChildElement ( body ) ; String expStr = "<rpc xmlns='http://somens'>" + "<param1/>" + "<param2/>" + "</rpc>" ; String wasStr = DOMWriter . printNode ( rpc , false ) ; assertEquals ( expStr , wasStr ) ; }
The envelope defines a default namespace
The envelope defines a default namespace