Re: soap inboud does not get soap outbound 's response
I think you can use the jetty or other component as a plain HTTP engine to send the response back. If you want CXF to do more work (such as provides WS-* work), you can setup the route like you did. I guess it may cause bay the message body is not set rightly for the CXF_MESSAGE. Willem Jiang Twitter: willemjiang Weibo: 姜宁willem On Thu, Oct 25, 2018 at 11:14 PM Wang Yan wrote: > > I have two routes in camel, route1 will send soap request to route2 > What I am expecting route1 will get reponse from route2 > But Altough route2 can send response (i see it in log ), but route1 could > not get it. > > Any idea ? how to let route1 get response from route2? > > route1 > > // SOAP_InBound -> XQuery(InBound-OutBound)->Soap_OutBound_Request > from(SOAP_ENDPOINT_IN_URI + "=CXF_MESSAGE") > .convertBodyTo(String.class) > .to("xquery:createRequest.xq" ) > .to(SOAP_ENDPOINT_OUT_URI + "=MESSAGE"); > route2 > // Soap_OutBound->DummyResponse(OutBound->InBound) > from(SOAP_ENDPOINT_OUT_URI + > "=CXF_MESSAGE").convertBodyTo(String.class) > .setBody(simple("resource:classpath:dummyResponse.xml")) > .log(LoggingLevel.INFO, "# Response {body} #");
Re: camel soap endpoint only WSDL but without serviceClass, is it possible?
Yeah, you can just specify the WSDL, but you have to provide more information such as the service name and endpoint name to let CXF to look up right endpoint for you. Please check out this test file[1] as an example. [1]https://github.com/apache/camel/blob/master/components/camel-cxf/src/test/resources/org/apache/camel/component/cxf/GreeterEndpointCxfMessageWithoutSEIBeans.xml Willem Jiang Twitter: willemjiang Weibo: 姜宁willem On Mon, Oct 22, 2018 at 10:00 PM Wang Yan wrote: > > camel soap endpoint only using wsdl , not using serviceClass , is it > possbile? > > private static final String SOAP_ENDPOINT_URI = "cxf:// > http://0.0.0.0:9009/create?serviceClass=com.xyz.CreateService;; > > I tried like below, but it does not work, it looks like the endpoint really > expecting serviceClass > > private static final String SOAP_ENDPOINT_URI = "cxf:// > http://0.0.0.0:9009/create?wsdlURL=wsdl/createService.wsdl;; > > the reason why not using POJO, because the system which providing WSDL is > old. we just want to using soap with dataformat as message not as POJO
Re: is transaction (required) by default enabled for the route sending message from one jms endpoint to another endpoint
As the transaction is bit complicated, you need to setup the transaction manager yourself on the jms component first, then you can apply the policy. So I don't think we can provide the transaction policy out of box. Please check out this document[1] for more information about setting the transaction policy between the jms component. [1]https://github.com/apache/camel/blob/master/camel-core/src/main/docs/eips/transactional-client.adoc Willem Jiang Twitter: willemjiang Weibo: 姜宁willem On Sun, Oct 21, 2018 at 2:27 PM Wang Yan wrote: > > is transaction (required) by default enabled for the route sending message > from one jms endpoint to another endpoint like below > > from("activemq:queue:foo").to("activemq:queue:bar"); > > or i have to explicitly do like below ? > Policy requried = bean(SpringTransactionPolicy.class, > "PROPAGATION_REQUIRED")); > from("activemq:queue:foo").policy(required).to("activemq:queue:bar"); > > Any hints or suggestions are more than welcome!