-
Bug
-
Resolution: Fixed
-
P3
-
2.0
-
1.4
-
sparc
-
solaris_9
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2205113 | 7 | Joe Wang | P3 | Closed | Fixed | b134 |
JDK-2217584 | 6u32 | Robert Mckenna | P2 | Closed | Fixed | b01 |
The Locator set on my ContentHandler has systemId encoded which
causes problem in JAX-WS (wsimport) when some parts of our runtime use the systemId
originally set on the InputSource and some use from the Locator set on
the ContentHandler to resolve relative references. The original issue is reported as https://jax-ws.dev.java.net/issues/show_bug.cgi?id=861.
Please use the test program to reproduce the issue on JDK 6 and compare it by running on JDK 5.
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.ByteArrayInputStream;
/**
* @author Rama Pulavarthi
*/
public class Test {
public static void main(String[] args) throws Exception {
ContentHandler handler = new DefaultHandler() {
public void setDocumentLocator(Locator locator) {
System.out.println(locator.getSystemId());
}
};
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser parser = spf.newSAXParser();
XMLReader reader = parser.getXMLReader();
reader.setContentHandler(handler);
String xml= "<test>abc</test>";
ByteArrayInputStream bis =new ByteArrayInputStream(xml.getBytes());
InputSource is = new InputSource("file:/home2/ramapulavarthi/w/bugs/jaxws861/foo~bla/test/src/wsdl/HelloTypes.xsd");
is.setByteStream(bis);
reader.parse(is);
}
}
causes problem in JAX-WS (wsimport) when some parts of our runtime use the systemId
originally set on the InputSource and some use from the Locator set on
the ContentHandler to resolve relative references. The original issue is reported as https://jax-ws.dev.java.net/issues/show_bug.cgi?id=861.
Please use the test program to reproduce the issue on JDK 6 and compare it by running on JDK 5.
import org.xml.sax.*;
import org.xml.sax.helpers.DefaultHandler;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import java.io.ByteArrayInputStream;
/**
* @author Rama Pulavarthi
*/
public class Test {
public static void main(String[] args) throws Exception {
ContentHandler handler = new DefaultHandler() {
public void setDocumentLocator(Locator locator) {
System.out.println(locator.getSystemId());
}
};
SAXParserFactory spf = SAXParserFactory.newInstance();
SAXParser parser = spf.newSAXParser();
XMLReader reader = parser.getXMLReader();
reader.setContentHandler(handler);
String xml= "<test>abc</test>";
ByteArrayInputStream bis =new ByteArrayInputStream(xml.getBytes());
InputSource is = new InputSource("file:/home2/ramapulavarthi/w/bugs/jaxws861/foo~bla/test/src/wsdl/HelloTypes.xsd");
is.setByteStream(bis);
reader.parse(is);
}
}
- backported by
-
JDK-2217584 Encoding of SystemId in Locator in JDK 6
- Closed
-
JDK-2205113 Encoding of SystemId in Locator in JDK 6
- Closed
- relates to
-
JDK-6341770 Xerces cannot handle relative entity includes with non-ASCII base URL
- Resolved
-
JDK-6435319 MalformedURLException when SYSTEMID value is korean character relative url.
- Resolved
-
JDK-7145458 146 JCK-devtools tests fails since jdk6u32 b01
- Closed