Hello Ruchith,

I have attached the latest services.xml and policy.xml. 

The latest request and response are also pasted below.

I look forward to your analysis.

Thanks for your help!

Regards,
Manish Verma


>>>>>>>>>>>>>>>>> REQUEST <<<<<<<<<<<<<<<<<<<<<

POST /axis2/services/NoSecurityService HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:echo"
User-Agent: Axis2
Host: localhost:8000
Transfer-Encoding: chunked

f75
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";
xmlns:wsa="http://www.w3.org/2005/08/addressing";><soapenv:Header>
<wsse:Security
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd" soapenv:mustUnderstand="1"><wsu:Timestamp
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd"
wsu:Id="Timestamp-29715552"><wsu:Created>2007-11-19T12:22:44.000Z</wsu:Creat
ed><wsu:Expires>2007-11-19T12:27:44.000Z</wsu:Expires></wsu:Timestamp><xenc:
EncryptedKey Id="EncKeyId-12606779">
<xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5";
/>
<ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<wsse:SecurityTokenReference><wsse:KeyIdentifier
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-m
essage-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-toke
n-profile-1.0#X509SubjectKeyIdentifier">ENBEXCdWhIw/4wrQdCs8EyhNIxk=</wsse:K
eyIdentifier></wsse:SecurityTokenReference>
</ds:KeyInfo>
<xenc:CipherData><xenc:CipherValue>SMS81408wWyToKIc+9/ruEH88fV+xCvF4dJhVWRUk
Wmj6E5hQ7VmStJLcSG9I78kEJzXkDjD2RuTrKNETyZL/37gUdMKVOIsMz6HiUFv2SDY/e4gf3nm0
5/RapCZVNK2jL1Dbbx6P03hM+RyZgKmluX/u8HYjJagTXcOstwsfiQ=</xenc:CipherValue></
xenc:CipherData></xenc:EncryptedKey><xenc:ReferenceList><xenc:DataReference
URI="#EncDataId-521452" /></xenc:ReferenceList><ds:Signature
xmlns:ds="http://www.w3.org/2000/09/xmldsig#"; Id="Signature-6613606">
<ds:SignedInfo>

<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1";
/>
<ds:Reference URI="#Timestamp-29715552">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />
<ds:DigestValue>CcUJneIsCX/jaVa6GyYRAF9tNzY=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>RBQE62b2THg5TozutFGF1fBMhz8=</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-7971559">
<wsse:SecurityTokenReference
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd" wsu:Id="STRId-28705408"><wsse:Reference
URI="#EncKeyId-12606779"
ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#S
AMLAssertionID" /></wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature></wsse:Security><wsa:To>http://localhost:8000/axis2/services/
NoSecurityService</wsa:To><wsa:MessageID>urn:uuid:CD3CB5BB47293216ED11954749
63849</wsa:MessageID><wsa:Action>urn:echo</wsa:Action></soapenv:Header><soap
env:Body
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
y-utility-1.0.xsd" wsu:Id="Id-521452"><xenc:EncryptedData
Id="EncDataId-521452"
Type="http://www.w3.org/2001/04/xmlenc#Content";><xenc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"; /><ds:KeyInfo
xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
<wsse:SecurityTokenReference
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
ty-secext-1.0.xsd"><wsse:Reference URI="#EncKeyId-12606779"
/></wsse:SecurityTokenReference>
</ds:KeyInfo><xenc:CipherData><xenc:CipherValue>ed13Pnrdhz4P5TGxK0djILyzU4xU
DF2G3W0Ljoh4tcSaKqD+yhg7P9BTZlLdK12LvBj3xcrxLwH0
KUv7+K/3Poc4FPyO4uOBOMY66dbUcxquy6UyM+e9oHd0K6cLbWmZvKJPa1d7FObMC3waXzFNeVCB
miQJEt32sQYGfVgNUEKEJVcLYuA/PlB3+jQI5OaNocc7FTGM59SjKycjDNBpF3LoM5icKtHRxlk8
N1aZTpHl/ZaHZ1JKSAAOHsefFNRSjN5XVeQrpXKqFUdAFICBn1hDYKoIo4ADTzXIelDzoiyHfJgv
K0b6SOtpjtFLm2vvBMwgFCQ8iP/B6CWduWQJ3Z2XWqA4qXVue9SbrIgraJWw0o/WSxLjN0JPe+GG
WU6b9HJA8By1cSI+Z4DxdOM8SIIhQxUjvc8lc8zvf4JvsOlNllzUK1Z3PkGUJ3pP+xnU32a0ed6/
XiifF3ylJkBcFWsaKWL779sKnPpHvdkPWuT9K+lL2YCr451UVLadhYyp</xenc:CipherValue><
/xenc:CipherData></xenc:EncryptedData></soapenv:Body></soapenv:Envelope>
0

>>>>>>>>>>>>>>>>.. RESPONSE <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

