@Test
    public void testStripNamespacesForWebsocket() throws Exception
    {
        final String input_header = "<open xmlns='urn:ietf:params:xml:ns:xmpp-framing' to='example.com' version='1.0' />";
        final Document doc_header = packetReader.read( new StringReader( input_header ) );
        final String input = "  <message xmlns='jabber:client'>" +
            "    <other xmlns='something:else'>" +
            "      <message xmlns='jabber:client'/>" +
            "    </other>" +
            "  </message>";
        final Document result = packetReader.read( new StringReader( input ) );

        // Verify result.
        assertFalse( result.asXML().substring( 0, result.asXML().indexOf("something:else") ).contains( "jabber:client" ), "'jabber:client' should not occur before 'something:else'" );
        assertTrue( result.asXML().substring( result.asXML().indexOf("something:else") ).contains( "jabber:client" ), "'jabber:client' should occur after 'something:else'" );
    }
Check that a websocket connection would also work.
xmppserver/src/test/java/dom/io/XMPPPacketReaderTest.java