Hi Vishal,
  Is there anyway I can bypass this problem?
Thanks,
Prakasa

At 02:40 PM 2/18/2005 +0530, Vishal Mahajan wrote:
Hi Prakasa,

This happens because the encryption code internally uses a canonicalization-based serializer. During canonicalization the namespace attributes are cascaded down the root node.

Vishal

Prakasa Nedunuri wrote:
Hi,
  I am trying to encrypt and decrypt SOAP body using xmlsec library.
Before encrypting, my original SOAP message is

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <StockQuoteRequest xmlns="http://stockservice.contoso.com/wse/samples/2003/06">
        <symbols>
                <Symbol>FABRIKAM</Symbol>
                <Symbol>CONSTOSO</Symbol>
        </symbols>
        <symbols1>
                <Symbol>CSCO</Symbol>
                <Symbol>JNPR</Symbol>
        </symbols1>
        <symbols2>
                <Symbol>ttt</Symbol>
                <Symbol>ppp</Symbol>
        </symbols2>
   </StockQuoteRequest>
  </soapenv:Body>
</soapenv:Envelope>

However, after I decrypt the message, I see that StockQuoteRequest element has additional namespaces which are
not present in the original message before encrypting.
 <StockQuoteRequest xmlns="http://stockservice.contoso.com/wse/samples/2003/06" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<symbols>
<Symbol>FABRIKAM</Symbol>
<Symbol>CONSTOSO</Symbol>
</symbols>
        <symbols1>
<Symbol>CSCO</Symbol>
<Symbol>JNPR</Symbol>
</symbols1>
<symbols2>
<Symbol>ttt</Symbol>
<Symbol>ppp</Symbol>
</symbols2>
   </StockQuoteRequest>

Any reason why the additional namespaces are getting added to StockQuoteRequest element?
Anyway I can retain the original message without having these namespaces getting added.

Thanks,
Prakasa

Reply via email to