cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Colm O hEigeartaigh <cohei...@apache.org>
Subject Re: Question on using CXF STS with 3rd party server without Spring
Date Thu, 16 Jan 2014 09:38:21 GMT
There should be no problem invoking on the STS programatically, it's just a
matter of making sure that the usual "STSClient" configuration done in
spring, is configured on the client proxy instead. However, it looks like
there is a problem with the WSDL. What does the policy look like? Or can
you enable DEBUG/FINE logging to see what is going on?

Colm.


On Wed, Jan 15, 2014 at 2:25 PM, Walters, Jay M <jmwalt@bu.edu> wrote:

> I have poked around a bit and not found a good example of what I need to
> do to get this working. I have a WCF C# webservice I am trying to call.  I
> have working Metro code and also C# code calling the service (a third party
> product), but not getting any traction with CXF.  So far all the examples
> appear to use Spring which I cannot use.
>
> I am trying to use CXF 2.7.8 with JDK 1.6.0_21.
>
> Do I need to instantiate an STSClient object, or does this happen
> automatically?  If automatic, what do I need to configure in order to make
> it work. I have a X509 certificate as a byte stream, I do not have a
> keystore though I suppose I could make it if required to use CXF.
>
> So far I have uses wsdl2java to generate loads of stuff which I try to use
> as follows.
>
>     SymbolService_Service factory = new SymbolService_Service();
>     SymbolService ss = factory.getSymbolServiceHttp();
>     ArrayOfSymbolContract array = ss.queryForAll();
>
> This yields the following output/trace
>
> [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] - Creating
> Service {...<http://www.sungard.com/vpm/core/tables/Symbol/>}SymbolService
> from WSDL: http://bosdvpmapp1:8010/VPM/Core/Tables/SymbolService?wsdl
> [org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl] - No assertion
> builder for type {
> http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1}BinaryEncodingregistered.
> [org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl] - No assertion
> builder for type {
> http://schemas.microsoft.com/ws/2006/05/framing/policy}SslTransportSecurityregistered.
> org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider]
> - Failed to build the policy
> 'SymbolServiceTcp_policy':org.apache.neethi.builders.PrimitiveAssertion
> cannot be cast to org.apache.cxf.ws.security.policy.model.Token
>
> Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: None of
> the policy alternatives can be satisfied.
>     at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
>     at $Proxy44.queryForAll(Unknown Source)
>     at Client.main(Client.java:112)
> Caused by: org.apache.cxf.ws.policy.PolicyException: None of the policy
> alternatives can be satisfied.
>     at
> org.apache.cxf.ws.policy.EndpointPolicyImpl.chooseAlternative(EndpointPolicyImpl.java:166)
>     at
> org.apache.cxf.ws.policy.EndpointPolicyImpl.finalizeConfig(EndpointPolicyImpl.java:145)
>     at
> org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.java:141)
> ....
>
> Thanks for any help
>
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message