axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ias" <iasan...@tmax.co.kr>
Subject RE: cvs commit: ws-axis/java/xmls properties.xml
Date Mon, 15 Mar 2004 04:34:11 GMT
>   1.28      +2 -1      
> ws-axis/java/test/functional/FunctionalTests.java
>   
>   Index: FunctionalTests.java
>   ===================================================================
>   RCS file: 
> /home/cvs/ws-axis/java/test/functional/FunctionalTests.java,v
>   retrieving revision 1.27
>   retrieving revision 1.28
>   diff -u -r1.27 -r1.28
>   --- FunctionalTests.java	12 Mar 2004 06:34:59 -0000	1.27
>   +++ FunctionalTests.java	14 Mar 2004 16:58:41 -0000	1.28
>   @@ -76,7 +76,8 @@
>            }catch( Throwable t){;}
>    
>            // MIME headers test.
>   -        suite.addTestSuite(TestMimeHeaders.class);
>   +        // BROKEN - COMMENTED OUT FOR NOW --gdaniels
>   +        //suite.addTestSuite(TestMimeHeaders.class);

Did you experience any failure of the test suite? With Ant 1.6.1, Sun's JDK
1.4.2_04 and Axis latest CVS, I have 

 <testcase classname="test.functional.TestMimeHeaders"
name="testTransferingMimeHeadersToHttpHeaders" time="0.032" /> 
and
[junit] Tests run: 46, Failures: 0, Errors: 0, Time elapsed: 28.578 sec 
as a result of "ant clean all-tests".

>   1.7       +17 -2     ws-axis/java/test/message/TestSOAPHeader.java
>   
>   Index: TestSOAPHeader.java
>   ===================================================================
>   RCS file: /home/cvs/ws-axis/java/test/message/TestSOAPHeader.java,v
>   retrieving revision 1.6
>   retrieving revision 1.7
>   diff -u -r1.6 -r1.7
>   --- TestSOAPHeader.java	25 Feb 2004 14:02:57 -0000	1.6
>   +++ TestSOAPHeader.java	14 Mar 2004 16:58:41 -0000	1.7
>   @@ -19,9 +19,11 @@
...
>    
>    /**
>   @@ -105,6 +108,18 @@
>         * Method tearDown
>         */
>        protected void tearDown() {
>   +    }
>   +    
>   +    public static final String muHeader =
>   +            "<foo env:mustUnderstand=\"";
>   +    public static final String muEnd = "\"/>";
>   +    
>   +    public void testBadMUValues() throws Exception {
>   +        SOAPHeaderElement header;
>   +        String headerText = muHeader + "true" + muEnd;
>   +        InputStream is = new 
> ByteArrayInputStream(headerText.getBytes());
>   +        Document doc = XMLUtils.newDocument(is);
>   +        header = new SOAPHeaderElement(doc.getDocumentElement());
>        }
>    
>        /**
>   
>   

This part causes the following error:

 <testcase classname="test.message.TestSOAPHeader" name="testBadMUValues"
time="0.016">
  <error message="Fatal Error: URI=null Line=1: The prefix "env" for
attribute "env:mustUnderstand" associated with an element type "foo" is not
bound." type="org.xml.sax.SAXException">org.xml.sax.SAXException: Fatal
Error: URI=null Line=1: The prefix "env" for attribute "env:mustUnderstand"
associated with an element type "foo" is not bound. at
org.apache.axis.utils.XMLUtils$ParserErrorHandler.fatalError(XMLUtils.java:6
27) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown
Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown
Source) at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source) at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRoot
ElementHook(Unknown Source) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(Unknown Source) at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.
apache.xerces.parsers.DOMParser.parse(Unknown Source) at
org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source) at
org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:278) at org.apache.
axis.utils.XMLUtils.newDocument(XMLUtils.java:291) at
test.message.TestSOAPHeader.testBadMUValues(TestSOAPHeader.java:121) at sun.
reflect.NativeMethodAccessorImpl.invoke0(Native Method) at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
) at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)</error> 
  </testcase>

I resolved it by adding namespace declaration of env to foo element like

    public static final String muHeader =
            "<foo xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"
env:mustUnderstand=\"";

(Xerces used above is version 2.6.1 built in Ant 1.6.1.)

Thanks for your leading toward Axis 1.2,

Ias


Mime
View raw message