- From: Philippe Le Hegaret via cvs-syncmail <cvsmail@w3.org>
- Date: Sat, 18 Nov 2006 08:36:23 +0000
- To: public-ws-desc-eds@w3.org
Update of /sources/public/2002/ws/desc/test-suite/results-messages
In directory hutz:/tmp/cvs-serv15049
Modified Files:
generate-xpath-assertions-soap.xslt
Log Message:
Removed
Index: generate-xpath-assertions-soap.xslt
===================================================================
RCS file: /sources/public/2002/ws/desc/test-suite/results-messages/generate-xpath-assertions-soap.xslt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** generate-xpath-assertions-soap.xslt 16 Nov 2006 23:40:12 -0000 1.2
--- generate-xpath-assertions-soap.xslt 18 Nov 2006 08:36:20 -0000 1.3
***************
*** 37,56 ****
<xsl:variable name='soapMep'>
<xsl:call-template name='lsoap:getSoapMEP'>
! <xsl:with-param name='interfaceMessageReferenceComponent' select='$interfaceMessageReferenceComponent'/>
<xsl:with-param name='bindingComponent' select='$bindingComponent'/>
</xsl:call-template>
</xsl:variable>
- <xsl:choose>
- <xsl:when test='$bindingComponent/cmsoap:soapBindingExtension/cmsoap:soapUnderlyingProtocol="http://www.w3.org/2003/05/soap/bindings/HTTP/"'>
- </xsl:when>
- <xsl:when test='$bindingComponent/cmsoap:soapBindingExtension/cmsoap:soapUnderlyingProtocol="http://www.w3.org/2006/01/soap11/bindings/HTTP/"'>
- </xsl:when>
- <xsl:otherwise>
- <xsl:message>Unknown underlying protocol <xsl:value-of select='$bindingComponent/cmsoap:soapBindingExtension/cmsoap:soapUnderlyingProtocol'/></xsl:message>
- </xsl:otherwise>
- </xsl:choose>
-
-
<xsl:if test='$bindingComponent/cmsoap:soapBindingExtension/cmsoap:soapUnderlyingProtocol="http://www.w3.org/2003/05/soap/bindings/HTTP/"
or $bindingComponent/cmsoap:soapBindingExtension/cmsoap:soapUnderlyingProtocol="http://www.w3.org/2006/01/soap11/bindings/HTTP"'>
--- 37,45 ----
<xsl:variable name='soapMep'>
<xsl:call-template name='lsoap:getSoapMEP'>
! <xsl:with-param name='interfaceOperationComponent' select='$interfaceMessageReferenceComponent/../..'/>
<xsl:with-param name='bindingComponent' select='$bindingComponent'/>
</xsl:call-template>
</xsl:variable>
<xsl:if test='$bindingComponent/cmsoap:soapBindingExtension/cmsoap:soapUnderlyingProtocol="http://www.w3.org/2003/05/soap/bindings/HTTP/"
or $bindingComponent/cmsoap:soapBindingExtension/cmsoap:soapUnderlyingProtocol="http://www.w3.org/2006/01/soap11/bindings/HTTP"'>
***************
*** 108,118 ****
<xsl:with-param name='logMessage' select='$logMessage'/>
</xsl:call-template>
- <xsl:call-template name='lsoap:checkSoapBody'>
- <xsl:with-param name='interfaceMessageReferenceComponent' select='$interfaceMessageReferenceComponent'/>
- <xsl:with-param name='bindingComponent' select='$bindingComponent'/>
- <xsl:with-param name='bindingOperationComponent' select='$bindingOperationComponent'/>
- <xsl:with-param name='soapMep' select='$soapMep'/>
- <xsl:with-param name='logMessage' select='$logMessage'/>
- </xsl:call-template>
</xsl:when>
<xsl:when test='$method="GET"'>
--- 97,100 ----
***************
*** 142,146 ****
<xsl:template name='lsoap:getSoapMEP'>
! <xsl:param name='interfaceMessageReferenceComponent'/>
<xsl:param name='bindingComponent'/>
--- 124,128 ----
<xsl:template name='lsoap:getSoapMEP'>
! <xsl:param name='interfaceOperationComponent'/>
<xsl:param name='bindingComponent'/>
***************
*** 152,161 ****
<xsl:choose>
! <xsl:when test='$interfaceMessageReferenceComponent/../../cm:messageExchangePattern="http://www.w3.org/2006/01/wsdl/in-out"
! or $interfaceMessageReferenceComponent/../../cm:messageExchangePattern="http://www.w3.org/2006/01/wsdl/in-only"
! or $interfaceMessageReferenceComponent/../../cm:messageExchangePattern="http://www.w3.org/2006/01/wsdl/robust-in-only"'>
<xsl:variable name='bindingOperationComponent'
! select='$bindingComponent/cm:bindingOperations/cm:bindingOperationComponent[cm:interfaceOperation[@ref=$interfaceMessageReferenceComponent/../../@xml:id]]' />
<xsl:choose>
--- 134,143 ----
<xsl:choose>
! <xsl:when test='$interfaceOperationComponent/cm:messageExchangePattern="http://www.w3.org/2006/01/wsdl/in-out"
! or $interfaceOperationComponent/cm:messageExchangePattern="http://www.w3.org/2006/01/wsdl/in-only"
! or $interfaceOperationComponent/cm:messageExchangePattern="http://www.w3.org/2006/01/wsdl/robust-in-only"'>
<xsl:variable name='bindingOperationComponent'
! select='$bindingComponent/cm:bindingOperations/cm:bindingOperationComponent[cm:interfaceOperation[@ref=$interfaceOperationComponent/@xml:id]]' />
<xsl:choose>
***************
*** 173,177 ****
<xsl:otherwise>
<xsl:text>@@</xsl:text>
! <xsl:value-of select='$interfaceMessageReferenceComponent/../../cm:messageExchangePattern'/>
</xsl:otherwise>
</xsl:choose>
--- 155,159 ----
<xsl:otherwise>
<xsl:text>@@</xsl:text>
! <xsl:value-of select='$interfaceOperationComponent/cm:messageExchangePattern'/>
</xsl:otherwise>
</xsl:choose>
***************
*** 225,252 ****
</xsl:variable>
- <xsl:if test='$debug'>
- <xsl:variable name='operationId' select='string($interfaceMessageReferenceComponent/../../@xml:id)' />
-
- <xsl:message>
- <xsl:text>
- Binding </xsl:text>
- <xsl:value-of select='$bindingComponent/cm:name/cmbase:namespaceName'/>
- <xsl:text>{</xsl:text>
- <xsl:value-of select='$bindingComponent/cm:name/cmbase:localName'/>
- <xsl:text>}
- Operation </xsl:text>
- <xsl:value-of select='$interfaceMessageReferenceComponent/../../cm:name/cmbase:namespaceName'/>
- <xsl:text>{</xsl:text>
- <xsl:value-of select='$interfaceMessageReferenceComponent/../../cm:name/cmbase:localName'/>
- <xsl:text>}
- WSDL MEP: </xsl:text>
- <xsl:value-of select='$interfaceMessageReferenceComponent/../../cm:messageExchangePattern' /><xsl:text>
- SOAP MEP: </xsl:text>
- <xsl:value-of select='$soapMep'/><xsl:text>
- HTTP Method: </xsl:text>
- <xsl:value-of select='$method'/>
- </xsl:message>
- </xsl:if>
-
<xsl:call-template name='generate-assertion'>
<xsl:with-param name='xpath'>
--- 207,210 ----
***************
*** 304,308 ****
<xsl:if test='not($direction="in" and $soapMep="http://www.w3.org/2003/05/soap/mep/soap-response/")'>
- <xsl:comment>Is the proper HTTP Content Type used?</xsl:comment>
<xsl:call-template name='generate-assertion'>
<xsl:with-param name='xpath'>
--- 262,265 ----
***************
*** 344,354 ****
<xsl:if test='$direction="in" and $bindingOperationComponent/cmsoap:soapBindingOperationExtension/cmsoap:soapAction'>
- <xsl:comment>Is the proper HTTP SOAP Action used?</xsl:comment>
- <xsl:if test='$debug'>
- <xsl:message><xsl:text>
- SOAP Action: </xsl:text>
- <xsl:value-of select='$bindingOperationComponent/cmsoap:soapBindingOperationExtension/cmsoap:soapAction'/>
- </xsl:message>
- </xsl:if>
<xsl:call-template name='generate-assertion'>
<xsl:with-param name='xpath'>
--- 301,304 ----
***************
*** 387,392 ****
<xsl:if test='not($direction="in" and $soapMep="http://www.w3.org/2003/05/soap/mep/soap-response/")'>
- <xsl:comment>Is the proper SOAP Envelope used?</xsl:comment>
-
<xsl:call-template name='generate-assertion'>
<xsl:with-param name='xpath'>
--- 337,340 ----
***************
*** 436,573 ****
</xsl:choose>
</xsl:variable>
- <xsl:variable name='bindingMessageReferenceComponent'
- select='$bindingOperationComponent/cm:bindingMessageReferences/cm:bindingMessageReferenceComponent[cm:interfaceMessageReference[@ref=$interfaceMessageReferenceComponent/@xml:id]]'/>
- <xsl:if test='$bindingMessageReferenceComponent/cmsoap:soapBindingMessageReferenceExtension/cmsoap:soapHeaders'>
- <p style='color: red'>Need to check <xsl:value-of select='$headers'/></p>
- </xsl:if>
</xsl:template>
- <xsl:template name='lsoap:checkSoapBody'>
- <xsl:param name='interfaceMessageReferenceComponent'/>
- <xsl:param name='bindingComponent'/>
- <xsl:param name='bindingOperationComponent'/>
- <xsl:param name='soapMep' />
- <xsl:param name='logMessage'/>
-
- <xsl:variable name='isFault' select='local-name($interfaceMessageReferenceComponent)="interfaceFaultReferenceComponent"'/>
- <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
- <xsl:variable name='msgCModel' select='$interfaceMessageReferenceComponent/cm:messageContentModel'/>
- <xsl:variable name='soapVersion'>
- <xsl:call-template name='lsoap:getSoapVersion'>
- <xsl:with-param name='bindingComponent' select='$bindingComponent'/>
- </xsl:call-template>
- </xsl:variable>
-
- <!-- Construct the path to the soap body -->
- <xsl:variable name='body'>
- <xsl:value-of select='$logMessage'/>
- <xsl:choose>
- <xsl:when test='$soapVersion="1.2"'>
- <xsl:text>/l:content/soap12:Envelope/soap12:Body</xsl:text>
- </xsl:when>
- <xsl:when test='$soapVersion="1.1"'>
- <xsl:text>/l:content/soap11:Envelope/soap11:Body</xsl:text>
- </xsl:when>
- <xsl:when test='$soapVersion="unknown"'>
- </xsl:when>
- </xsl:choose>
- </xsl:variable>
-
- <xsl:if test='not($direction="in" and $soapMep="http://www.w3.org/2003/05/soap/mep/soap-response/")'>
-
- <!-- check that we have the number of elements within the Body
- as well as the right root element
- -->
- <xsl:comment>Do we have the appropriate number of elements in the Body?</xsl:comment>
- <xsl:choose>
- <xsl:when test='$isFault'>
- <xsl:call-template name='generate-assertion'>
- <xsl:with-param name='xpath'>
- <xsl:text>count(</xsl:text>
- <xsl:value-of select='$body'/>
- <xsl:text>/*) = 1</xsl:text> </xsl:with-param>
- <xsl:with-param name='description'>The SOAP Body MUST have one element</xsl:with-param>
- </xsl:call-template>
-
-
- <xsl:comment>Is the proper element used in the SOAP Body?</xsl:comment>
- <xsl:call-template name='generate-assertion'>
- <xsl:with-param name='xpath'>
- <xsl:value-of select='$body'/>
- <xsl:text>/*[local-name()='Fault' and namespace-uri()='http://www.w3.org/2003/05/soap-envelope']</xsl:text>
- </xsl:with-param>
- <xsl:with-param name='description'>The SOAP Body content MUST contain an element of the proper type</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test='$msgCModel="#any"'>
- <!-- it's anything, just check the number.
- is it really one or can it be more?
- -->
- <xsl:call-template name='generate-assertion'>
- <xsl:with-param name='xpath'>
- <xsl:text>count(</xsl:text>
- <xsl:value-of select='$body'/>
- <xsl:text>/*) = 1</xsl:text> </xsl:with-param>
- <xsl:with-param name='description'>The message MUST have one element</xsl:with-param>
- </xsl:call-template>
-
- </xsl:when>
- <xsl:when test='$msgCModel="#other"'>
- <!-- it's nothing or something
- is it really one or can it be more?
- -->
- <xsl:call-template name='generate-assertion'>
- <xsl:with-param name='xpath'>
- <xsl:value-of select='$body'/> </xsl:with-param>
- <xsl:with-param name='description'>The message MUST use the proper SOAP Body</xsl:with-param>
- </xsl:call-template>
-
- </xsl:when>
- <xsl:when test='$msgCModel="#none"'>
- <xsl:call-template name='generate-assertion'>
- <xsl:with-param name='xpath'>
- <xsl:text>count(</xsl:text>
- <xsl:value-of select='$body'/>
- <xsl:text>/*) = 0</xsl:text> </xsl:with-param>
- <xsl:with-param name='description'>The SOAP Body MUST must be empty</xsl:with-param>
- </xsl:call-template>
-
- </xsl:when>
- <xsl:when test='$msgCModel="#element"'>
- <xsl:variable name='elRef' select='key("xmlId", $interfaceMessageReferenceComponent/cm:elementDeclaration/@ref)'/>
-
- <xsl:call-template name='generate-assertion'>
- <xsl:with-param name='xpath'>
- <xsl:text>count(</xsl:text>
- <xsl:value-of select='$body'/>
- <xsl:text>/*) = 1</xsl:text> </xsl:with-param>
- <xsl:with-param name='description'>The SOAP Body MUST have one element</xsl:with-param>
- </xsl:call-template>
-
-
- <xsl:comment>Is the proper element used in the SOAP Body?</xsl:comment>
- <xsl:call-template name='generate-assertion'>
- <xsl:with-param name='xpath'>
- <xsl:value-of select='$body'/>
- <xsl:text>/*[local-name()='</xsl:text>
- <xsl:value-of select='$elRef/cm:name/cmbase:localName'/>
- <xsl:text>' and namespace-uri()='</xsl:text>
- <xsl:value-of select='$elRef/cm:name/cmbase:namespaceName'/>
- <xsl:text>']</xsl:text> </xsl:with-param>
- <xsl:with-param name='description'>The SOAP Body content MUST contain an element of the proper type</xsl:with-param>
- </xsl:call-template>
-
- </xsl:when>
- <xsl:otherwise>
- <xsl:call-template name='generate-assertion'>
- <xsl:with-param name='xpath'>
- <xsl:text>@@invalidMessageContentModel</xsl:text> </xsl:with-param>
- </xsl:call-template>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:if>
-
- </xsl:template>
-
</xsl:stylesheet>
--- 384,389 ----
Received on Saturday, 18 November 2006 08:36:26 UTC