Hello,
I am new with CXF framework and web services.
I have to connect to webservice which is provided by third party company. I
want to use this with java and apache cxf framework. The webservice uses for
authentication SCT with username and password.
If I start my clientApp I got always the error "The SecureConversationToken
does not define a BootstrapPolicy" from the CXF Framework. (Compiling is fine)
error message:
org.apache.cxf.phase.PhaseInterceptorChain - Interceptor for {...} has thrown
exception, unwinding now
org.apache.cxf.interceptor.Fault: The SecureConversationToken does not define a
BootstrapPolicy
at
org.apache.cxf.ws.security.policy.interceptors.SecureConversationTokenInterceptorProvider.setupClient(SecureConversationTokenInterceptorProvider.java:75)
In the WSDL file which is provided by the service there is no BootstrapPolicy
elements included. I tried a lot: changing WSDL locally, use cxf.xml settings
and programmatic code but unfortunately I can't resolve the problem. I suppose
that i did not use the framework in the correct way but I did not see a
solution for me in the documentation.
WSDL:
...<wsp:Policy wsu:Id="AuthSecurityPolicy">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding>
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false"/>
</wsp:Policy>
</sp:TransportToken>
</wsp:Policy>
</sp:TransportBinding>
<sp:SupportingTokens>
<wsp:Policy>
<sp:SecureConversationToken
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<sp:Issuer>
<wsa:Address>https://xxxxxx.de/xx/xxxxx</wsa:Address>
</sp:Issuer>
</sp:SecureConversationToken>
</wsp:Policy>
</sp:SupportingTokens>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
<wsp:Policy wsu:Id="MtomPolicy">
<wsoma:OptimizedMimeSerialization wsp:Optional="true"/>
</wsp:Policy>...
If someone have an idea or a hint you can get more details or an maven sample
from my test app. I tried it with CXF 3.4.5 and 3.4.2.
I solved this issue in my first project with cxf by manipulating the WSDL file
locally, but I think that is not the right way and the error could be by my cxf
configuration and usage.
Thanks a lot.
Sven.