W3C home > Mailing lists > Public > public-ws-desc-eds@w3.org > November 2006

2002/ws/desc/test-suite/results-messages generate-xpath-assertions-soap.xslt,1.1,1.2

From: Philippe Le Hegaret via cvs-syncmail <cvsmail@w3.org>
Date: Thu, 16 Nov 2006 23:40:14 +0000
To: public-ws-desc-eds@w3.org
Message-Id: <E1Gkqq6-0005Ns-Iv@lionel-hutz.w3.org>

Update of /sources/public/2002/ws/desc/test-suite/results-messages
In directory hutz:/tmp/cvs-serv20648

Modified Files:
	generate-xpath-assertions-soap.xslt 
Log Message:
Better handling of faults
in-only and robust-in-only support


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.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** generate-xpath-assertions-soap.xslt	16 Nov 2006 15:10:56 -0000	1.1
--- generate-xpath-assertions-soap.xslt	16 Nov 2006 23:40:12 -0000	1.2
***************
*** 24,28 ****
    <xsl:key name='xmlId' match='*' use='@xml:id'/>
  
!   <xsl:variable name='debug' select='0' />
  
    <xsl:template name='lsoap:checkSoap'>
--- 24,28 ----
    <xsl:key name='xmlId' match='*' use='@xml:id'/>
  
!   <xsl:variable name='debug' select='1' />
  
    <xsl:template name='lsoap:checkSoap'>
***************
*** 33,36 ****
--- 33,45 ----
      <xsl:param name='logMessage'/>
  
+     <xsl:variable name='bindingOperationComponent'
+ 		  select='$bindingComponent/cm:bindingOperations/cm:bindingOperationComponent[cm:interfaceOperation[@ref=$interfaceMessageReferenceComponent/../../@xml:id]]' />
+     <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/"'>
***************
*** 43,46 ****
--- 52,56 ----
      </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"'>
***************
*** 49,52 ****
--- 59,64 ----
  	<xsl:with-param name='endpointComponent' select='$endpointComponent'/>
  	<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>
***************
*** 56,59 ****
--- 68,73 ----
  	<xsl:with-param name='endpointComponent' select='$endpointComponent'/>
  	<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>
***************
*** 63,66 ****
--- 77,82 ----
  	<xsl:with-param name='endpointComponent' select='$endpointComponent'/>
  	<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>
***************
*** 71,74 ****
--- 87,91 ----
  	<xsl:with-param name='interfaceMessageReferenceComponent' select='$interfaceMessageReferenceComponent'/>
  	<xsl:with-param name='bindingComponent' select='$bindingComponent'/>
+ 	<xsl:with-param name='soapMep'  select='$soapMep'/>
        </xsl:call-template>
      </xsl:variable>
***************
*** 80,95 ****
  	  <xsl:with-param name='interfaceMessageReferenceComponent' select='$interfaceMessageReferenceComponent'/>
  	  <xsl:with-param name='bindingComponent' select='$bindingComponent'/>
  	  <xsl:with-param name='logMessage' select='$logMessage'/>
  	</xsl:call-template>
- 	<xsl:if test='$bindingComponent/cmsoap:soapBindingMessageReferenceExtension/cmsoap:soapHeaders'>
- 	  <xsl:call-template name='lsoap:checkSoapHeaders'>
- 	    <xsl:with-param name='interfaceMessageReferenceComponent' select='$interfaceMessageReferenceComponent'/>
- 	    <xsl:with-param name='bindingComponent' select='$bindingComponent'/>
- 	    <xsl:with-param name='logMessage' select='$logMessage'/>
- 	  </xsl:call-template>
- 	</xsl:if>
  	<xsl:call-template name='lsoap:checkSoapBody'>
  	  <xsl:with-param name='interfaceMessageReferenceComponent' select='$interfaceMessageReferenceComponent'/>
  	  <xsl:with-param name='bindingComponent' select='$bindingComponent'/>
  	  <xsl:with-param name='logMessage' select='$logMessage'/>
  	</xsl:call-template>
--- 97,116 ----
  	  <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:call-template name='lsoap:checkSoapHeaders'>
+ 	  <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: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>
***************
*** 108,112 ****
    </xsl:template>
  
- 
    <xsl:template name='lsoap:getSoapVersion'>
      <xsl:param name='bindingComponent'/>
--- 129,132 ----
***************
*** 131,143 ****
      </xsl:variable>
  
-     <xsl:variable name='operationId' select='string($interfaceMessageReferenceComponent/@xml:id)' />
- 
      <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:choose>
! 	  <xsl:when test='$bindingComponent/cm:bindingOperations/cm:bindingOperationComponent[cm:interfaceOperation[@ref=$operationId]]/cmsoap:soapBindingOperationExtension/cmsoap:soapMep'>
! 	    <xsl:value-of select='$bindingComponent/cm:bindingOperations/cm:bindingOperationComponent[cm:interfaceOperation[@ref=$operationId]]/cmsoap:soapBindingOperationExtension/cmsoap:soapMep'/>
  	  </xsl:when>
  	  <xsl:when test='$bindingComponent/cmsoap:soapBindingExtension/cmsoap:soapMepDefault'>
