CXF 2.6.6 is quite old. Could you try with a newer version to see if it is
fixed? I tried with the latest trunk code and the user principal is correct.

Colm.


On Fri, Mar 14, 2014 at 4:03 PM, bob45 <[email protected]> wrote:

> I am using CXF 2.6.6.
>
> The service is implemented as follows:
>
> @WebServlet(name="test", urlPatterns={"/test"})
> @InInterceptors
> (interceptors={"org.apache.cxf.interceptor.LoggingInInterceptor"})
> @OutInterceptors
> (interceptors={"org.apache.cxf.interceptor.LoggingOutInterceptor"})
> @EndpointProperties(value = {
>                 @EndpointProperty(key =
> "ws-security.encryption.properties.sct", value =
> "keystore.properties"),
>                 @EndpointProperty(key =
> "ws-security.encryption.username.sct", value =
> "cert"),
>                 @EndpointProperty(key =
> "ws-security.callback-handler.sct", value =
> "test.CallbackHandler"),
> })
> @WebService(targetNamespace="http://www.test.net/namespace";,
>             serviceName="TestService",
>             portName="TestPort",
>             wsdlLocation="WEB-INF/classes/schemas/TestService.wsdl")
> public class TestServiceImpl implements TestServicePortType {
>
>         @Resource
>         WebServiceContext context;
>
>   @Override
>         public TestResponse test(TestRequest request) throws TestException
> {
>                 Principal p = context.getUserPrincipal();
>                            // Always null
>   }
>
> }
>
>
>
>
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/WebServiceContext-always-null-for-SAML-tp5741327p5741329.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to