xml-soap-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colic, Nedim" <Ne...@mediaocean.com>
Subject Fix for "Element must contain a:'faultcode' element" problem
Date Thu, 13 Jun 2002 15:20:18 GMT
I've seen numerous posts about this on the list. The FAQ at http://xml.apache.org/soap/faq/faq_chawke.html#Q1_1
says that it's Xerces problem, but after I tried many different parsers/versions none of them
seem to help. So I traced the problem and yes, it has nothing to do with the parser I was
using!

To fix the problem in version 2.3.1 open org.apache.soap.Fault.java, go to line 316 and add
these lines:

if( null != namespaceURI && namespaceURI.length() == 0 ) {
    namespaceURI = null;
}

They go right before the line
if (namespaceURI == null || namespaceURI.equals(Constants.NS_URI_SOAP_ENV)) {
which is the problem as it checks namespaceURI for null, but not for empty string.

After this I tried different versions of Xerces, Crimson and Weblogic's parser and they all
worked fine.


Nedim Colic
Software Architect
MediaOcean
p: 404-879-2537
f: 404-885-9949

Mime
View raw message