You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ff...@apache.org on 2022/12/07 15:56:51 UTC
[camel-spring-boot] branch main updated: [CAMEL-18729]use platform servlet transport for the ws-rm|ws-addressing decoupled endpoint at client side, instead of an embeded http server(another listening port other than the platform servlet listening port)
This is an automated email from the ASF dual-hosted git repository.
ffang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-spring-boot.git
The following commit(s) were added to refs/heads/main by this push:
new 808a0460d62 [CAMEL-18729]use platform servlet transport for the ws-rm|ws-addressing decoupled endpoint at client side, instead of an embeded http server(another listening port other than the platform servlet listening port)
808a0460d62 is described below
commit 808a0460d62b7b978619e601d6f4f825db35b374
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Wed Dec 7 10:56:44 2022 -0500
[CAMEL-18729]use platform servlet transport for the ws-rm|ws-addressing decoupled endpoint at client side, instead of an embeded http server(another listening port other than the platform servlet listening port)
---
.../component/cxf/soap/springboot/wsrm/WSRMTest.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/components-starter/camel-cxf-soap-starter/src/test/java/org/apache/camel/component/cxf/soap/springboot/wsrm/WSRMTest.java b/components-starter/camel-cxf-soap-starter/src/test/java/org/apache/camel/component/cxf/soap/springboot/wsrm/WSRMTest.java
index f6cfbdc7316..2c11e7a6632 100644
--- a/components-starter/camel-cxf-soap-starter/src/test/java/org/apache/camel/component/cxf/soap/springboot/wsrm/WSRMTest.java
+++ b/components-starter/camel-cxf-soap-starter/src/test/java/org/apache/camel/component/cxf/soap/springboot/wsrm/WSRMTest.java
@@ -55,6 +55,7 @@ import org.apache.cxf.spring.boot.autoconfigure.CxfAutoConfiguration;
import org.apache.cxf.testutil.common.TestUtil;
import org.apache.cxf.transport.http.HTTPConduit;
import org.apache.cxf.transports.http.configuration.HTTPClientPolicy;
+import org.apache.cxf.ws.addressing.WSAContextUtils;
import org.apache.cxf.ws.rm.manager.AcksPolicyType;
import org.apache.cxf.ws.rm.manager.DestinationPolicyType;
import org.apache.cxf.ws.rmp.v200502.RMAssertion;
@@ -112,16 +113,16 @@ public class WSRMTest {
proxyFactory.getOutInterceptors().add(new MessageLossSimulator());
HelloWorld helloWorld = (HelloWorld) proxyFactory.create();
Client client = ClientProxy.getClient(helloWorld);
- String decoupledEndpoint = "http://localhost:"
- + TestUtil.getPortNumber("decoupled") + "/wsrm/decoupled_endpoint";
-
+ String decoupledEndpoint = "/wsrm/decoupled_endpoint";
+ client.getBus().setProperty(WSAContextUtils.DECOUPLED_ENDPOINT_BASE_PROPERTY,
+ "http://localhost:" + port + "/services/wsrm/decoupled_endpoint");
HTTPConduit hc = (HTTPConduit)(client.getConduit());
HTTPClientPolicy cp = hc.getClient();
cp.setDecoupledEndpoint(decoupledEndpoint);
- String result = helloWorld.sayHi("world!");
- assertEquals("Hello world!", result, "Get a wrong response");
- result = helloWorld.sayHi("world!");//second call will trigger MessageLoss and resend
- assertEquals("Hello world!", result, "Get a wrong response");
+ String result = helloWorld.sayHi("world1!");
+ assertEquals("Hello world1!", result, "Get a wrong response");
+ result = helloWorld.sayHi("world2!");//second call will trigger MessageLoss and resend
+ assertEquals("Hello world2!", result, "Get a wrong response");
}
// *************************************