Good Morning Jiang:
2 things I would check: I would first verify the
package name com.ibm.tct.api.exception.ServerException
(it appears that com specification is om for
some reason..perhaps you have a folder named om instead of com?) Going back to CS101 I would not declare methods
private. Private is normally reserved for attributes which are then
accessed via accessors and mutators.
Xerces as you already know is a fully validating
XML Parser with validation ability. Xerces is also SAX Aware For a complete
example of how to implement Xerces application in Java I encourage you to
visit: http://www.akadia.com/services/java_xml_parser.html I would also pay attention to the XML Document
encoding you use as Mandarin employs different encoding than US
English
HTH, Martin-
(Etats Unis)001-617-852-7822 OOA/OOD Consultant
----- Original Message -----
Sent: Monday, January 24, 2005 3:27
AM
Subject: Exception from service object:
org.apache.xerces.framework.XMLParser
Hi,
I deploy a soap server side
as a web application in WAS5.1, and when i called the client side
it appears the exception like the
title, anyone's help is appreciated.
This is the place to throw this exception, i googled and found
no any useful infos,
/**
* to parse the file to java doc created date:(2002-11-30 14:32:21)
* * @param xmlPath
*
java.lang.String
* @exception om.ibm.tct.api.exception.ServerException *
*/
private void parserXML(String
newXmlPath)
throws
com.ibm.tct.api.exception.ServerException { try { DOMParser parser =
new DOMParser(); File
xmlFile = new
File(newXmlPath);
InputStream fileStream = new FileInputStream(xmlFile); Reader
streamReader = new
InputStreamReader(fileStream, ENCODE); InputSource inputSource =
new InputSource(streamReader);
parser.parse(inputSource); doc =
parser.getDocument();
} catch
(FileNotFoundException fe) {
throw new
com.ibm.tct.api.exception.ServerException(fe.getMessage()); } catch (UnsupportedEncodingException ce) {
throw new
com.ibm.tct.api.exception.ServerException(ce.getMessage()); } catch (SAXException se) {
throw new
com.ibm.tct.api.exception.ServerException(se.getMessage()); } catch (IOException ioe) {
throw new
com.ibm.tct.api.exception.ServerException(ioe
.getMessage()); } catch
(Exception e) {
throw
new
com.ibm.tct.api.exception.ServerException(e.getMessage()); } }
Thanks Tao
|