checkTestSetPrefixSoap(SOAP12); checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m")); checkTestSetPrefixSoap(generateSoapEnvelope(null, null, "m")); checkTestSetPrefixSoap(generateSoapEnvelope("env", null, "m")); checkTestSetPrefixSoap(generateSoapEnvelope("env", "", ""));   String generated = generateSoapEnvelope("", "n", "m");     checkTestSetPrefixSoap(generated, 1,false);   checkTestSetPrefixSoap(generateSoapEnvelope("", null, "m"),1,false);   checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", Boolean.FALSE, null, null)); checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", Boolean.TRUE, null, null)); checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", null, " ", null), true); checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", null, "\t", null), true); checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", null, "    ", null), true); String s = generateSoapEnvelope("env", "n", "m", Boolean.TRUE, " ", "\n");  checkTestSetPrefixSoap(s, true);
checkParserStateNs(xpp, 0, xpp.START_DOCUMENT, null, 0, null, null, null, false, -1); xpp.next(); String expectedPrefix = (prefix != null && prefix.length() == 0) ? null : prefix; checkParserStateNs(xpp, 1, xpp.START_TAG, expectedPrefix, 1, NS, "foo", null, xpp.isEmptyElementTag() , 0);
    public void testSetPrefix() throws Exception {        //TODO check redeclaring defult namespace        checkTestSetPrefixSoap(SOAP12);        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m"));        checkTestSetPrefixSoap(generateSoapEnvelope(null, null, "m"));        checkTestSetPrefixSoap(generateSoapEnvelope("env", null, "m"));        checkTestSetPrefixSoap(generateSoapEnvelope("env", "", ""));        String generated = generateSoapEnvelope("", "n", "m");        //System.err.println(getClass()+" generated="+generated);        // 1 is for one extra namespace must be added to declare xmlns namespace        //    for attrbute mustUnderstan in SOAP-ENV namespace        checkTestSetPrefixSoap(generated, 1,false);        checkTestSetPrefixSoap(generateSoapEnvelope("", null, "m"),1,false);        //check optional pretty printing        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", Boolean.FALSE, null, null));        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", Boolean.TRUE, null, null));        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", null, " ", null), true);        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", null, "\t", null), true);        checkTestSetPrefixSoap(generateSoapEnvelope("env", "n", "m", null, "    ", null), true);        String s = generateSoapEnvelope("env", "n", "m", Boolean.TRUE, " ", "\n");        //System.out.println(getClass()+" envelope="+generateSoapEnvelope("", "n", "m"));        checkTestSetPrefixSoap(s, true);    }