hi,
 
I want to I want to encrypt SOAP Body of the message in the handler.
 
After encryption , message is as below. .i.e. Inside Envelope, only tag
is EncryptedData.
When I try to send message, I get  this  org.xml.sax.SAXException: No
custom elements allowed at top level until after the <body> tag
 
Is not having Body tag creating the problem ?
 
Encrypted Message
<?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";>

<xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Content";
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";>

<xenc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc";
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"/>

<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>

<xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";>

<xenc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#kw-tripledes";
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"/>

<xenc:CipherData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";>

<xenc:CipherValue xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";>

qKqH5Z3KvEQyk6/EwmoDO8ZwD9SCSpvtG5QDPStXo/Q= </xenc:CipherValue>

</xenc:CipherData>

</xenc:EncryptedKey>

</ds:KeyInfo>

<xenc:CipherData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";>

<xenc:CipherValue xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";>

nDdMT4s+NM2xn7X1nJG7dnPSaDy5xF6sFwVuZJ73ZGAgIHOuzXuSE5XObbVlz2FeVxHLsIjP
HaYs

YN/5fFPyz52Z93BK69WF7tuXazGro9t2/1ZxGQ+aEyJOE9BYJb3kcCQcMGXiKnO/sQUp7XQE
9IWX

lLLZWRW2KZ1xrVBMxncauwzNgepGo+KvQm4pQPMc/H7Dla8rowRozgQ6SevSn5AEdvICgsog
7jIG

XjXdS63jyoG2dlNYOE5Kz+b+K8FZYvIMg+xWp0ZtghYufFpv/ceYx/EZQveGxLVWm7Hsbw5c
fsL2

H+7q8TyynpxnM93+5Go+B4ty8fAGFcxm/gTYch3gOdn2AsW0VyvkDlg1R6D+NgA4h47JmZBK
QC/B

lxXpHhwDFtinvSMUEb6A7SANKLjH2INbzxRWs/X9y08K9d7AJ/cqq6qqAYTfXs1DxMfkSb9Q
xVUX

WDAOMQQGUXEiK4LV7399zwBqeJrC5v8t0ApRho1k2vHWFEASg1dIBbVLvv6Q4Od4qaGhVl4l
UPG/

qlRuTXg/S6tofyUB6YCIPyAqRjW6h79Lyxfp++EO6TQMk/gF2KmvR5/mkf63WyXXPzzYuamP
hTyF

Vzr+wB9kESsY4bUaXFAb6iZQwhC0gsj5NFDw10uJeN4E+0jbftuP2iTcHGcgNzmFEvVee3bS
HN7z

REzj3MP+VTU1aLpS9xdvTm1aGTmSdpQp7HxRAuB911RLNJshZzGzQolIdKlJLI8bIT8qvqvn
ILJH

6hM9Tzt185xXzRkHHky8ES7QQJ1nzeTlX7JFQZGaeB3rBT6bOYp0vM2TPTnVQVTDpFnW6fbc
8a66

fG//ovyQlRPdoq7TTEgmspFX9lwZyfAQUBDtYb/tAgFRLOAqMBvY+5xHPydwABsiJlebUFLD
TiSV

+JKLditp25mh5aTTOrg3J43cDIY= </xenc:CipherValue>

</xenc:CipherData>

</xenc:EncryptedData>

</soapenv:Envelope>


________________________________

From: Kedar Ambekar 
Sent: Friday, November 17, 2006 10:05 AM
To: [email protected]
Subject: Is this valid SOAP message ?


I want to encrypt SOAP Body of the message in the handler.
 


============================================================================================================================

Tech Mahindra, formerly Mahindra-British Telecom.
 
Disclaimer:

This message and the information contained herein is proprietary and 
confidential and subject to the Tech Mahindra policy statement, you may review 
at <a 
href="http://www.techmahindra.com/Disclaimer.html";>http://www.techmahindra.com/Disclaimer.html</a>
 externally and <a 
href="http://tim.techmahindra.com/Disclaimer.html";>http://tim.techmahindra.com/Disclaimer.html</a>
 internally within Tech Mahindra.

============================================================================================================================

Reply via email to