- From: Philippe Le Hegaret via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 10 Jan 2007 19:24:35 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/test-suite/results-messages In directory hutz:/tmp/cvs-serv23400 Modified Files: generate-xpath-assertions.xslt Log Message: In HTTP: - If no content, then don't check for the media type, unless application/x-www-form-urlencoded is expected. - Default error status code is 500 In SOAP: - Default error status code is 500 Index: generate-xpath-assertions.xslt =================================================================== RCS file: /sources/public/2002/ws/desc/test-suite/results-messages/generate-xpath-assertions.xslt,v retrieving revision 1.14 retrieving revision 1.15 diff -C 2 -d -r1.14 -r1.15 *** generate-xpath-assertions.xslt 10 Jan 2007 03:31:34 -0000 1.14 --- generate-xpath-assertions.xslt 10 Jan 2007 19:24:33 -0000 1.15 *************** *** 55,73 **** <!-- Tests specific to HTTP 1.1 bindings --> <xsl:if test='m:httpVersion="1.1"'> ! <xsl:if test='@type="request" ! or (@type="response" ! and m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out")'> ! <assertion><xsl:value-of select='$msg'/> ! <xsl:text>/l:httpHeaders/l:Content-Type/@type='</xsl:text> ! <xsl:choose> ! <xsl:when test='@type="request"'> ! <xsl:value-of select='m:httpInputSerialization'/> ! </xsl:when> ! <xsl:when test='@type="response"'> ! <xsl:value-of select='m:httpOutputSerialization'/> ! </xsl:when> ! </xsl:choose> ! <xsl:text>'</xsl:text></assertion> ! </xsl:if> <xsl:if test='@type="request"'> <assertion><xsl:value-of select='$msg'/> --- 55,84 ---- <!-- Tests specific to HTTP 1.1 bindings --> <xsl:if test='m:httpVersion="1.1"'> ! <xsl:choose> ! <xsl:when test='m:fault'> ! <assertion><xsl:value-of select='$msg'/> ! <xsl:text>/l:httpHeaders/l:Content-Type/@type='</xsl:text> ! <xsl:value-of select='m:httpFaultSerialization'/> ! <xsl:text>'</xsl:text> ! </assertion> ! </xsl:when> ! <xsl:when test='@type="request" and (m:messageContentModel/@type!="#none" ! or m:httpInputSerialization="application/x-www-form-urlencoded")'> ! <assertion><xsl:value-of select='$msg'/> ! <xsl:text>/l:httpHeaders/l:Content-Type/@type='</xsl:text> ! <xsl:value-of select='m:httpInputSerialization'/> ! <xsl:text>'</xsl:text> ! </assertion> ! </xsl:when> ! <xsl:when test='@type="response" and m:messageContentModel/@type!="#none" ! and m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out"'> ! <assertion><xsl:value-of select='$msg'/> ! <xsl:text>/l:httpHeaders/l:Content-Type/@type='</xsl:text> ! <xsl:value-of select='m:httpOutputSerialization'/> ! <xsl:text>'</xsl:text> ! </assertion> ! </xsl:when> ! </xsl:choose> ! <xsl:if test='@type="request"'> <assertion><xsl:value-of select='$msg'/> *************** *** 95,98 **** --- 106,113 ---- <xsl:text>'</xsl:text></assertion> </xsl:when> + <xsl:when test='m:fault'> + <assertion><xsl:value-of select='$msg'/> + <xsl:text>/l:httpHeaders/l:StatusCode/@value='500'</xsl:text></assertion> + </xsl:when> <xsl:when test='m:fault/m:httpErrorStatusCode[@type="#any"]'> <!-- Unknown error code *************** *** 111,129 **** </xsl:choose> </xsl:if> - <xsl:if test='m:fault'> - <assertion>count(<xsl:value-of select='$msg'/>/l:content/*)=1</assertion> - <xsl:if test='m:fault/m:contentModel'> - <assertion><xsl:value-of select='$msg'/>/l:content/*[<xsl:text>local-name()="</xsl:text> - <xsl:value-of select='m:fault/m:contentModel/@localName'/>" and namespace-uri()="<xsl:value-of select='m:fault/m:contentModel/@namespace'/>"]</assertion> - </xsl:if> - </xsl:if> <xsl:if test='(@type="request") or (@type="response" ! and count(m:fault)=0 ! and m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out")'> <!-- @@it's a GET, no body... --> <xsl:choose> <xsl:when test='m:messageContentModel/@type="#any"'> <!-- it's anything, just check the number. --- 126,148 ---- </xsl:choose> </xsl:if> <xsl:if test='(@type="request") or (@type="response" ! and m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out") ! or ! m:fault'> <!-- @@it's a GET, no body... --> <xsl:choose> + <xsl:when test='m:fault'> + <assertion>count(<xsl:value-of select='$msg'/>/l:content/*)=1</assertion> + <xsl:if test='m:fault/m:contentModel'> + <assertion><xsl:value-of select='$msg'/>/l:content/*[<xsl:text>local-name()="</xsl:text> + <xsl:value-of select='m:fault/m:contentModel/@localName'/>" and namespace-uri()="<xsl:value-of select='m:fault/m:contentModel/@namespace'/>"]</assertion> + </xsl:if> + </xsl:when> + <xsl:when test='m:messageContentModel/@type="#none" or (@type="request" and m:httpInputSerialization="application/x-www-form-urlencoded")'> + <assertion>count(<xsl:value-of select='$msg'/>/l:content/*)=0</assertion> + </xsl:when> <xsl:when test='m:messageContentModel/@type="#any"'> <!-- it's anything, just check the number. *************** *** 134,140 **** <xsl:when test='m:messageContentModel/@type="#other"'> </xsl:when> - <xsl:when test='m:messageContentModel/@type="#none"'> - <assertion>count(<xsl:value-of select='$msg'/>/l:content/*)=0</assertion> - </xsl:when> <xsl:when test='m:messageContentModel/@type="#element"'> <assertion>count(<xsl:value-of select='$msg'/>/l:content/*)=1</assertion> --- 153,156 ---- *************** *** 176,182 **** </xsl:when> <xsl:when test='m:fault'> - <!-- Unknown error code <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:StatusCode/@value='500'</assertion> - --> </xsl:when> <xsl:when test='m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-out"'> --- 192,196 ----
Received on Wednesday, 10 January 2007 19:24:56 UTC