- From: Philippe Le Hegaret via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 09 Jan 2007 23:41:10 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/test-suite/results-messages
In directory hutz:/tmp/cvs-serv24692
Modified Files:
generate-xpath-assertions.xslt
Log Message:
Added handling for the HTTP-only binding
Index: generate-xpath-assertions.xslt
===================================================================
RCS file: /sources/public/2002/ws/desc/test-suite/results-messages/generate-xpath-assertions.xslt,v
retrieving revision 1.11
retrieving revision 1.12
diff -C 2 -d -r1.11 -r1.12
*** generate-xpath-assertions.xslt 9 Jan 2007 00:01:35 -0000 1.11
--- generate-xpath-assertions.xslt 9 Jan 2007 23:41:08 -0000 1.12
***************
*** 27,30 ****
--- 27,32 ----
<xsl:template match="m:message">
<assertionSet messagePosition='{@messagePosition}'>
+
+ <!-- Copy all information about a message -->
<xsl:for-each select='.'>
<xsl:copy>
***************
*** 33,38 ****
--- 35,116 ----
</xsl:for-each>
+ <!-- Now starts the generation of the XPath expressions -->
+
<xsl:variable name='msg'>/l:log/l:message[@number="<xsl:value-of select='@messagePosition'/>"]</xsl:variable>
<assertion><xsl:value-of select='$msg'/>/@type="<xsl:value-of select='@type' />"</assertion>
+
+ <!-- Tests common to HTTP and SOAP bindings -->
+ <xsl:if test='@type="request"'>
+ <xsl:if test='@type="request" and m:httpLocation'>
+ <assertion>contains(<xsl:value-of select='$msg'/>/l:httpHeaders/l:Method/@rawURI, "<xsl:value-of select='m:httpLocation'/>")</assertion>
+ </xsl:if>
+ </xsl:if>
+ <xsl:for-each select='m:httpHeader[@required="true"]'>
+ <assertion>
+ <xsl:value-of select='$msg'/>
+ <xsl:text>/l:httpHeaders/l:</xsl:text>
+ <xsl:value-of select='@name'/>
+ </assertion>
+ </xsl:for-each>
+ <!-- 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'/>
+ <xsl:text>/l:httpHeaders/l:Method/@value='</xsl:text>
+ <xsl:choose>
+ <xsl:when test='m:httpMethod'>
+ <xsl:value-of select='m:httpMethod'/>
+ </xsl:when>
+ <xsl:when test='m:safety="true"'>
+ <xsl:text>GET</xsl:text>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>POST</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>'</xsl:text></assertion>
+ </xsl:if>
+ <xsl:if test='@type="response"'>
+ <xsl:choose>
+ <xsl:when test='m:fault/m:httpErrorStatusCode[@type!="#any"]'>
+ <assertion><xsl:value-of select='$msg'/>
+ <xsl:text>/l:httpHeaders/l:StatusCode/@value='</xsl:text>
+ <!-- @@There could be more than one HTTP Error status code -->
+ <xsl:value-of select='m:fault/m:httpErrorStatusCode/@type'/>
+ <xsl:text>'</xsl:text></assertion>
+ </xsl:when>
+ <xsl:when test='m:fault/m:httpErrorStatusCode[@type="#any"]'>
+ <!-- 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"'>
+ <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:StatusCode/@value='200'</assertion>
+ </xsl:when>
+ <xsl:when test='m:operation/@mep="http://www.w3.org/2006/01/wsdl/in-only"'>
+ <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:StatusCode/@value='202'</assertion>
+ </xsl:when>
+ <xsl:when test='m:operation/@mep="http://www.w3.org/2006/01/wsdl/robust-in-only"'>
+ <assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:StatusCode/@value='204'</assertion>
+ </xsl:when>
+ </xsl:choose>
+ </xsl:if>
+ </xsl:if>
+ <!-- Tests specific to SOAP 1.2 bindings -->
<xsl:if test='m:soapVersion="1.2"'>
<xsl:if test='@type="request"'>
***************
*** 83,89 ****
<assertion><xsl:value-of select='$msg'/>/l:httpHeaders/l:Content-Type[@type='application/soap+xml']/l:action="<xsl:value-of select='m:soapAction'/>"</assertion>
</xsl:if>
- <xsl:if test='@type="request" and m:httpLocation'>
- <assertion>contains(<xsl:value-of select='$msg'/>/l:httpHeaders/l:Method/@rawURI, "<xsl:value-of select='m:httpLocation'/>")</assertion>
- </xsl:if>
<xsl:if test='m:fault'>
<assertion>count(<xsl:value-of select='$msg'/>/l:content/soap12:Envelope/soap12:Body/*)=1</assertion>
--- 161,164 ----
***************
*** 129,139 ****
<xsl:value-of select='@localName'/>" and namespace-uri()="<xsl:value-of select='@namespace'/>"]</assertion>
</xsl:for-each>
- <xsl:for-each select='m:httpHeader[@required="true"]'>
- <assertion>
- <xsl:value-of select='$msg'/>
- <xsl:text>/l:httpHeaders/l:</xsl:text>
- <xsl:value-of select='@name'/>
- </assertion>
- </xsl:for-each>
<xsl:if test='(@type="request"
and m:soapMep!="http://www.w3.org/2003/05/soap/mep/soap-response/")
--- 204,207 ----
Received on Tuesday, 9 January 2007 23:41:19 UTC