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: giovedi 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]
  >

Reply via email to