UserName Token- Error while securing request

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

UserName Token- Error while securing request

Vaibhav Dhawan
I am trying secure a request using metro framework (Using Glassfish ESB V 2.2). I believe i have configured everything correctly however i am receiving the followig exception ;

[#|2011-11-16T13:33:16.890+0000|SEVERE|sun-appserver2.1|javax.enterprise.system.core.security|_ThreadID=245;_ThreadName=HTTPBC-OutboundReceiver-2;_RequestID=90ed4aa6-9b35-4164-ab95-ab005eb0b1d0;|SEC2004: Container-auth: wss: Error securing request
java.lang.NullPointerException
        at com.sun.xml.ws.security.impl.policyconv.BindingProcessor.addPrimaryTargets(BindingProcessor.java:189)
        at com.sun.xml.ws.security.impl.policyconv.SymmetricBindingProcessor.process(SymmetricBindingProcessor.java:146)
        at com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:191)
        at com.sun.xml.ws.security.impl.policyconv.XWSSPolicyGenerator.process(XWSSPolicyGenerator.java:153)
        at com.sun.xml.wss.provider.wsit.WSITAuthContextBase.constructPolicyHolder(WSITAuthContextBase.java:930)
        at com.sun.xml.wss.provider.wsit.WSITClientAuthContext.addIncomingProtocolPolicy(WSITClientAuthContext.java:495)
        at com.sun.xml.wss.provider.wsit.WSITAuthContextBase.buildProtocolPolicy(WSITAuthContextBase.java:903)
        at com.sun.xml.wss.provider.wsit.WSITAuthContextBase.collectPolicies(WSITAuthContextBase.java:412)
        at com.sun.xml.wss.provider.wsit.WSITAuthContextBase.<init>(WSITAuthContextBase.java:336)
        at com.sun.xml.wss.provider.wsit.WSITClientAuthContext.<init>(WSITClientAuthContext.java:160)
        at com.sun.xml.wss.provider.wsit.WSITClientAuthConfig.getAuthContext(WSITClientAuthConfig.java:152)
        at com.sun.enterprise.security.jmac.config.PipeHelper.getClientAuthContext(PipeHelper.java:127)
        at com.sun.enterprise.webservice.ClientSecurityPipe.process(ClientSecurityPipe.java:155)
        at com.sun.xml.ws.api.pipe.helper.PipeAdapter.processRequest(PipeAdapter.java:115)
        at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:595)
        at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:554)
        at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:539)
        at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:436)
        at com.sun.xml.ws.client.Stub.process(Stub.java:248)
        at com.sun.xml.ws.client.dispatch.DispatchImpl.doInvoke(DispatchImpl.java:180)
        at com.sun.xml.ws.client.dispatch.DispatchImpl.invoke(DispatchImpl.java:206)
        at com.sun.jbi.httpsoapbc.OutboundMessageProcessor.outboundCall(OutboundMessageProcessor.java:1256)
        at com.sun.jbi.httpsoapbc.OutboundMessageProcessor.dispatch(OutboundMessageProcessor.java:1296)
        at com.sun.jbi.httpsoapbc.OutboundMessageProcessor.processRequestReplyOutbound(OutboundMessageProcessor.java:747)
        at com.sun.jbi.httpsoapbc.OutboundMessageProcessor.processMessage(OutboundMessageProcessor.java:257)
        at com.sun.jbi.httpsoapbc.OutboundAction.run(OutboundAction.java:63)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)
|#]



Here is the policy from my WSDL;

<wsp:Policy wsu:Id="7346bcdd-bf5f-4063-b4fb-a50d78ab11a4">
        <wsp:ExactlyOne>
            <wsp:All>

                <sp:SymmetricBinding>
                    <wsp:Policy/>
                </sp:SymmetricBinding>

                <sp:SupportingTokens>
                    <wsp:Policy>
                        <sp:UsernameToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/In
cludeToken/AlwaysToRecipient">
                            <wsp:Policy>
                                <sp:WssUsernameToken10/>
                            </wsp:Policy>
                        </sp:UsernameToken>
                    </wsp:Policy>
                </sp:SupportingTokens>
            </wsp:All>
        </wsp:ExactlyOne>
    </wsp:Policy>

The sp policy has the following value: http://schemas.xmlsoap.org/ws/2005/07/securitypolicy

I am completely stuck. Any helps would be greatly appreciated.