--- 151,165 ----
      </xsl:variable>
  
      <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>
! 	  <xsl:when test='$bindingOperationComponent/cmsoap:soapBindingOperationExtension/cmsoap:soapMep'>
! 	    <xsl:value-of select='$bindingOperationComponent/cmsoap:soapBindingOperationExtension/cmsoap:soapMep'/>
  	  </xsl:when>
  	  <xsl:when test='$bindingComponent/cmsoap:soapBindingExtension/cmsoap:soapMepDefault'>
***************
*** 159,170 ****
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
  
      <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
-     <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:variable name='soapVersion'>
        <xsl:call-template name='lsoap:getSoapVersion'>
--- 181,187 ----
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
+     <xsl:param name='soapMep'/>
  
      <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
      <xsl:variable name='soapVersion'>
        <xsl:call-template name='lsoap:getSoapVersion'>
***************
*** 190,202 ****
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
      <xsl:param name='logMessage'/>
  
      <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
-     <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:variable name='soapVersion'>
        <xsl:call-template name='lsoap:getSoapVersion'>
--- 207,215 ----
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
+     <xsl:param name='bindingOperationComponent'/>
+     <xsl:param name='soapMep' />
      <xsl:param name='logMessage'/>
  
      <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
      <xsl:variable name='soapVersion'>
        <xsl:call-template name='lsoap:getSoapVersion'>
***************
*** 208,217 ****
  	<xsl:with-param name='interfaceMessageReferenceComponent' select='$interfaceMessageReferenceComponent'/>
  	<xsl:with-param name='bindingComponent' select='$bindingComponent'/>
        </xsl:call-template>
      </xsl:variable>
  
      <xsl:if test='$debug'>
      <xsl:message>
