l***@christophercheng.com
2018-10-01 11:22:04 UTC
Look at the WSDL
https://test.api.ba.com/selling-distribution/AirShopping/17.2/V1?wsdl look
like it requires WS Security 1.0 only, but CXF 3.1.2 only support WS
Security 1.1 and above.
Is there a get around to make CXF to play nice with WS Security 1.0?
INFO: Creating Service
{http://www.ba.com/wsdl/airshopping/AirShoppingDistributionAdapterV01}AirSho
ppingDistributionAdapter from WSDL:
https://test.api.ba.com/selling-distribution/AirShopping/17.2/V1?wsdl
Invoking airShopping172V1...
Oct 01, 2018 7:16:54 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type
{http://schemas.xmlsoap.org/ws/2002/12/secext}SecurityToken registered.
Oct 01, 2018 7:16:54 PM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNING: Interceptor for
{http://www.ba.com/wsdl/airshopping/AirShoppingDistributionAdapterV01}AirSho
ppingDistributionAdapter#{http://www.ba.com/wsdl/airshopping/AirShoppingDist
ributionAdapterV01}AirShopping17_2_V1 has thrown exception, unwinding now
org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives
can be satisfied.
at
org.apache.cxf.ws.policy.EffectivePolicyImpl.chooseAlternative(EffectivePoli
cyImpl.java:199)
at
org.apache.cxf.ws.policy.EffectivePolicyImpl.chooseAlternative(EffectivePoli
cyImpl.java:192)
at
org.apache.cxf.ws.policy.EffectivePolicyImpl.initialise(EffectivePolicyImpl.
java:96)
at
org.apache.cxf.ws.policy.PolicyEngineImpl.getEffectiveClientRequestPolicy(Po
licyEngineImpl.java:204)
at
org.apache.cxf.ws.policy.PolicyOutInterceptor.handle(PolicyOutInterceptor.ja
va:98)
at
org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPol
icyInterceptor.java:44)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:308)
at
org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:518)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:427)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:328)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:281)
at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
at com.sun.proxy.$Proxy58.airShopping172V1(Unknown Source)
at
com.ba.wsdl.airshopping.airshoppingdistributionadapterv01.AirShoppingPortDis
tributionAdapterType_AirShoppingDistributionAdapterSoap11_Client.main(AirSho
ppingPortDistributionAdapterType_AirShoppingDistributionAdapterSoap11_Client
.java:147)
https://test.api.ba.com/selling-distribution/AirShopping/17.2/V1?wsdl look
like it requires WS Security 1.0 only, but CXF 3.1.2 only support WS
Security 1.1 and above.
Is there a get around to make CXF to play nice with WS Security 1.0?
INFO: Creating Service
{http://www.ba.com/wsdl/airshopping/AirShoppingDistributionAdapterV01}AirSho
ppingDistributionAdapter from WSDL:
https://test.api.ba.com/selling-distribution/AirShopping/17.2/V1?wsdl
Invoking airShopping172V1...
Oct 01, 2018 7:16:54 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type
{http://schemas.xmlsoap.org/ws/2002/12/secext}SecurityToken registered.
Oct 01, 2018 7:16:54 PM org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNING: Interceptor for
{http://www.ba.com/wsdl/airshopping/AirShoppingDistributionAdapterV01}AirSho
ppingDistributionAdapter#{http://www.ba.com/wsdl/airshopping/AirShoppingDist
ributionAdapterV01}AirShopping17_2_V1 has thrown exception, unwinding now
org.apache.cxf.ws.policy.PolicyException: None of the policy alternatives
can be satisfied.
at
org.apache.cxf.ws.policy.EffectivePolicyImpl.chooseAlternative(EffectivePoli
cyImpl.java:199)
at
org.apache.cxf.ws.policy.EffectivePolicyImpl.chooseAlternative(EffectivePoli
cyImpl.java:192)
at
org.apache.cxf.ws.policy.EffectivePolicyImpl.initialise(EffectivePolicyImpl.
java:96)
at
org.apache.cxf.ws.policy.PolicyEngineImpl.getEffectiveClientRequestPolicy(Po
licyEngineImpl.java:204)
at
org.apache.cxf.ws.policy.PolicyOutInterceptor.handle(PolicyOutInterceptor.ja
va:98)
at
org.apache.cxf.ws.policy.AbstractPolicyInterceptor.handleMessage(AbstractPol
icyInterceptor.java:44)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain
.java:308)
at
org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:518)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:427)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:328)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:281)
at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
at com.sun.proxy.$Proxy58.airShopping172V1(Unknown Source)
at
com.ba.wsdl.airshopping.airshoppingdistributionadapterv01.AirShoppingPortDis
tributionAdapterType_AirShoppingDistributionAdapterSoap11_Client.main(AirSho
ppingPortDistributionAdapterType_AirShoppingDistributionAdapterSoap11_Client
.java:147)