Thanks for the clarification, Guillaume. That looks like a very likely reason why XMLSpy would validate the document. :-)
Cheers, -- Peter McCracken XML Parser Development IBM Toronto Lab Email: [EMAIL PROTECTED] Guillaume Lebleu <[EMAIL PROTECTED]> wrote on 01/12/2006 02:29:24 PM: > Even though I don't work for Altova, one reason that XMLSpy might > validate the sample provided is that WS-I Basic Profile compliance > requires that: "When an ENVELOPE is a Fault, the element children of the > soap:Fault element MUST be unqualified." > > See section 3.4.3 / R1001 and examples in http://www.ws-i. > org/Profiles/BasicProfile-1.2.html > > Guillaume > > Caleandro wrote: > Hi Peter and keshlam > > thanks for your kind replies, they has been very helpful. I > corrected the message and all goes fine. > (Now I'm about to dismiss XMLSPY ;-) ). > Vito > -----Messaggio originale----- > Da: Peter McCracken [mailto:[EMAIL PROTECTED] > Inviato: giovedì 30 novembre 2006 20.03 > A: j-users@xerces.apache.org > Oggetto: Re: Validate a SOAP 1.1 (fault)response message > > Hi Vito, > > I'm not sure why XMLSPY validated the document successfully, because > the document is not valid. The faultcode element must have a > namespace (the same is true of the faultstring and faultactor > elements). In your XML document, try changing "faultcode", > "faultstring" and "faultactor" to "env:faultcode", "env:faultstring" > and "env:faultactor", respectively. Alternately, you could set a > default namespace by adding 'xmlns="http://schemas.xmlsoap.org/soap/envelope/" > ' to the root element of the document. > > Cheers, > -- > Peter McCracken > XML Parser Development > IBM Toronto Lab > Email: [EMAIL PROTECTED] > > "Caleandro" <[EMAIL PROTECTED]> wrote on 30/11/2006 04:44:58 AM: > > > Hi all, > > > > in an ANT script that use xerces-j to validate the following SOAP 1.1 > > response message with a fault element against the schema at > > "http://schemas.xmlsoap.org/soap/envelope/" > > > > --- > > <env:Envelope > > xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/><env:Body > > ><env:Fault><faultcode>env:Server</faultcode><faultstring>Record not > > found</faultstring><faultactor>DEVSRVR</faultactor></env:Fault></env:Body></ > > env:Envelope> > > --- > > > > the step fails with the following console message: > > > > > > --- > > [xmlvalidate] > > D:\TestsRoot\AAGC\Reports\rspns_AAGC_WS_0002_VIC.xml_20061130_0925_116487512 > > 5227_invoke.xml:1:114: cvc-complex-type.2.4.a: Invalid conte > > nt was found starting with element 'faultcode'. One of > > '{"http://schemas.xmlsoap.org/soap/envelope/":faultcode}' is expected. > > [xmlvalidate] > > D:\TestsRoot\AAGC\Reports\rspns_AAGC_WS_0002_VIC.xml_20061130_0925_116487512 > > 5227_invoke.xml is not a valid XML document > > --- > > > > But validating the same SOAP response using XMLSPY the process succeeded. > > > > Can anyone give me any suggestion to obtain the same result in ANT script > > too? > > > > Thank you in advance for any reply. > > > > Vito > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > >