Alex, all

just checked in a small modification to the WSDoAllSender Axis driver
to enable the definiton of a "Null" namespace. Taken your example below
pls use:

<parameter name="encryptionParts" value="{Content}{Null}strOut1"/>

to signal an absent namespace. The special name is case
sensitive. ALex, can you give it a try pls. TIA

Regards,
Werner



JabberW schrieb:

Davanum, Werner, hi.
I faced a problem with a partial encryption:
Say, the WSDL contains a elementFormDefault="unqualified" schema
definition, so the resulting SOAP will be smth like
---------
<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>
<ns1:testMeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:ns1="http://ws.sess";>
<testMeReturn xsi:type="ns2:OutputInfo" xmlns:ns2="http://datainfo";>
<strOut1 xsi:type="xsd:string">string_one</strOut1>
<strOut2 xsi:type="xsd:string">string_two</strOut2>
</testMeReturn>
</ns1:testMeResponse>
</soapenv:Body></soapenv:Envelope>
---------
It seems impossible to define partial encryption for any of strOut1/strOut2:
the namespace of real elements in this case of unqualified is null (in
call stack WSEncryptBody.doEncryption()->
WSSecurityUtil.findElement()), while the handler configuration
<parameter name="encryptionParts" value="{Content}{}strOut1"/>
supposes the SOAP namespace for empty namespace, as it described in
javadoc of WSHandlerConstants.ENCRYPTION_PARTS. So, it just does not
find the element to be encrypted and fails:
faultString: WSDoAllSender: Encryption: error during message processingorg.apache.ws.security.WSSecurityException: General
security error
(WSEncryptBody/WSSignEnvelope: Element to encrypt/sign not found: {http://schemas.xmlsoap.org/soap/envelope/}strOut1)



Is this behaviour is intended one?

Sincerely,
have a good day,
Alex.






Reply via email to