HTTP/1.1 500 An error was discovered processing the <wsse:Security> header.
(Reference URI is null)
Date: Mon, 19 Nov 2007 12:22:45 GMT
Server: Simple-Server/1.1
Transfer-Encoding: chunked
Content-Type: text/xml; charset=UTF-8
Connection: Close

245
<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:wsa="http://www.w3.org/2005/08/addressing";><soapenv:Header><wsa:Action
>http://www.w3.org/2005/08/addressing/soap/fault</wsa:Action><wsa:RelatesTo>
urn:uuid:CD3CB5BB47293216ED1195474963849</wsa:RelatesTo></soapenv:Header><so
apenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode><faultstring>
An error was discovered processing the &lt;wsse:Security> header. (Reference
URI is null)</faultstring><detail
/></soapenv:Fault></soapenv:Body></soapenv:Envelope>
0


----------------------------------
Manish Verma
+91 99155 98590  (Cell)
+91 172 3056 502 (Work)
VermaM1947 (AOL)
[EMAIL PROTECTED]
 

-----Original Message-----
From: Ruchith Fernando [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, November 20, 2007 2:30 PM
To: rampart-dev@ws.apache.org
Subject: Re: Not able to use Symmetric binding -- Illegal key size or
default parameters

Hi,

Can you please post the latest request and response that causes this
error? Also please attach the services.xml and policy you used.

Thanks,
Ruchith

Manish Verma wrote:
> Hello Ruchith
> 
> 
> I guess, I have moved beyond that error. I'm now getting the following --
> 
> 
> Regards,
> Manish Verma
> 
> 
> org.apache.axis2.AxisFault: An error was discovered processing the
> <wsse:Security> header. (Reference URI is null)
>       at
>
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:486
> )
>       at
>
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
> isOperation.java:343)
>       at
>
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
> n.java:389)
>       at
>
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
> peration.java:211)
>       at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>       at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>       at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>       at
>
org.eklavya.Axis2.WS.NoSecurity.client.NoSecurityServiceClient.main(NoSecuri
> tyServiceClient.java:73)
> null
> 
> 
> 
> 
> ----------------------------------
> Manish Verma
> +91 99155 98590  (Cell)
> +91 172 3056 502 (Work)
> VermaM1947 (AOL)
> [EMAIL PROTECTED]
>  
> 
> -----Original Message-----
> From: Manish Verma [mailto:[EMAIL PROTECTED] 
> Sent: Monday, November 19, 2007 4:19 PM
> To: rampart-dev@ws.apache.org
> Subject: RE: Not able to use Symmetric binding -- Illegal key size or
> default parameters
> 
> Hello Ruchith,
> 
> Sorry to bug you again and again. I'm still stuck. 
> 
> I set the action param. Now it is "echo" at both the places. I even set
the
> <actionMapping> in the services.xml. However, I still get the following
> error message 
> 
> " The server did not recognize the action which it received:"
> 
> 
> I am pasting below the exception and the SOAP request. I have attached the
> policy.xml and services.xml files that I'm using, just in case there is
> something missing in there  --
> 
> When I run my webservice without Rampart it works. 
> 
> Your help is much appreciated.
> 
> Regards
> Manish Verma
> 
> 
> 
> Exception ---
> 
> <ns1:echo
> xmlns:ns1="http://service.NoSecurity.WS.Axis2.eklavya.org";><param0>Hello
> world</param0></ns1:echo>
> Exception in thread "main" org.apache.axis2.AxisFault: The server did not
> recognise the action which it received: 
>       at
>
org.apache.axis2.handlers.addressing.AddressingInFaultHandler.invoke(Address
> ingInFaultHandler.java:114)
>       at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
>       at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
>       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132)
>       at
>
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
> isOperation.java:336)
>       at
>
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
> n.java:389)
>       at
>
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
> peration.java:211)
>       at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>       at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>       at
> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>       at
>
org.eklavya.Axis2.WS.NoSecurity.client.NoSecurityServiceClient.main(NoSecuri
> tyServiceClient.java:54)
> 
> 
> 
>>>>>>>>> SOAP Request <<<<<<<<<<<<<<<<<
> POST /axis2/services/NoSecurityService HTTP/1.1
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: "echo"
> User-Agent: Axis2
> Host: localhost:8000
> Transfer-Encoding: chunked
> 
> f71
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";
> xmlns:wsa="http://www.w3.org/2005/08/addressing";><soapenv:Header>
> <wsse:Security
>
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
> ty-secext-1.0.xsd" soapenv:mustUnderstand="1"><wsu:Timestamp
>
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
> y-utility-1.0.xsd"
>
wsu:Id="Timestamp-29715552"><wsu:Created>2007-11-19T10:42:27.104Z</wsu:Creat
>
ed><wsu:Expires>2007-11-19T10:47:27.104Z</wsu:Expires></wsu:Timestamp><xenc:
> EncryptedKey Id="EncKeyId-12606779">
> <xenc:EncryptionMethod
Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5";
> />
> <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
> <wsse:SecurityTokenReference><wsse:KeyIdentifier
>
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-m
> essage-security-1.0#Base64Binary"
>
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-toke
>
n-profile-1.0#X509SubjectKeyIdentifier">ENBEXCdWhIw/4wrQdCs8EyhNIxk=</wsse:K
> eyIdentifier></wsse:SecurityTokenReference>
> </ds:KeyInfo>
>
<xenc:CipherData><xenc:CipherValue>Cqkj+5WNIHps2lP35yv9QFF+gpJr/sDqAOFeiYP3Q
>
aoWp8mjeEs2oB8lx4Aw/JoEADw0+LZly7j1BfLMsqNCVL5q3CfyDKP4e6h/OczcUmbfJrKJ/Ag4G
>
ZYlZEEjTCXwLM+U6BShDoJF658LMTE2hN3dwCb6+uUTjqJIKfXj0Gw=</xenc:CipherValue></
>
xenc:CipherData></xenc:EncryptedKey><xenc:ReferenceList><xenc:DataReference
> URI="#EncDataId-521452" /></xenc:ReferenceList><ds:Signature
> xmlns:ds="http://www.w3.org/2000/09/xmldsig#"; Id="Signature-6613606">
> <ds:SignedInfo>
> 
> <ds:CanonicalizationMethod
> Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
> <ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1";
> />
> <ds:Reference URI="#Timestamp-29715552">
> <ds:Transforms>
> <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
> </ds:Transforms>
> <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />
> <ds:DigestValue>R/JhCweRKJJy7rdtcNRrsxboFY8=</ds:DigestValue>
> </ds:Reference>
> </ds:SignedInfo>
> <ds:SignatureValue>mh5GR1RpnEV2NQ5qj2e9LpWAtx8=</ds:SignatureValue>
> <ds:KeyInfo Id="KeyId-7971559">
> <wsse:SecurityTokenReference
>
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
> y-utility-1.0.xsd" wsu:Id="STRId-28705408"><wsse:Reference
> URI="#EncKeyId-12606779"
>
ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#S
> AMLAssertionID" /></wsse:SecurityTokenReference>
> </ds:KeyInfo>
>
</ds:Signature></wsse:Security><wsa:To>http://localhost:8000/axis2/services/
>
NoSecurityService</wsa:To><wsa:MessageID>urn:uuid:4BE78FCE772C34AF4B11954689
>
46954</wsa:MessageID><wsa:Action>echo</wsa:Action></soapenv:Header><soapenv:
> Body
>
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
> y-utility-1.0.xsd" wsu:Id="Id-521452"><xenc:EncryptedData
> Id="EncDataId-521452"
> Type="http://www.w3.org/2001/04/xmlenc#Content";><xenc:EncryptionMethod
> Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"; /><ds:KeyInfo
> xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
> <wsse:SecurityTokenReference
>
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
> ty-secext-1.0.xsd"><wsse:Reference URI="#EncKeyId-12606779"
> /></wsse:SecurityTokenReference>
>
</ds:KeyInfo><xenc:CipherData><xenc:CipherValue>o/Zx5+tjfLQZeDKlfRkjcZvalT6R
> lbff8l4ALFmT9i7mRnolw8F1e7VLDsFxqPvIgAHk0EIzgzNs
>
0tE1sXQNaElX7xWJZKgYqNZOufn4iH7BhygJU6lXuH4tqPpYCWbolewS7a/hEgi6zDpp8gHNjGeP
>
tGQ9k5a7bpMro+MdoRH9UUVCo77XdIsM7HaLsJlrerm2aj3t7eSwPluEVJ1LQrKCQP2O/pWO8yyM
>
EHy8kYvwZaNjhRme0U+Z71Z2S85zTOeSMx+/0gcJgznQwMkz4VhhnyQ4y8XQ76p+LxEoBMmYwuNz
>
v8K5EtCyIQJFcnF9EmRSRw5DMY9+vuqUtdXNNKY9Z326LyTyQgAOxhoxN0oWoqDxovjeFd4WzNv/
>
mjKnQiSHEA50pM99HJm61Kr90IxlEB2xeHfTG9pXK+mpGx8eNeQLvEotb63PtcvAWKAbfptQ/jFU
>
2pCxJc/8ZhjppKIlm3YSphaQ+2YefT0qEek6Awuqq5PKWcCZK4eHe4jC</xenc:CipherValue><
> /xenc:CipherData></xenc:EncryptedData></soapenv:Body></soapenv:Envelope>
> 0
> 
> 
> ----------------------------------
> Manish Verma
> +91 99155 98590  (Cell)
> +91 172 3056 502 (Work)
> VermaM1947 (AOL)
> [EMAIL PROTECTED]
>  
> 
> 
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Ruchith Fernando [mailto:[EMAIL PROTECTED] 
> Sent: Friday, November 16, 2007 8:58 PM
> To: rampart-dev@ws.apache.org
> Subject: Re: Not able to use Symmetric binding -- Illegal key size or
> default parameters
> 
> Hi Manish,
> 
> Looking at your request message it seems that your "SOAPAction" http
> header value is different from the "wsa:Action" value:
> 
> SOAPAction: "urn:anonOutInOp"
> 
> <wsa:Action>urn:anonOutInOpResponse</wsa:Action>
> 
> These two values has to be the same and the a "operation" element in
> the services.xml will have to have an "actionMapping" element mapping
> the the action above value to that operation.
> example: <actionMapping>urn:echo</actionMapping>
> 
> Thanks,
> Ruchith
> 
> Manish Verma wrote:
>> Hello Ruchith,
>>
>> Yes it does. I set the action value to null, now it throws the following
>> exception. I have also attached the SOAP request --
>>
>> Your help is highly appreciated.
>>
>> Regards
>> Manish
>>
>>
>> <ns1:echo
>> xmlns:ns1="http://service.NoSecurity.WS.Axis2.eklavya.org";><param0>Hello
>> world</param0><param1 /></ns1:echo>
>> Exception in thread "main" org.apache.axis2.AxisFault: The server failed
> to
>> process the WS-Addressing header: wsa:Action [Reason]: A header
> representing
>> a Message Addressing Property is not valid and the message cannot be
>> processed
>>      at
>>
>
org.apache.axis2.handlers.addressing.AddressingInFaultHandler.invoke(Address
>> ingInFaultHandler.java:114)
>>      at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
>>      at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
>>      at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132)
>>      at
>>
>
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
>> isOperation.java:336)
>>      at
>>
>
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
>> n.java:389)
>>      at
>>
>
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
>> peration.java:211)
>>      at
>> org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>>      at
>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>>      at
>> org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>>      at
>>
>
org.eklavya.Axis2.WS.NoSecurity.client.NoSecurityServiceClient.main(NoSecuri
>> tyServiceClient.java:50)
>>
>>
>>>>>>>>>>>>>>>> The SOAP request that I picked from TCPMON <<<<<<<<<<<<<<<
>>
>>
>> POST /axis2/services/NoSecurityService HTTP/1.1
>> Content-Type: text/xml; charset=UTF-8
>> SOAPAction: "urn:anonOutInOp"
>> User-Agent: Axis2
>> Host: localhost:8000
>> Transfer-Encoding: chunked
>>
>> f87
>> <?xml version='1.0' encoding='UTF-8'?>
>>    <soapenv:Envelope
>> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
>> xmlns:xenc="http://www.w3.org/2001/04/xmlenc#";
>> xmlns:wsa="http://www.w3.org/2005/08/addressing";>
>>       <soapenv:Header>
>>          <wsse:Security
>>
>
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
>> ty-secext-1.0.xsd" soapenv:mustUnderstand="1">
>>             <wsu:Timestamp
>>
>
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
>> y-utility-1.0.xsd" wsu:Id="Timestamp-29715552">
>>                <wsu:Created>2007-11-16T11:21:38.589Z</wsu:Created>
>>                <wsu:Expires>2007-11-16T11:26:38.589Z</wsu:Expires>
>>             </wsu:Timestamp>
>>             <xenc:EncryptedKey Id="EncKeyId-18471958">
>>                <xenc:EncryptionMethod
>> Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"; />
>>                <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
>>                   <wsse:SecurityTokenReference>
>>                      <wsse:KeyIdentifier
>>
>
EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-m
>> essage-security-1.0#Base64Binary"
>>
>
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-toke
>
n-profile-1.0#X509SubjectKeyIdentifier">ENBEXCdWhIw/4wrQdCs8EyhNIxk=</wsse:K
>> eyIdentifier>
>>                   </wsse:SecurityTokenReference>
>>                </ds:KeyInfo>
>>                <xenc:CipherData>
>>
>>
>
<xenc:CipherValue>hP6QyrCfh3y4BQ+zXNcZmUnRE6V1hcM4SnawZj+ZaUQf+AidLZM2X7anVF
>
FO3x2Y2losPZ0ebvVxsuN+3OUS3H7mvM3Qgima4ESdMbuXTx/oN6ih5T9SVhXsq5iTJUMkBWK7sn
>> tb/X4zN4T2k56U/3uxWPzH3nUIDN/H77sW+0o=</xenc:CipherValue>
>>                </xenc:CipherData>
>>             </xenc:EncryptedKey>
>>             <xenc:ReferenceList>
>>                <xenc:DataReference URI="#EncDataId-9800632" />
>>             </xenc:ReferenceList>
>>             <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#";
>> Id="Signature-2056742">
>>                <ds:SignedInfo>
>>                   <ds:CanonicalizationMethod
>> Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
>>                   <ds:SignatureMethod
>> Algorithm="http://www.w3.org/2000/09/xmldsig#hmac-sha1"; />
>>                   <ds:Reference URI="#Timestamp-29715552">
>>                      <ds:Transforms>
>>                         <ds:Transform
>> Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"; />
>>                      </ds:Transforms>
>>                      <ds:DigestMethod
>> Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; />
>>
>> <ds:DigestValue>u9MmfTwxLDAdo6N4b+fdeSIe97c=</ds:DigestValue>
>>                   </ds:Reference>
>>                </ds:SignedInfo>
>>
>> <ds:SignatureValue>A8G/pAJL7BaQhbVs44X1Vp1c4Pw=</ds:SignatureValue>
>>                <ds:KeyInfo Id="KeyId-22608339">
>>                   <wsse:SecurityTokenReference
>>
>
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
>> y-utility-1.0.xsd" wsu:Id="STRId-7971559">
>>                      <wsse:Reference URI="#EncKeyId-18471958"
>>
>
ValueType="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.0#S
>> AMLAssertionID" />
>>                   </wsse:SecurityTokenReference>
>>                </ds:KeyInfo>
>>             </ds:Signature>
>>          </wsse:Security>
>>
>> <wsa:To>http://localhost:8000/axis2/services/NoSecurityService</wsa:To>
>>
>> <wsa:MessageID>urn:uuid:EF5AADEECF58F3D48F1195212098423</wsa:MessageID>
>>          <wsa:Action>urn:anonOutInOpResponse</wsa:Action>
>>       </soapenv:Header>
>>       <soapenv:Body
>>
>
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurit
>> y-utility-1.0.xsd" wsu:Id="Id-9800632">
>>          <xenc:EncryptedData Id="EncDataId-9800632"
>> Type="http://www.w3.org/2001/04/xmlenc#Content";>
>>             <xenc:EncryptionMethod
>> Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc"; />
>>             <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#";>
>>                <wsse:SecurityTokenReference
>>
>
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecuri
>> ty-secext-1.0.xsd">
>>                   <wsse:Reference URI="#EncKeyId-18471958" />
>>                </wsse:SecurityTokenReference>
>>             </ds:KeyInfo>
>>             <xenc:CipherData>
>>
>>
>
<xenc:CipherValue>2UBHhSJosp+hJyDlrHiT+OqiNEUxrSHINRWG1njRFM4PdiocJwNH2WzSnZ
>
z5GN9oq2e8n+Tk4fxlm6EsWhTfrYSjm+0hPfBBUHj0K5A2EiYnxv7FNesYVCj8Ta4iMY5wzorBVH
>
oPA6A0kZWuW1Klb7U+4KjUPwRpkpElfFVu7q4HqSa4JKe1tyCb4fP31/oGUiiJFPyjoaXmXas78h
>
+VLLIMcWxftCuKDaPnp6HcVr+agTar92VmJRMgENGPul8BRvUAeAfUCSdmeEq7SKLptYdlk7v5zo
>
j1PiZdxmXEY1tib56+DuF0fVbUiJFntJSJCGV5m3UcGZcw0GHunfbECX3+z4lr5a7pt/gLwc82WT
>
AaAN1I30GQyA1yX6Hx6svPsWw3njkDE5nruEtFbil6kjlpZ63Uj4nEIeUjF86aa9X7Su3kYr22FN
>
7H2TrcB6fOZ9d24xZPvByhuYPeScNL9F5LrEYmVaZAP1Av98c7k8DoLRiWv0mAsc2OokoJkZwm</
>> xenc:CipherValue>
>>             </xenc:CipherData>
>>          </xenc:EncryptedData>
>>       </soapenv:Body>
>>    </soapenv:Envelope>0
>>
>> ----------------------------------
>> Manish Verma
>> +91 99155 98590  (Cell)
>> +91 172 3056 502 (Work)
>> VermaM1947 (AOL)
>> [EMAIL PROTECTED]
>>
>>
>> -----Original Message-----
>> From: Ruchith Fernando [mailto:[EMAIL PROTECTED]
>> Sent: Friday, November 16, 2007 11:14 AM
>> To: rampart-dev
>> Subject: Re: Not able to use Symmetric binding -- Illegal key size or
>> default parameters
>>
>> Seems like the axis2 server couldn't figure out the operation that the
>> incoming action value is mapped to.
>>
>> Does this service and client work without any rampart/security
>> configuration?
>>
>> Thanks,
>> Ruchith
>>
>> Manish Verma wrote:
>>> Hi Nandana,
>>>
>>> Thanks for your help. Yes, now I'm able to move past that problem.
>>>
>>> Now I'm stuck at another problem. I see the following --
>>> org.apache.axis2.AxisFault: The server did not recognise the action
which
>> it
>>> received
>>>
>>> Could you please help.
>>>
>>>
>>> Regards,
>>> Manish
>>>
>>>
>>> <ns1:echo
>>>
>
xmlns:ns1="http://service.SymmEncSecurity.WS.Axis2.eklavya.org";><ns1:param0>
>>> Hello world</ns1:param0></ns1:echo>
>>> org.apache.axis2.AxisFault: The server did not recognise the action
which
>> it
>>> received:
>>>     at
>>>
>
org.apache.axis2.handlers.addressing.AddressingInFaultHandler.invoke(Address
>>> ingInFaultHandler.java:114)
>>>     at org.apache.axis2.engine.Phase.invoke(Phase.java:292)
>>>     at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:212)
>>>     at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:132)
>>>     at
>>>
>
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAx
>>> isOperation.java:336)
>>>     at
>>>
>
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperatio
>>> n.java:389)
>>>     at
>>>
>
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisO
>>> peration.java:211)
>>>     at
>>>
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
>>>     at
>>>
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:528)
>>>     at
>>>
org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:508)
>>>     at
>>>
>
org.eklavya.Axis2.WS.SymmEncSecurity.client.SymmEncSecurityServiceClient.mai
>>> n(Unknown Source)
>>> null
>>>
>>> ----------------------------------
>>> Manish Verma
>>> +91 99155 98590  (Cell)
>>> +91 172 3056 502 (Work)
>>> VermaM1947 (AOL)
>>> [EMAIL PROTECTED]
>>>
>>>
>>> -----Original Message-----
>>> From: Nandana Mihindukulasooriya [mailto:[EMAIL PROTECTED]
>>> Sent: Thursday, November 15, 2007 5:02 PM
>>> To: rampart-dev@ws.apache.org
>>> Subject: Re: Not able to use Symmetric binding -- Illegal key size or
>>> default parameters
>>>
>>> Hi Manish,
>>>          Did you download the JCE Unlimited Strength Jurisdiction Policy
>>> files from sun and replaced the necessary files ?
>>> link [1] shows how to do this if you have not already done it.
>>>
>>> Regards,
>>> Nandana
>>>
>>>
>>> [1] http://wso2.org/forum/thread/2520
>>>
>>> On Nov 15, 2007 4:15 PM, Manish Verma <[EMAIL PROTECTED]> wrote:
>>>
>>>>  Hi,
>>>>
>>>>
>>>>
>>>> I am working with Rampart1.3 on Axis 2-1.3. I have successfully
executed
>>>> all the samples, using policy.xml, that comes with Rampart. I am now
>>>> trying to execute a symmetric encryption example. I am using the
> attached
>>>> policy.xml and services.xml file.
>>>>
>>>>
>>>>
>>>> When I run my client, I get the following error. There may be some
>> problem
>>>> with the way my services.xml and policy.xml files are written. I will
>>>> highly appreciate if someone could help me with it.
>>>>
>>>>
>>>>
>>>> Regards
>>>>
>>>> Manish Verma
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <ns1:echo xmlns:ns1="
>>>> http://service.SymmetricEncSecurity.WS.Axis2.eklavya.org";><param0>Hello
>>>> world</param0></ns1:echo>
>>>>
>>>> org.apache.axis2.AxisFault: Error during encryption
>>>>
>>>>       at org.apache.rampart.handler.RampartSender.invoke(*
>>>> RampartSender.java:70*)
>>>>
>>>>       at org.apache.axis2.engine.Phase.invoke(*Phase.java:292*)
>>>>
>>>>       at
> org.apache.axis2.engine.AxisEngine.invoke(*AxisEngine.java:212*)
>>>>       at org.apache.axis2.engine.AxisEngine.send(*AxisEngine.java:377*)
>>>>
>>>>       at org.apache.axis2.description.OutInAxisOperationClient.send(*
>>>> OutInAxisOperation.java:374*)
>>>>
>>>>       at
>> org.apache.axis2.description.OutInAxisOperationClient.executeImpl
>>>> (*OutInAxisOperation.java:211*)
>>>>
>>>>       at org.apache.axis2.client.OperationClient.execute(*
>>>> OperationClient.java:163*)
>>>>
>>>>       at org.apache.axis2.client.ServiceClient.sendReceive(*
>>>> ServiceClient.java:528*)
>>>>
>>>>       at org.apache.axis2.client.ServiceClient.sendReceive(*
>>>> ServiceClient.java:508*)
>>>>
>>>>       at
>>>>
>
org.eklavya.Axis2.WS.SymmetricEncSecurity.client.SymmetricEncSecurityService
>>> Client.main
>>>> (*SymmetricEncSecurityServiceClient.java:70*)
>>>>
>>>> Caused by: *org.apache.rampart.RampartException*: Error during
> encryption
>>>>       at
>>>>
org.apache.rampart.builder.SymmetricBindingBuilder.doSignBeforeEncrypt(*
>>>> SymmetricBindingBuilder.java:540*)
>>>>
>>>>       at org.apache.rampart.builder.SymmetricBindingBuilder.build(*
>>>> SymmetricBindingBuilder.java:80*)
>>>>
>>>>       at
>> org.apache.rampart.MessageBuilder.build(*MessageBuilder.java:128*
>>>> )
>>>>
>>>>       at org.apache.rampart.handler.RampartSender.invoke(*
>>>> RampartSender.java:64*)
>>>>
>>>>       ... 9 more
>>>>
>>>> Caused by: *org.apache.ws.security.WSSecurityException*: Cannot
>>>> encrypt/decrypt data; nested exception is:
>>>>
>>>>       *org.apache.xml.security.encryption.XMLEncryptionException*:
>> Illegal
>>>> key size or default parameters
>>>>
>>>> Original Exception was *java.security.InvalidKeyException*: Illegal key
>>>> size or default parameters
>>>>
>>>>       at org.apache.ws.security.message.WSSecEncrypt.doEncryption(*
>>>> WSSecEncrypt.java:480*)
>>>>
>>>>       at org.apache.ws.security.message.WSSecEncrypt.doEncryption(*
>>>> WSSecEncrypt.java:406*)
>>>>
>>>>       at
>> org.apache.ws.security.message.WSSecEncrypt.encryptForExternalRef
>>>> (*WSSecEncrypt.java:362*)
>>>>
>>>>       at
>>>>
org.apache.rampart.builder.SymmetricBindingBuilder.doSignBeforeEncrypt(*
>>>> SymmetricBindingBuilder.java:528*)
>>>>
>>>>       ... 12 more
>>>>
>>>> Caused by: *org.apache.xml.security.encryption.XMLEncryptionException*:
>>>> Illegal key size or default parameters
>>>>
>>>> Original Exception was *java.security.InvalidKeyException*: Illegal key
>>>> size or default parametersnull
>>>>
>>>>
>>>>
>>>>       at
> org.apache.xml.security.encryption.XMLCipher.encryptData(Unknown
>>>> Source)
>>>>
>>>>       at
> org.apache.xml.security.encryption.XMLCipher.encryptData(Unknown
>>>> Source)
>>>>
>>>>       at
>>>>
>>
org.apache.xml.security.encryption.XMLCipher.encryptElementContent(Unknown
>>>> Source)
>>>>
>>>>       at org.apache.xml.security.encryption.XMLCipher.doFinal(Unknown
>>>> Source)
>>>>
>>>>       at org.apache.ws.security.message.WSSecEncrypt.doEncryption(*
>>>> WSSecEncrypt.java:475*)
>>>>
>>>>       ... 15 more
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> ----------------------------------
>>>>
>>>> Manish Verma
>>>>
>>>> +91 99155 98590  (Cell)
>>>>
>>>> +91 172 3056 502 (Work)
>>>>
>>>> VermaM1947 (AOL)
>>>>
>>>> [EMAIL PROTECTED]
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
> 


<!--
	~ Licensed to the Apache Software Foundation (ASF) under one
	~ or more contributor license agreements. See the NOTICE file
	~ distributed with this work for additional information
	~ regarding copyright ownership. The ASF licenses this file
	~ to you under the Apache License, Version 2.0 (the
	~ "License"); you may not use this file except in compliance
	~ with the License. You may obtain a copy of the License at
	~
	~ http://www.apache.org/licenses/LICENSE-2.0
	~
	~ Unless required by applicable law or agreed to in writing,
	~ software distributed under the License is distributed on an
	~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
	~ KIND, either express or implied. See the License for the
	~ specific language governing permissions and limitations
	~ under the License.
-->

<!-- services.xml of sample-1 : No Security-->


<service name="NoSecurityService" scope="application">
	<description>No Security Service</description>
	<operation name="echo">
		<messageReceiver
			class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
			<actionMapping>urn:echo</actionMapping>
	</operation>
	<parameter name="ServiceClass">
		org.eklavya.Axis2.WS.NoSecurity.service.NoSecurityService
	</parameter>

	<module ref="rampart" />
	<module ref="addressing" />

	<wsp:Policy wsu:Id="SymmetricEnc"
		xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
		xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
		<wsp:ExactlyOne>
			<wsp:All>
				<sp:SymmetricBinding
					xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
					<wsp:Policy>
						<sp:ProtectionToken>
							<wsp:Policy>
								<sp:X509Token
									sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never";>
									<wsp:Policy>
										<sp:WssX509V3Token10 />
									</wsp:Policy>
								</sp:X509Token>
							</wsp:Policy>
						</sp:ProtectionToken>
						<sp:AlgorithmSuite>
							<wsp:Policy>
								<sp:TripleDesRsa15 />
							</wsp:Policy>
						</sp:AlgorithmSuite>
						<sp:Layout>
							<wsp:Policy>
								<sp:Strict />
							</wsp:Policy>
						</sp:Layout>
						<sp:IncludeTimestamp />
					</wsp:Policy>
				</sp:SymmetricBinding>
				 
				<sp:Wss10
					xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>

					<wsp:Policy>
						<sp:MustSupportRefKeyIdentifier />
						<sp:MustSupportRefIssuerSerial />
					</wsp:Policy>

				</sp:Wss10>
					
				<sp:EncryptedParts
					xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
					<sp:Body />
				</sp:EncryptedParts>

				<ramp:RampartConfig
					xmlns:ramp="http://ws.apache.org/rampart/policy";>
					<ramp:user>service</ramp:user>
					<ramp:encryptionUser>client</ramp:encryptionUser>
					<ramp:passwordCallbackClass>
						org.eklavya.Axis2.WS.NoSecurity.service.PWCBHandler
					</ramp:passwordCallbackClass>
					<ramp:encryptionCypto>
						<ramp:crypto
							provider="org.apache.ws.security.components.crypto.Merlin">
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.keystore.type">
								JKS
							</ramp:property>
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.file">
								service.jks
							</ramp:property>
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.keystore.password">
								changeme
							</ramp:property>
						</ramp:crypto>
					</ramp:encryptionCypto>
					<ramp:signatureCrypto>
						<ramp:crypto
							provider="org.apache.ws.security.components.crypto.Merlin">
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.keystore.type">
								JKS
							</ramp:property>
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.file">
								service.jks
							</ramp:property>
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.keystore.password">
								changeme
							</ramp:property>
						</ramp:crypto>
					</ramp:signatureCrypto>

				</ramp:RampartConfig>

			</wsp:All>
		</wsp:ExactlyOne>
	</wsp:Policy>

</service>
<?xml version="1.0" encoding="UTF-8"?>
<!--
 !
 ! Copyright 2006 The Apache Software Foundation.
 !
 ! Licensed under the Apache License, Version 2.0 (the "License");
 ! you may not use this file except in compliance with the License.
 ! You may obtain a copy of the License at
 !
 !      http://www.apache.org/licenses/LICENSE-2.0
 !
 ! Unless required by applicable law or agreed to in writing, software
 ! distributed under the License is distributed on an "AS IS" BASIS,
 ! WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ! See the License for the specific language governing permissions and
 ! limitations under the License.
 !-->
<wsp:Policy wsu:Id="SymmetricEnc"
		xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
		xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
		<wsp:ExactlyOne>
			<wsp:All>
				<sp:SymmetricBinding
					xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
					<wsp:Policy>
						<sp:ProtectionToken>
							<wsp:Policy>
								<sp:X509Token
									sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never";>
									<wsp:Policy>
										<sp:WssX509V3Token10 />
									</wsp:Policy>
								</sp:X509Token>
							</wsp:Policy>
						</sp:ProtectionToken>
						<sp:AlgorithmSuite>
							<wsp:Policy>
								<sp:TripleDesRsa15 />
							</wsp:Policy>
						</sp:AlgorithmSuite>
						<sp:Layout>
							<wsp:Policy>
								<sp:Strict />
							</wsp:Policy>
						</sp:Layout>
						<sp:IncludeTimestamp />
					</wsp:Policy>
				</sp:SymmetricBinding>
				<sp:Wss10
					xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
					<wsp:Policy>
						<sp:MustSupportRefKeyIdentifier />
						<sp:MustSupportRefIssuerSerial />
					</wsp:Policy>
				</sp:Wss10>
				<sp:EncryptedParts
					xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
					<sp:Body />
				</sp:EncryptedParts>

				<ramp:RampartConfig
					xmlns:ramp="http://ws.apache.org/rampart/policy";>
					<ramp:user>client</ramp:user>
					<ramp:encryptionUser>service</ramp:encryptionUser>
					<ramp:passwordCallbackClass>
						org.eklavya.Axis2.WS.NoSecurity.client.ClientPWCBHandler
					</ramp:passwordCallbackClass>
					<ramp:encryptionCypto>
						<ramp:crypto
							provider="org.apache.ws.security.components.crypto.Merlin">
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.keystore.type">
								JKS
							</ramp:property>
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.file">
								client.jks
							</ramp:property>
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.keystore.password">
								changeme
							</ramp:property>
						</ramp:crypto>
					</ramp:encryptionCypto>
					<ramp:signatureCrypto>
						<ramp:crypto
							provider="org.apache.ws.security.components.crypto.Merlin">
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.keystore.type">
								JKS
							</ramp:property>
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.file">
								client.jks
							</ramp:property>
							<ramp:property
								name="org.apache.ws.security.crypto.merlin.keystore.password">
								changeme
							</ramp:property>
						</ramp:crypto>
					</ramp:signatureCrypto>

				</ramp:RampartConfig>

			</wsp:All>
		</wsp:ExactlyOne>
	</wsp:Policy>

Reply via email to