cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: WSDL with ws-policy entries throwing an NPE at AbstractPolicyOperator's normalizeOperator
Date Fri, 24 Sep 2010 20:12:35 GMT

Honestly, without seeing the wsdl/policies, I'm not sure what to suggest to 
look at.  If you could create a small example and attach to a JIRA, that could 
potentially be a start.

Dan


On Thursday 23 September 2010 10:25:15 am Aki Yoshida wrote:
> 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

-- 
Daniel Kulp
dkulp@apache.org
http://dankulp.com/blog

Mime
View raw message