You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2012/11/20 04:49:27 UTC
svn commit: r1411529 - in
/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test:
java/org/apache/servicemix/cxfbc/ws/policy/
resources/org/apache/servicemix/cxfbc/ws/policy/
Author: ffang
Date: Tue Nov 20 03:49:26 2012
New Revision: 1411529
URL: http://svn.apache.org/viewvc?rev=1411529&view=rev
Log:
fix intermittent CxfBCPolicyTest failure
Modified:
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr-external.xml
servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr.xml
Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java?rev=1411529&r1=1411528&r2=1411529&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/java/org/apache/servicemix/cxfbc/ws/policy/CxfBCPolicyTest.java Tue Nov 20 03:49:26 2012
@@ -115,16 +115,11 @@ public class CxfBCPolicyTest extends Tes
BasicGreeterService gs = new BasicGreeterService(wsdl, serviceName);
final Greeter greeter = gs.getGreeterPort();
LOG.info("Created greeter client.");
- if ("HP-UX".equals(System.getProperty("os.name"))) {
- ConnectionHelper.setKeepAliveConnection(greeter, true);
- }
-
+ ConnectionHelper.setKeepAliveConnection(greeter, true);
//set timeout to 100 secs to avoid intermitly failed
((ClientImpl)ClientProxy.getClient(greeter)).setSynchronousTimeout(100000);
- // oneway
- greeter.greetMeOneWay("CXF");
-
+
assertEquals("CXF", greeter.greetMe("cxf"));
// exception
@@ -142,6 +137,8 @@ public class CxfBCPolicyTest extends Tes
assertEquals(2, (int) ex.getFaultInfo().getMajor());
assertEquals(1, (int) ex.getFaultInfo().getMinor());
}
+ // oneway
+ greeter.greetMeOneWay("CXF");
}
Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr-external.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr-external.xml?rev=1411529&r1=1411528&r2=1411529&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr-external.xml (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr-external.xml Tue Nov 20 03:49:26 2012
@@ -25,9 +25,13 @@
</wsa:EndpointReference>
</wsp:AppliesTo>
<wsp:Policy>
- <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <wsam:Addressing xmlns:wsam="http://www.w3.org/2007/02/addressing/metadata">
<wsp:Policy/>
- </wsam:Addressing>
+ </wsam:Addressing>
+ </wsp:All>
+ </wsp:ExactlyOne>
</wsp:Policy>
</wsp:PolicyAttachment>
</attachments>
Modified: servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr.xml
URL: http://svn.apache.org/viewvc/servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr.xml?rev=1411529&r1=1411528&r2=1411529&view=diff
==============================================================================
--- servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr.xml (original)
+++ servicemix/components/trunk/bindings/servicemix-cxf-bc/src/test/resources/org/apache/servicemix/cxfbc/ws/policy/addr.xml Tue Nov 20 03:49:26 2012
@@ -20,7 +20,11 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:http="http://cxf.apache.org/transports/http/configuration"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:cxf="http://cxf.apache.org/core"
+ xmlns:p="http://cxf.apache.org/policy"
xsi:schemaLocation="
+http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
+http://cxf.apache.org/policy http://cxf.apache.org/schemas/policy.xsd
http://cxf.apache.org/transports/http/configuration http://cxf.apache.org/schemas/configuration/http-conf.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
@@ -28,14 +32,12 @@ http://www.springframework.org/schema/be
<http:client DecoupledEndpoint="http://localhost:9999/decoupled_endpoint"/>
</http:conduit>
- <bean id="org.apache.cxf.ws.policy.PolicyEngine" class="org.apache.cxf.ws.policy.PolicyEngineImpl">
- <property name="bus" ref="cxf"/>
- <property name="enabled" value="true"/>
- </bean>
+ <cxf:bus>
+ <cxf:features>
+ <p:policies/>
+ </cxf:features>
+ </cxf:bus>
- <bean class="org.apache.cxf.ws.policy.attachment.external.ExternalAttachmentProvider">
- <constructor-arg ref="cxf"/>
- <property name="location" value="org/apache/servicemix/cxfbc/ws/policy/addr-external.xml"/>
- </bean>
+ <p:externalAttachment location="org/apache/servicemix/cxfbc/ws/policy/addr-external.xml"/>
</beans>