cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Damian Sima <damians...@gmail.com>
Subject WARNING: No assertion builder for type & javax.xml.ws.soap.SOAPFaultException: None of the policy alternatives can be satisfied.
Date Thu, 04 Oct 2012 15:57:23 GMT
Hi guys,

I've come across this issue and I'm not sure how to fix it.


I've have this WSDL with some policies, I've created the client with
wsdl2java and I try to execute the following code:

ManageCustomerIn servicePort = new Service().getBinding();

Client client = ClientProxy.getClient(servicePort);

HTTPConduit http = (HTTPConduit) client.getConduit();

AuthorizationPolicy authPolicy = new AuthorizationPolicy();
authPolicy.setUserName("some_user");
authPolicy.setPassword("some_password");
authPolicy.setAuthorizationType("Basic");

http.setAuthorization(authPolicy);

try {
    servicePort.checkMaintainBundleV1(request);
} catch (StandardFaultMessage_Exception e) {
    e.printStackTrace();
}

And I got this log in the console

Oct 3, 2012 5:42:03 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service {http://sap.com/xi/A1S/Global}service from WSDL:
file:/Users/damiansima/Documents/workspace/SAPSalesOnDemandClient/src/main/resources/schema/ManageCustomerIn1.wsdl
Oct 3, 2012 5:42:04 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type {
http://www.sap.com/webas/710/soap/features/transportbinding/}OptimizedXMLTransfer
registered.
Oct 3, 2012 5:42:04 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type {
http://www.sap.com/webas/630/soap/features/session/}Session registered.
Oct 3, 2012 5:42:04 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type {
http://www.sap.com/webas/700/soap/features/CentralAdministration/}CentralAdministration
registered.
Oct 3, 2012 5:42:04 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type {
http://www.sap.com/NW05/soap/features/commit/}enableCommit registered.
Oct 3, 2012 5:42:04 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type {
http://www.sap.com/NW05/soap/features/blocking/}enableBlocking registered.
Oct 3, 2012 5:42:04 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type {
http://www.sap.com/NW05/soap/features/transaction/}required registered.
Oct 3, 2012 5:42:04 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type {
http://www.sap.com/NW05/soap/features/wsrm/}enableWSRM registered.
Oct 3, 2012 5:42:04 PM
org.apache.cxf.ws.policy.AssertionBuilderRegistryImpl
handleNoRegisteredBuilder
WARNING: No assertion builder for type {
http://www.sap.com/710/soap/features/idempotency/}Idempotency registered.
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:156)
        at $Proxy30.checkMaintainBundleV1(Unknown Source)
        at org.mule.sap.ondemand.core.Main.main(Main.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:165)
        at
org.apache.cxf.ws.policy.EndpointPolicyImpl.finalizeConfig(EndpointPolicyImpl.java:145)
        at
org.apache.cxf.ws.policy.EndpointPolicyImpl.initialize(EndpointPolicyImpl.java:141)
        at
org.apache.cxf.ws.policy.PolicyEngineImpl.createEndpointPolicyInfo(PolicyEngineImpl.java:549)
        at
org.apache.cxf.ws.policy.PolicyEngineImpl.getEndpointPolicy(PolicyEngineImpl.java:295)
        at
org.apache.cxf.ws.policy.PolicyEngineImpl.getClientEndpointPolicy(PolicyEngineImpl.java:278)
        at
org.apache.cxf.ws.policy.PolicyDataEngineImpl.getClientEndpointPolicy(PolicyDataEngineImpl.java:61)
        at
org.apache.cxf.transport.http.HTTPConduit.updateClientPolicy(HTTPConduit.java:319)
        at
org.apache.cxf.transport.http.HTTPConduit.<init>(HTTPConduit.java:304)
        at
org.apache.cxf.transport.http.HTTPTransportFactory.getConduit(HTTPTransportFactory.java:250)
        at
org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:228)
        at
org.apache.cxf.binding.soap.SoapTransportFactory.getConduit(SoapTransportFactory.java:235)
        at
org.apache.cxf.endpoint.AbstractConduitSelector.getSelectedConduit(AbstractConduitSelector.java:103)
        at
org.apache.cxf.endpoint.UpfrontConduitSelector.prepare(UpfrontConduitSelector.java:63)
        at
org.apache.cxf.endpoint.ClientImpl.prepareConduitSelector(ClientImpl.java:846)
        at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:527)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:464)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:367)
        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:320)
        at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:89)
        at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:134)
        ... 2 more

Here you can find the WSDL:
http://cxf.547215.n5.nabble.com/None-of-the-policy-alternatives-can-be-satisfied-Exception-tt5710035.html#a5715640


Now what I did to make this work was to remove from the WSDL all policies
listed in the console under warning (the ones with no assertion filter).

Thing is it shouldn't be that the way is it?

Is there a way I can fix this, is this the normal behavior.

Cheers, Damian.
-- 
Damián. > - )

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