Hi, Aleksey!<br><br>Can xmlsec work with WS-I compliant templates?<br>For example, i tried to encrypt message with the follwoing template but was not succeeded:<br><br>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br>
&lt;wsse:Security xmlns:wsse=&#39;<a href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd</a>&#39;<br>               xmlns:wsu=&#39;<a href="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd</a>&#39; <br>
               xmlns:xenc=&#39;<a href="http://www.w3.org/2001/04/xmlenc#">http://www.w3.org/2001/04/xmlenc#</a>&#39; <br>               xmlns:ds=&#39;<a href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>&#39; &gt;<br>
  &lt;xenc:EncryptedKey&gt;<br>    &lt;xenc:EncryptionMethod Algorithm=&#39;<a href="http://www.w3.org/2001/04/xmlenc#rsa-1_5">http://www.w3.org/2001/04/xmlenc#rsa-1_5</a>&#39; /&gt;<br>    &lt;ds:KeyInfo xmlns:ds=&quot;<a href="http://www.w3.org/2000/09/xmldsig#">http://www.w3.org/2000/09/xmldsig#</a>&quot;&gt;<br>
    &lt;ds:KeyName&gt;my-rsa-key&lt;/ds:KeyName&gt;<br>    &lt;/ds:KeyInfo&gt;<br>    &lt;xenc:CipherData&gt;<br>      &lt;xenc:CipherValue&gt;<br>      &lt;/xenc:CipherValue&gt;<br>    &lt;/xenc:CipherData&gt;<br>    &lt;xenc:ReferenceList&gt;<br>
      &lt;xenc:DataReference URI=&#39;#Enc1&#39; /&gt;<br>    &lt;/xenc:ReferenceList&gt;<br>  &lt;/xenc:EncryptedKey&gt;<br>  &lt;xenc:EncryptedData Id=&#39;Enc1&#39;&gt;<br>    &lt;xenc:EncryptionMethod Algorithm=&#39;<a href="http://www.w3.org/2001/04/xmlenc#aes256-cbc">http://www.w3.org/2001/04/xmlenc#aes256-cbc</a>&#39; /&gt;<br>
    &lt;xenc:CipherData&gt;<br>      &lt;xenc:CipherValue&gt;<br>      &lt;/xenc:CipherValue&gt;<br>    &lt;/xenc:CipherData&gt;<br>  &lt;/xenc:EncryptedData&gt;<br>&lt;/wsse:Security&gt;<br><br>The error was following:<br>
func=xmlSecEncCtxXmlEncrypt:file=xmlenc.c:line=417:obj=unknown:subj=unknown:error=14:invalid type:type=NULL<br>Error: failed to encrypt xml file &quot;./orig_content.xml&quot;<br>Error: failed to encrypt file with template &quot;./req__encryptedkey_before_encrypteddata_v.tmpl&quot;<br>
<br>This example I composed according to: <a href="http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html#EncryptedKey">http://www.ws-i.org/Profiles/BasicSecurityProfile-1.0.html#EncryptedKey</a><br><br>Thanks!<br><br>