Discussion:
soap inboud does not get soap outbound 's response
Wang Yan
2018-10-25 15:13:48 UTC
Permalink
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 + "&dataFormat=CXF_MESSAGE")
.convertBodyTo(String.class)
.to("xquery:createRequest.xq" )
.to(SOAP_ENDPOINT_OUT_URI + "&dataFormat=MESSAGE");
route2
// Soap_OutBound->DummyResponse(OutBound->InBound)
from(SOAP_ENDPOINT_OUT_URI +
"&dataFormat=CXF_MESSAGE").convertBodyTo(String.class)
.setBody(simple("resource:classpath:dummyResponse.xml"))
.log(LoggingLevel.INFO, "##### Response {body} #####");
Willem Jiang
2018-11-02 02:53:23 UTC
Permalink
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
Post by Wang Yan
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 + "&dataFormat=CXF_MESSAGE")
.convertBodyTo(String.class)
.to("xquery:createRequest.xq" )
.to(SOAP_ENDPOINT_OUT_URI + "&dataFormat=MESSAGE");
route2
// Soap_OutBound->DummyResponse(OutBound->InBound)
from(SOAP_ENDPOINT_OUT_URI +
"&dataFormat=CXF_MESSAGE").convertBodyTo(String.class)
.setBody(simple("resource:classpath:dummyResponse.xml"))
.log(LoggingLevel.INFO, "##### Response {body} #####");
Loading...