src/test/java/org/jboss/test/util/test/xml/DOMWriterTestCase.java
/** The element does not contain the required ns declaration.
    */
The element does not contain the required ns declaration.
The element does not contain the required ns declaration .
public void testNamespaceCompletionOne() throws Exception
   {
      String inStr = 
         "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
          "<env:Body>" +
           "<env:Fault>" +
            "<faultcode>env:Client</faultcode>" +
            "<faultstring>Endpoint {http://webmethod.jsr181.ws.test.jboss.org/jaws}TestEndpointPort does not contain operation meta data for: {http://webmethod.jsr181.ws.test.jboss.org/jaws}noWebMethod</faultstring>" +
           "</env:Fault>" +
          "</env:Body>" +
         "</env:Envelope>";
      Element env = DOMUtils.parse(inStr);
      Element body = DOMUtils.getFirstChildElement(env);
      Element fault = DOMUtils.getFirstChildElement(body);
      String expStr = 
         "<env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" +
          "<faultcode>env:Client</faultcode>" +
          "<faultstring>Endpoint {http://webmethod.jsr181.ws.test.jboss.org/jaws}TestEndpointPort does not contain operation meta data for: {http://webmethod.jsr181.ws.test.jboss.org/jaws}noWebMethod</faultstring>" +
         "</env:Fault>";
      String wasStr = DOMWriter.printNode(fault, false);
      assertEquals(expStr, wasStr);
   }
public void testNamespaceCompletionOne ( ) throws Exception { String inStr = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Body>" + "<env:Fault>" + "<faultcode>env:Client</faultcode>" + "<faultstring>Endpoint {http://webmethod.jsr181.ws.test.jboss.org/jaws}TestEndpointPort does not contain operation meta data for: {http://webmethod.jsr181.ws.test.jboss.org/jaws}noWebMethod</faultstring>" + "</env:Fault>" + "</env:Body>" + "</env:Envelope>" ; Element env = DOMUtils . parse ( inStr ) ; Element body = DOMUtils . getFirstChildElement ( env ) ; Element fault = DOMUtils . getFirstChildElement ( body ) ; String expStr = "<env:Fault xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<faultcode>env:Client</faultcode>" + "<faultstring>Endpoint {http://webmethod.jsr181.ws.test.jboss.org/jaws}TestEndpointPort does not contain operation meta data for: {http://webmethod.jsr181.ws.test.jboss.org/jaws}noWebMethod</faultstring>" + "</env:Fault>" ; String wasStr = DOMWriter . printNode ( fault , false ) ; assertEquals ( expStr , wasStr ) ; }
The element does not contain the required ns declaration.
The element does not contain the required ns declaration .