Hi,
When I use a WSDL file with some ws-policy entries, I am getting an
NPE from my CXF client (2.2.9/10/11 and trunk).
I was wondering if there is some configuration issue or there is some
issue with the way how CXF uses neethi.
As I observed, both org.apache.cxf.ws.policy.EffectivePolicyImpl and
org.apache.cxf.ws.policy.EndpointPolicyImpl lead to a call
policy.normalize(true), where policy is an instance of
org.apache.neethi.Policy.
And this method of Policy in neethi 2.0.4 calls another method with
the policy registry parameter set as null.
org.apache.neethi.Policy
48: public PolicyComponent normalize(boolean deep) {
49: return normalize(null, deep);
50: }
This method subsequently calls AbstractPolicyOperator's
normalizeOperator. Since parameter reg is given as null, line 116 of
this method is throwing an NPE.
org.apache.neethi.AbstractPolicyOperator
77: private static PolicyComponent
normalizeOperator(PolicyOperator operator, PolicyRegistry reg, boolean
deep) {
78:
79: short type = operator.getType();
...
114: } else if (policyComponent.getType() ==
Constants.TYPE_POLICY_REF) {
115: String uri = ((PolicyReference) policyComponent).getURI();
116: policyComponent = reg.lookup(uri);
Can someone give an advice here how to solve this problem without
modifying the WSDL?
Thanks.
Regards, aki