That's strange!
I have to say though that the error that you are reporting (Invalid
QName value: Can't resolve prefix 'SOAP-ENV') seems to have nothing to
do with any's. Rather it's complaining about the <faultcode> part,
specifically that it can't resolve SOAP-ENV:Server to a QName because it
can't find a declaration of the SOAP-ENV prefix. Now obviously, there is
a declaration for SOAP-ENV right there.
 
One thing to try in such situations (strange validation errors) is the
"validate" script in the xmlBeans bin/ directory. I have in fact just
tried it and reports the document as valid. This is indication that the
problem comes not from the document or the Schema, but from somewhere
else. Are you building the response and validate it before you send it
or are you reading in and then validating? If the second applies, are
you making any sort of processing to the message that may remove the
namespace declaration?
 
Radu

________________________________

From: Don Stewart [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 10, 2006 8:21 AM
To: user@xmlbeans.apache.org
Subject: SOAPFault validate challenge



Looking at the XML Schema for SOAP and specifically the SOAPFault I
appear to be enjoying a challenge :)

I have a SOAPFault document response that is failing to validate using
the validate on the class generated from the SOAP Schema. 

The Response looks like:-

<?xml version="1.0"?>

<SOAP-ENV:Fault
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/
file:///c:/eclipse/workspace/SOAPEnvelope/SOAPEvelope.xsd">

<faultcode>SOAP-ENV:Server</faultcode>

<faultstring>An error was detected while executing the Web Service
request. (10893)</faultstring>

<detail>

<ns1:FaultDetail xmlns:ns1="urn:soap-fault:details">

<errorMessage>The example parameter was not of type intPrgs
(10937)</errorMessage>

<requestID>7c02cf73648f42b9:-32c9e224:10ecc18015b:-7ff8#48</requestID>

</ns1:FaultDetail>

</detail>

</SOAP-ENV:Fault>

 

and the SOAPFault Schema section  is:-

<xs:element name="Fault" type="tns:Fault" />

<xs:complexType name="Fault" final="extension" >

<xs:annotation>

<xs:documentation>

Fault reporting structure

</xs:documentation>

</xs:annotation>

<xs:sequence>

<xs:element name="faultcode" type="xs:QName" />

<xs:element name="faultstring" type="xs:string" />

<xs:element name="faultactor" type="xs:anyURI" minOccurs="0" />

<xs:element name="detail" type="tns:detail" minOccurs="0" /> 

</xs:sequence>

</xs:complexType>

<xs:complexType name="detail">

<xs:sequence>

<xs:any namespace="##any" minOccurs="0" maxOccurs="unbounded"
processContents="lax" />

</xs:sequence>

<xs:anyAttribute namespace="##any" processContents="lax" /> 

</xs:complexType>

 
I have an XmlOptions object passed to validate which has the XmlOptions
setValidateTreatLaxAsSkip() set.
I apopreciate that the ns1:FaultDetail is defined as an xs:any with it's
namespace defined as namespace="##any" and has processContents="lax".
I am experiencinge an error  Invalid QName value: Can't resolve prefix
'SOAP-ENV'.
 
Can anyone spot the deliberate mistake :o)
 
Many Thanks
 
Don
 
_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

Reply via email to