!       <xsl:text>INFORMATION: Binding </xsl:text>
        <xsl:value-of select='$bindingComponent/cm:name/cmbase:namespaceName'/>
        <xsl:text>{</xsl:text>
--- 221,234 ----
  	<xsl:with-param name='interfaceMessageReferenceComponent' select='$interfaceMessageReferenceComponent'/>
  	<xsl:with-param name='bindingComponent' select='$bindingComponent'/>
+ 	<xsl:with-param name='soapMep'  select='$soapMep'/>
        </xsl:call-template>
      </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>
***************
*** 226,230 ****
        <xsl:value-of select='$interfaceMessageReferenceComponent/../../cm:messageExchangePattern' /><xsl:text>
        SOAP MEP: </xsl:text>
!     <xsl:value-of select='$soapMep'/></xsl:message> 
      </xsl:if>
  
--- 243,250 ----
        <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>
  
***************
*** 237,243 ****
  	    <xsl:text>/l:Method[@value='</xsl:text><xsl:value-of select='$method'/><xsl:text>']</xsl:text>
  	  </xsl:when>
! 	  <xsl:when test='$direction="out"'>
  	    <xsl:text>/l:StatusCode[@value='200']</xsl:text>
  	  </xsl:when>
  	  <xsl:otherwise>
  	    <xsl:text>@@InvalidDirection</xsl:text>
--- 257,273 ----
  	    <xsl:text>/l:Method[@value='</xsl:text><xsl:value-of select='$method'/><xsl:text>']</xsl:text>
  	  </xsl:when>
! 	  <xsl:when test='$direction="out"
! 			  and local-name($interfaceMessageReferenceComponent)="interfaceFaultReferenceComponent"'>
! 	    <xsl:text>/l:StatusCode[@value='500']</xsl:text>
! 	  </xsl:when>
! 	  <xsl:when test='$direction="out"
! 			  and $interfaceMessageReferenceComponent/../../cm:messageExchangePattern ="http://www.w3.org/2006/01/wsdl/in-out"'>
  	    <xsl:text>/l:StatusCode[@value='200']</xsl:text>
  	  </xsl:when>
+ 	  <xsl:when test='$direction="out"
+ 			  and ($interfaceMessageReferenceComponent/../../cm:messageExchangePattern ="http://www.w3.org/2006/01/wsdl/robust-in-only"
+ 			       or $interfaceMessageReferenceComponent/../../cm:messageExchangePattern ="http://www.w3.org/2006/01/wsdl/in-only")'>
+ 	    <xsl:text>/l:StatusCode[@value='202']</xsl:text>
+ 	  </xsl:when>
  	  <xsl:otherwise>
  	    <xsl:text>@@InvalidDirection</xsl:text>
***************
*** 261,272 ****
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
      <xsl:param name='logMessage'/>
      <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
-     <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:variable name='soapVersion'>
--- 291,299 ----
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
+     <xsl:param name='bindingOperationComponent'/>
+     <xsl:param name='soapMep' />
      <xsl:param name='logMessage'/>
+ 
      <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
  
      <xsl:variable name='soapVersion'>
***************
*** 289,294 ****
  	      <xsl:text>'text/xml'</xsl:text>
  	    </xsl:when>
! 	    <xsl:when test='$soapVersion="unknown"'>
! 	    </xsl:when>
  	  </xsl:choose>
  	</xsl:with-param>
--- 316,324 ----
  	      <xsl:text>'text/xml'</xsl:text>
  	    </xsl:when>
! 	    <xsl:otherwise>
! 	      <xsl:text>'</xsl:text>
! 	      <xsl:value-of select='$soapVersion' />
! 	      <xsl:text>'</xsl:text>
! 	    </xsl:otherwise>
  	  </xsl:choose>
  	</xsl:with-param>
***************
*** 301,304 ****
--- 331,336 ----
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
+     <xsl:param name='bindingOperationComponent'/>
+     <xsl:param name='soapMep' />
      <xsl:param name='logMessage'/>
  
***************
*** 311,330 ****
      </xsl:variable>
  
!     <xsl:if test='$direction="in" and $bindingComponent/cmsoap:soapBindingOperationExtension/cmsoap:soapAction'>
        <xsl:comment>Is the proper HTTP SOAP Action used?</xsl:comment>
        <xsl:call-template name='generate-assertion'>
  	<xsl:with-param name='xpath'>
  	  <xsl:value-of select='$logMessage'/>
! 	  <xsl:text>/l:httpHeaders/l:SOAPAction = '</xsl:text>
! 	  <xsl:if test='$soapVersion="1.1"'>
! 	    <xsl:text>"</xsl:text>
! 	  </xsl:if>
! 	  <xsl:value-of select='$bindingComponent/cmsoap:soapBindingOperationExtension/cmsoap:soapAction'/>
! 	  <xsl:if test='$soapVersion="1.1"'>
! 	    <xsl:text>"</xsl:text>
! 	  </xsl:if>
! 	  <xsl:text>'</xsl:text>
  	</xsl:with-param>
! 	<xsl:with-param name='description'>The message MUST use the proper SOAPAction HTTP Header</xsl:with-param>
        </xsl:call-template>
      </xsl:if>
--- 343,371 ----
      </xsl:variable>
  
!     <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'>
  	  <xsl:value-of select='$logMessage'/>
! 	  <xsl:choose>
! 	    <xsl:when test='$soapVersion="1.2"'>
! 	      <xsl:text>/l:httpHeaders/l:Content-Type[@type='application/soap+xml']/l:action = '"</xsl:text>
! 	      <xsl:value-of select='$bindingOperationComponent/cmsoap:soapBindingOperationExtension/cmsoap:soapAction'/>
! 	      <xsl:text>"'</xsl:text>
! 	    </xsl:when>
! 	    <xsl:when test='$soapVersion="1.1"'>
! 	      <xsl:text>/l:httpHeaders/l:SOAPAction = '"</xsl:text>
! 	      <xsl:value-of select='$bindingOperationComponent/cmsoap:soapBindingOperationExtension/cmsoap:soapAction'/>
! 	      <xsl:text>"'</xsl:text>
! 	    </xsl:when>
! 	  </xsl:choose>
  	</xsl:with-param>
! 	<xsl:with-param name='description'>The message MUST use the proper SOAP Action</xsl:with-param>
        </xsl:call-template>
      </xsl:if>
***************
*** 334,346 ****
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
      <xsl:param name='logMessage'/>
  
      <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
-     <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:variable name='soapVersion'>
        <xsl:call-template name='lsoap:getSoapVersion'>
--- 375,383 ----
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
+     <xsl:param name='bindingOperationComponent'/>
+     <xsl:param name='soapMep' />
      <xsl:param name='logMessage'/>
  
      <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
      <xsl:variable name='soapVersion'>
        <xsl:call-template name='lsoap:getSoapVersion'>
***************
*** 374,385 ****
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
      <xsl:param name='logMessage'/>
  
-     <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:variable name='msgCModel' select='$interfaceMessageReferenceComponent/cm:messageContentModel'/>
      <xsl:variable name='soapVersion'>
--- 411,418 ----
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
+     <xsl:param name='bindingOperationComponent'/>
+     <xsl:param name='soapMep' />
      <xsl:param name='logMessage'/>
  
      <xsl:variable name='msgCModel' select='$interfaceMessageReferenceComponent/cm:messageContentModel'/>
      <xsl:variable name='soapVersion'>
***************
*** 403,409 ****
        </xsl:choose>
      </xsl:variable>
! 
!     <xsl:message><xsl:text>Need to check </xsl:text><xsl:value-of select='$headers'/><xsl:text>
! </xsl:text></xsl:message>
      
    </xsl:template>
--- 436,444 ----
        </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>
***************
*** 412,424 ****
      <xsl:param name='interfaceMessageReferenceComponent'/>
      <xsl:param name='bindingComponent'/>
      <xsl:param name='logMessage'/>
  
      <xsl:variable name='direction' select='$interfaceMessageReferenceComponent/cm:direction'/>
-     <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:variable name='msgCModel' select='$interfaceMessageReferenceComponent/cm:messageContentModel'/>
      <xsl:variable name='soapVersion'>
--- 447,456 ----
      <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'>
***************
*** 450,453 ****
--- 482,504 ----
        <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.
Received on Thursday, 16 November 2006 23:41:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:32:23 UTC