javajoemorgan Posted March 17, 2008 Share Posted March 17, 2008 I've tried a thousand things... but can't find what I'm missing.... I have an incoming SOAP message, and it is using WS-Security. I wan't to see of the wsse:Password Type parameter contains "PasswordDigest". How do I write the <xsl:if>???Here is a sample of the message: <soapenv:Envelope xmlns:cat="http://removed/2006/services/exploris/category" xmlns:com="http://removed/2006/types/commonPart" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" > <soapenv:Header> <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsse:UsernameToken wsu:Id="UsernameToken-18357747" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"> <wsse:Username>KingKong</wsse:Username> <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">hl4gIM5wHfgCJcdDWYtBh3QCnag=</wsse:Password> <wsse:Nonce>Wr2g4z0vkTnflocncsbLww==</wsse:Nonce> <wsu:Created>2008-03-17T16:19:50.718Z</wsu:Created> </wsse:UsernameToken> </wsse:Security> </soapenv:Header> <soapenv:Body> ..... doesn't matter </soapenv:Body></soapenv:Envelope> Link to comment Share on other sites More sharing options...
boen_robot Posted March 17, 2008 Share Posted March 17, 2008 Something like: <xsl:if test="contains(wsse:Password/@Type, 'PasswordDigest')"> if you want to check that 'PasswordDigest' appears anywhere. If you're sure that 'PasswordDigest' will appear as an ID, I'd suggest using <xsl:if test="contains(wsse:Password/@Type, '#PasswordDigest')"> to avoid cases where 'PasswordDigest' may be present at another part of the URL. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.