SOAP Fault child nodes & Default namespace

Hi,

I'm having a problem parsing SOAP messages containing fault codes.
The problem is as follows:

- When an explicit namespace prefix is used in the document, validation
succeeds
  For example:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" >
    <env:Body>
        <env:Fault>
        	<faultcode>env:Client</faultcode>
        	<faultstring>Client Error</faultstring>
        	<detail>
        		<dispositionReport generic="2.0" operator="acumen"
xmlns="urn:uddi-org:api_v2">
        			<result errno="10150">
        				<errInfo
errCode="E_unknownUser">error.unknownUser.base</errInfo>
        			</result>
        		</dispositionReport>
        	</detail>
        </env:Fault>
    </env:Body>
</env:Envelope>

- When no namespace prefix is specified (i.e. default namespace) validation
fails:

<?xml version="1.0" encoding="UTF-8"?>
<Envelope xmlns="http://schemas.xmlsoap.org/soap/envelope/" >
    <Body>
        <Fault>
        	<faultcode>Client</faultcode>
        	<faultstring>Client Error</faultstring>
        	<detail>
        		<dispositionReport generic="2.0" operator="acumen"
xmlns="urn:uddi-org:api_v2">
        			<result errno="10150">
        				<errInfo
errCode="E_unknownUser">error.unknownUser.base</errInfo>
        			</result>
        		</dispositionReport>
        	</detail>
        </Fault>
    </Body>
</Envelope>

The parsers error message is:

org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content
starting with element 'faultcode'.
The content must match
'(("":faultcode),("":faultstring),("":faultactor){0-1},("":detail){0-1})'.

I'm using SOAP 1.1 XML Schema, and JAXP 1.2 with a Xerces 2.2.1
implementation.

Can somebody tell me whether I'm missing something?

Thanks,

Aslan Mirfattahi
Lead Consultant
Tel: (416) 491-1419 x226
Fax: (416) 491-3070
mailto:aslan@AcumenTechnologies.com

2235 Sheppard Ave. E., Ste. 1501
Toronto, ON M2J 5B5
www.acumentechnologies.com

Received on Monday, 2 December 2002 16:38:36 UTC