You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Caleandro <ka...@katamail.com> on 2006/12/01 09:22:54 UTC
R: Validate a SOAP 1.1 (fault)response message
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:peterjm@ca.ibm.com]
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: peterjm@ca.ibm.com
"Caleandro" <ka...@katamail.com> 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: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
>
R: R: Validate a SOAP 1.1 (fault)response message
Posted by Caleandro <ka...@katamail.com>.
Hi Guys,
Ok, Ok , I was joking when I said I'm dismissing XMLspy ! :-)
Thanks to Guillaume and others, very appreciated clarifications.
Greetings,
Vito
-----Messaggio originale-----
Da: Peter McCracken [mailto:peterjm@ca.ibm.com]
Inviato: venerdì 1 dicembre 2006 21.51
A: j-users@xerces.apache.org
Oggetto: Re: R: Validate a SOAP 1.1 (fault)response message
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: peterjm@ca.ibm.com
Guillaume Lebleu <gl...@brixlogic.com> 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:peterjm@ca.ibm.com]
> 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: peterjm@ca.ibm.com
>
> "Caleandro" <ka...@katamail.com> 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: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
> >
Re: R: Validate a SOAP 1.1 (fault)response message
Posted by Peter McCracken <pe...@ca.ibm.com>.
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: peterjm@ca.ibm.com
Guillaume Lebleu <gl...@brixlogic.com> 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:peterjm@ca.ibm.com]
> 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: peterjm@ca.ibm.com
>
> "Caleandro" <ka...@katamail.com> 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: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
> >
Re: R: Validate a SOAP 1.1 (fault)response message
Posted by Guillaume Lebleu <gl...@brixlogic.com>.
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:peterjm@ca.ibm.com]
> *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: peterjm@ca.ibm.com
>
> "Caleandro" <ka...@katamail.com> 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: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
> >
>