You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Thomas Diesler (JIRA)" <ji...@apache.org> on 2007/12/20 12:23:43 UTC
[jira] Commented: (CXF-1319) Client policies not initialized
properly
[ https://issues.apache.org/jira/browse/CXF-1319?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12553641 ]
Thomas Diesler commented on CXF-1319:
-------------------------------------
As a workaround I use
BindingProvider bp = (BindingProvider)port;
bp.getRequestContext().put("org.apache.cxf.ws.addressing.using", Boolean.TRUE);
> Client policies not initialized properly
> ----------------------------------------
>
> Key: CXF-1319
> URL: https://issues.apache.org/jira/browse/CXF-1319
> Project: CXF
> Issue Type: Sub-task
> Affects Versions: 2.0.3
> Reporter: Thomas Diesler
>
> [tdiesler@tddell trunk]$ ant -Dtest=org.jboss.test.ws.jaxws.cxf.reliable.BasicRMTestCase one-test
> one-test:
> [junit] Running org.jboss.test.ws.jaxws.cxf.reliable.BasicRMTestCase
> [junit] Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 7.64 sec
> [junit] Test org.jboss.test.ws.jaxws.cxf.reliable.BasicRMTestCase FAILED
> The policy engine is enabled like this
> <cxf:bus name="cxf">
> <cxf:features>
> <p:policies ignoreUnknownAssertions="true"/>
> </cxf:features>
> ...
> </cxf:bus>
> The client is constructed like this
> SpringBusFactory bf = new SpringBusFactory();
> URL cxfConfig = new File("resources/jaxws/cxf/reliable/cxf-client.xml").toURL();
> Bus bus = bf.createBus(cxfConfig);
> BusFactory.setDefaultBus(bus);
> URL wsdlURL = new File("resources/jaxws/cxf/reliable/reliable.wsdl").toURL();
> QName serviceName = new QName(targetNS, "RMService");
> Service service = Service.create(wsdlURL, serviceName);
> RMEndpoint port = (RMEndpoint)service.getPort(RMEndpoint.class);
> The wsl contains th epolicies like this
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://schemas.xmlsoap.org/wsdl/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:tns="http://org.jboss.ws.jaxws.cxf/reliable" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="RMService"
> targetNamespace="http://org.jboss.ws.jaxws.cxf/reliable">
>
> <wsp:Policy wsu:Id="RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
> <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
> <wsp:Policy/>
> </wsam:Addressing>
> <wsrmp:RMAssertion xmlns:wsrmp="http://schemas.xmlsoap.org/ws/2005/02/rm/policy">
> <wsrmp:BaseRetransmissionInterval Milliseconds="10000"/>
> </wsrmp:RMAssertion>
> </wsp:Policy>
> ...
>
> <wsdl:service name="RMService">
> <wsdl:port binding="tns:RMServiceSoapBinding" name="RMEndpointPort">
> <soap:address location="http://@jboss.bind.address@:8080/jaxws-cxf-reliable"/>
> <wsp:PolicyReference URI="#RM" xmlns:wsp="http://www.w3.org/2006/07/ws-policy"/>
> </wsdl:port>
> </wsdl:service>
> </wsdl:definitions>
> In the client log, I see
> 2007-12-20 11:50:54,705 DEBUG [org.apache.cxf.phase.PhaseInterceptorChain:65] Chain org.apache.cxf.phase.PhaseInterceptorChain@181e7fe was created. Current flow:
> setup [ClientPolicyOutInterceptor, ServerPolicyOutInterceptor]
> pre-logical [MAPAggregator, RMOutInterceptor, HolderOutInterceptor, SwAOutInterceptor, WrapperClassOutInterceptor, SoapHeaderOutFilterInterceptor]
> post-logical [SoapActionOutInterceptor]
> prepare-send [MessageSenderInterceptor]
> pre-stream [SoapPreProtocolOutInterceptor, AttachmentOutInterceptor, StaxOutInterceptor]
> pre-protocol [MAPCodec, RMSoapInterceptor, SOAPHandlerInterceptor]
> write [SoapOutInterceptor]
> pre-marshal [LogicalHandlerOutInterceptor]
> marshal [RPCOutInterceptor]
> post-stream [PolicyVerificationOutInterceptor]
> 2007-12-20 11:50:54,706 DEBUG [org.apache.cxf.phase.PhaseInterceptorChain:65] Invoking handleMessage on interceptor org.apache.cxf.ws.policy.ClientPolicyOutInterceptor@c42b5
> 2007-12-20 11:51:15,505 DEBUG [sun.rmi.transport.tcp:65] RMI ConnectionExpiration-[127.0.0.1:1098]: close connection
> 2007-12-20 11:51:15,964 DEBUG [sun.rmi.transport.tcp:65] RMI ConnectionExpiration-[127.0.0.1:4444]: close connection
> 2007-12-20 11:53:55,527 TRACE [org.apache.cxf.ws.policy.ClientPolicyOutInterceptor:60] Using effective policy:
> type: Policy
> type: ExactlyOne
> type: All
> 2007-12-20 11:53:55,529 TRACE [org.apache.cxf.ws.policy.ClientPolicyOutInterceptor:60] Chosen alternative:
> 2007-12-20 11:53:55,545 DEBUG [org.apache.cxf.phase.PhaseInterceptorChain:65] Invoking handleMessage on interceptor org.apache.cxf.ws.policy.ServerPolicyOutInterceptor@ef9d00
> MAPAggregator.hasAddressingAssertion(Message message) returns false and then I get (because of [CXF-1315])
> Caused by: java.lang.NullPointerException
> at org.apache.cxf.ws.addressing.MAPAggregator.hasUsingAddressingAssertion(MAPAggregator.java:235)
> at org.apache.cxf.ws.addressing.MAPAggregator.usingAddressing(MAPAggregator.java:152)
> at org.apache.cxf.ws.addressing.MAPAggregator.mediate(MAPAggregator.java:305)
> at org.apache.cxf.ws.addressing.MAPAggregator.handleMessage(MAPAggregator.java:132)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.