BTW:  I ran into this error as well today.   The best place to put a 
breakpoint is in the supportsAlternative method of PolicyEngineImpl, right at 
the "return false;" line.   That will give you the qname of the policy 
assertion that it doesn't know how to deal with.

Dan


On Wed July 8 2009 12:00:59 am Daniel Kulp wrote:
> Hate to ask the obvious, but did you yank out the Metro specific policies
> from the wsdl?  Example: the ValidatorConfiguration policy and
> CallbackHandler and such?
>
> Not sure if upping logging levels will help.   I've started going through
> and tried to make it output better error messages that provide more details
> when policies cannot be met, but apparently this error message got through.
>    It definitely needs some work to make sure it will track what policies
> could not be satisfied to make the error message a bit better.
>
> Dan
>
> On Tue July 7 2009 11:38:41 pm Glen Mazza wrote:
> > Hello, I'm trying to create a CXF client accessing a Metro web service
> > that requires (via WS-SecurityPolicy statements) Username/Password
> > Tokens--this[1] web service, in particular.  Configuring the SOAP client
> > with this cxf.xml:
> >
> > <beans xmlns="http://www.springframework.org/schema/beans";
> >     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >     xmlns:jaxws="http://cxf.apache.org/jaxws";
> >     xsi:schemaLocation="http://www.springframework.org/schema/beans
> >     http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> >     http://cxf.apache.org/jaxws
> >     http://cxf.apache.org/schemas/jaxws.xsd";>
> >
> > <jaxws:client
> > name="{http://www.example.org/contract/DoubleIt}DoubleItService";
> > createdFromAPI="true">
> >     <jaxws:properties>
> >         <entry key="ws-security.username" value="alice"/>
> >         <entry key="ws-security.password" value="clarinet"/>
> >     </jaxws:properties>
> > </jaxws:client>
> > </beans>
> >
> > Is returning this error:
> > [INFO] Exception in thread "main" javax.xml.ws.soap.SOAPFaultException:
> > None of the policy alternatives can be satisfied.
> > [INFO]      at
> > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:141)
> > [INFO]      at $Proxy38.doubleIt(Unknown Source)
> > [INFO]      at
> > com.mycompany.webservice.client.WSClient.doubleIt(WSClient.java:18)
> > [INFO]      at
> > com.mycompany.webservice.client.WSClient.main(WSClient.java:11)
> >
> > Can anyone can see what the problem might be?  If not, prior to tracing
> > into the CXF source code, is there any other troubleshooting I can or
> > should do in order to determine the problem?
> >
> > Thanks,
> > Glen
> >
> > [1]
> > http://www.jroller.com/gmazza/entry/implementing_ws_security_using_userna
> >me tokens#MetroUT2-4

-- 
Daniel Kulp
[email protected]
http://www.dankulp.com/blog

Reply via email to