You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Li...@sybase.com on 2007/02/26 09:50:45 UTC
Fw: uri
Hello,
Axis version: 1.4
JDK 1.4
The function ()
public static Document newDocument(String uri, String username, String
password)
in the class org.apache.axis.utils.XMLUtils
If the first param 'String uri' contains i18n characters (e.g Chinese
characters), it will lead the exception stack as following:
java.net.MalformedURLException: unknown protocol: j
at java.net.URL.<init>(URL.java:544)
at java.net.URL.<init>(URL.java:434)
at java.net.URL.<init>(URL.java:383)
at
org.apache.xerces.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at
org.apache.xerces.impl.XMLVersionDetector.determineDocVersion(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:369)
at
org.apache.axis.utils.XMLUtils.newDocument(XMLUtils.java:420)
at
org.apache.axis.wsdl.symbolTable.SymbolTable.populate(SymbolTable.java:482)
at
org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
at java.lang.Thread.run(Thread.java:534)
If the code patch is added at head of the function, It can accept the uri
with i18 characters.
try
{
uri=uri.replace('\\','/');
URI tempuri = new URI(uri);
uri = tempuri.toASCIIString();
}
catch(URISyntaxException e)
{
e.printStackTrace();
}
I wonder if it is a bug and the code patch is proper.
Thanks
li-wei