javax.xml.ws.soap.SOAPFaultException: An error occurred when verifying security thrown from CXF WS Client standalone application
Issue
We are using JBossWS to generate a web service client (wsimport). All the client code is generated correctly and runs fine within a testcase but the test case executes the code inside the JBoss container on JBoss EAP.
We want to invoke the web service client generated by wsimport outside the container, from a standalone client.
For example: execute the web service client within a Java executable class. We grabbed all the WS JARs required, but we suspect something might be missing because of the exception: javax.xml.ws.soap.SOAPFaultException: An error occurred when verifying security for the message
We are using WS-Security Policy in our WSDL:
<wsp:Policy wsu:Id="SecureHttp_policy">
<wsp:ExactlyOne>
<wsp:All>
<sp:TransportBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:TransportToken>
<wsp:Policy>
<sp:HttpsToken RequireClientCertificate="false" ></sp:HttpsToken>
</wsp:Policy>
</sp:TransportToken>
<sp:AlgorithmSuite>
<wsp:Policy>
<sp:Basic256 ></sp:Basic256>
</wsp:Policy>
</sp:AlgorithmSuite>
<sp:Layout>
<wsp:Policy>
<sp:Lax ></sp:Lax>
</wsp:Policy>
</sp:Layout>
<sp:IncludeTimestamp ></sp:IncludeTimestamp>
</wsp:Policy>
</sp:TransportBinding>
<sp:EndorsingSupportingTokens
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
<wsp:Policy>
<sp:WssX509V3Token10 ></sp:WssX509V3Token10>
</wsp:Policy>
</sp:X509Token>
</wsp:Policy>
</sp:EndorsingSupportingTokens>
<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
<wsp:Policy>
<sp:MustSupportRefKeyIdentifier ></sp:MustSupportRefKeyIdentifier>
<sp:MustSupportRefIssuerSerial ></sp:MustSupportRefIssuerSerial>
</wsp:Policy>
</sp:Wss10>
</wsp:All>
</wsp:ExactlyOne>
</wsp:Policy>
Environment
Red Hat JBoss Enterprise Application Platform 6.1.1
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.