How to apply WS-Security on SOAP Reference Binding.
Scenario :
1. We are successfully able to invoke external web service (without WS Security) from BPEL component in SwitchYard.
2. Now while invoking external web service having SpnegoContextToken
WSDL Information
<sp:ProtectionToken>
</wsp:Policy>
</sp:SpnegoContextToken>
</wsp:Policy>
</sp:ProtectionToken>
Error Log
15:28:51,046 WARNING [org.apache.cxf.phase.PhaseInterceptorChain] (ODEServer-2) Interceptor for {http://schemas.xmlsoap.org/ws/2005/02/trust/wsdl}SecurityTokenService#{http://schemas.xmlsoap.org/ws/2005/02/trust/wsdl}RequestSecurityToken has thrown exception, unwinding now: org.apache.cxf.interceptor.Fault: General security error (An error occurred in trying to obtain a TGT: Invalid null input: name)
at org.apache.cxf.ws.security.policy.interceptors.SpnegoContextTokenOutInterceptor.issueToken(SpnegoContextTokenOutInterceptor.java:116) [cxf-rt-ws-security-2.7.14.redhat-1.jar:2.7.14.redhat-1]
at org.apache.cxf.ws.security.policy.interceptors.SpnegoContextTokenOutInterceptor.handleMessage(SpnegoContextTokenOutInterceptor.java:73) [cxf-rt-ws-security-2.7.14.redhat-1.jar:2.7.14.redhat-1]
at org.apache.cxf.ws.security.policy.interceptors.SpnegoContextTokenOutInterceptor.handleMessage(SpnegoContextTokenOutInterceptor.java:46) [cxf-rt-ws-security-2.7.14.redhat-1.jar:2.7.14.redhat-1]
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272) [cxf-api-2.7.14.redhat-1.jar:2.7.14.redhat-1]