diff options
author | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-12 13:33:16 +0000 |
---|---|---|
committer | slaws <slaws@13f79535-47bb-0310-9956-ffa450edef68> | 2009-02-12 13:33:16 +0000 |
commit | 441f2a6396d90bccfa513f3789c26518732ea1f1 (patch) | |
tree | 2777cc39f0232727d6117b428a307a0e6361077d /branches/sca-java-1.x/modules/binding-ws-axis2-policy/src | |
parent | e91b3ceec7478d30026cb2d0021fe4591455acd6 (diff) |
TUSCANY-2824 - turn WSSecurity based policy back on. Two not so great fixes here. Firstly WSSecurityPolicyHandler pushes a property into the Axis configuration context to force Rampart to recognize the policy. I haven't discovered what part of our configuration is required to do this properly. Secondly I fixed the helloworld-ws-service-secure test case to reference the wsdl on binding.ws. Without this you get a NPE in axis/rampart as it fails to map binding operations to port type operation using QNames (don't know why it thinks these are QNames). Our generated WSDL has the generated binding in a different namespace to the port type. Associating the wsdl binding with binding.ws means that the binding is not generated at the made up QNames match. I also updated a few key stores as the runtime was complaining about X509 certificate version numbers.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@743732 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-java-1.x/modules/binding-ws-axis2-policy/src')
2 files changed, 12 insertions, 3 deletions
diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/wspolicy/WSSecurityPolicyHandler.java b/branches/sca-java-1.x/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/wspolicy/WSSecurityPolicyHandler.java index 7375df3170..fabc07c7cf 100644 --- a/branches/sca-java-1.x/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/wspolicy/WSSecurityPolicyHandler.java +++ b/branches/sca-java-1.x/modules/binding-ws-axis2-policy/src/main/java/org/apache/tuscany/sca/binding/ws/axis2/policy/wspolicy/WSSecurityPolicyHandler.java @@ -41,6 +41,15 @@ public class WSSecurityPolicyHandler implements PolicyHandler { Policy wsPolicy = (Policy)policy; try { configContext.getAxisConfiguration().applyPolicy(wsPolicy); + + // TUSCANY-2824 + // hack to make service side pick up rampart policies + // "rampartPolicy" comes from RampartMessageData.KEY_RAMPART_POLICY + // but I'm avoiding adding an explicit dependency just yet. + // There must be a proper way of getting rampart to recognize + // these policies + configContext.setProperty("rampartPolicy", wsPolicy); + } catch ( AxisFault e ) { throw new RuntimeException(e); } diff --git a/branches/sca-java-1.x/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler b/branches/sca-java-1.x/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler index 0f122a61bf..9f1e9450ba 100644 --- a/branches/sca-java-1.x/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler +++ b/branches/sca-java-1.x/modules/binding-ws-axis2-policy/src/main/resources/META-INF/services/org.apache.tuscany.sca.policy.util.PolicyHandler @@ -20,6 +20,6 @@ org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicyHandler;intent=http://www.osoa.org/xmlns/sca/1.0#authentication,model=org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicy
org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicyHandler;intent=http://www.osoa.org/xmlns/sca/1.0#integrity,model=org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicy
org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicyHandler;intent=http://www.osoa.org/xmlns/sca/1.0#confidentiality,model=org.apache.tuscany.sca.binding.ws.axis2.policy.configuration.Axis2ConfigParamPolicy
-#org.apache.tuscany.sca.binding.ws.axis2.policy.wspolicy.WSSecurityPolicyHandler;intent=http://www.osoa.org/xmlns/sca/1.0#authentication,model=org.apache.neethi.Policy
-#org.apache.tuscany.sca.binding.ws.axis2.policy.wspolicy.WSSecurityPolicyHandler;intent=http://www.osoa.org/xmlns/sca/1.0#integrity,model=org.apache.neethi.Policy
-#org.apache.tuscany.sca.binding.ws.axis2.policy.wspolicy.WSSecurityPolicyHandler;intent=http://www.osoa.org/xmlns/sca/1.0#confidentiality,model=org.apache.neethi.Policy
\ No newline at end of file +org.apache.tuscany.sca.binding.ws.axis2.policy.wspolicy.WSSecurityPolicyHandler;intent=http://www.osoa.org/xmlns/sca/1.0#authentication,model=org.apache.neethi.Policy
+org.apache.tuscany.sca.binding.ws.axis2.policy.wspolicy.WSSecurityPolicyHandler;intent=http://www.osoa.org/xmlns/sca/1.0#integrity,model=org.apache.neethi.Policy
+org.apache.tuscany.sca.binding.ws.axis2.policy.wspolicy.WSSecurityPolicyHandler;intent=http://www.osoa.org/xmlns/sca/1.0#confidentiality,model=org.apache.neethi.Policy
\ No newline at end of file |