cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glen Mazza (JIRA)" <>
Subject [jira] [Commented] (CXF-4054) Unclear error messages given if client policy configuration can't be found.
Date Sat, 16 Jun 2012 18:16:42 GMT


Glen Mazza commented on CXF-4054:

The patch I just attached better separates, for this type of config file:,
the case where (1) the jaxws:client element was missing or otherwise not tied to the endpoint
properly via its name attribute vs. (2) just a missing ws-security.signature.username or
value.  Main concern I have is the message for (1):

+                policyNotAsserted(token, "Security configuration could not be detected. "
+                    + "Potential cause: Make sure jaxws:client element with name " 
+                    + "attribute value matching endpoint port is defined as well as a " 
+                    + SecurityConstants.SIGNATURE_PROPERTIES + " element within it.");
+                return null;

I'm not sure how many other configuration elements besides jaxws:client this part of the error
handling would be relavant for.  If it's just jaxws:client, the patch is probably good-to-go,
else I may need to make the message more generic.
> Unclear error messages given if client policy configuration can't be found.
> ---------------------------------------------------------------------------
>                 Key: CXF-4054
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Glen Mazza
>            Assignee: Glen Mazza
>            Priority: Minor
>         Attachments: CXF4054.patch
> Dennis has noted:
> With this tutorial:, in particular,
the WSC config file within it:
> <beans xmlns=""
>    xmlns:xsi=""
>    xmlns:jaxws=""
>    xsi:schemaLocation=" 
>    <jaxws:client name="{}DoubleItPort" createdFromAPI="true">
>       <jaxws:properties>
>          <entry key="ws-security.callback-handler" value="client.ClientKeystorePasswordCallback"/>
>          <entry key="" value=""/>
>          <entry key="" value=""/>
>          <entry key="ws-security.encryption.username" value="myservicekey"/>
>       </jaxws:properties>
>    </jaxws:client>
> </beans>
> Usage of an incorrect port name in the "name" attribute of the jaxws:client element gives
unhelpful/confusing error messages.  
> If the port name doesn't exist at all (e.g., "{}DoubleItXYZ"),
the reader gets this error:
> WARNING: Interceptor for {}DoubleItService#{}DoubleIt
has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: No signature username found.
> 	at
> 	at
> 	at$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(
> 	at$PolicyBasedWSS4JOutInterceptorInternal.handleMessage(
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
> 	at org.apache.cxf.endpoint.ClientImpl.doInvoke(
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(
> 	at org.apache.cxf.endpoint.ClientImpl.invoke(
> 	at org.apache.cxf.frontend.ClientProxy.invokeSync(
> 	at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(
> 	at $Proxy24.doubleIt(Unknown Source)
> 	at client.WSClient.doubleIt(
> 	at client.WSClient.main(
> I'm not sure what should be done in this case -- because a non-matching port name like
the above should indeed be ignored (as it could refer to another port in another WSDL), but
perhaps a clearer error given that no configuration was provided for the client endpoint for
the port being used.
> If the service name was erroneously used instead of the port name, this error is given:
> Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error
creating bean with name '{}DoubleItService': Error
setting property values; nested exception is org.springframework.beans.NotWritablePropertyException:
Invalid property 'bus' of bean class [org.apache.cxf.service.ServiceImpl]: Bean property 'bus'
is not writable or has an invalid setter method. Does the parameter type of the setter match
the return type of the getter?
> 	at
> 	at
> Here, an error message given that the port, and not the service name, should be referred

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


View raw message