i have simple camel route takes incoming message calls processor changes body java object , send out client via cxf-soap.
route below:
@component public class dctoaspresponseroute extends asproutebuilder { @autowired dctoaspresponseprocessor processor; @override public void configure() throws exception { final routedefinition routedefinition = createroutedefinition("{{asp.generic.route}}", routeid.dc_to_asp_response_route.getrouteid()); routedefinition .process(processor) } } the processor below:
@component public class dctoaspresponseprocessor implements processor { @autowired // protected unit testing protected objectfactory objectfactory; @override public void process(exchange exchange) throws exception { response response = objectfactory.createresponse(); response.setresponse(responsetype.success); exchange.getin().setbody(response, response.class); } } my problem occurs on line:
exchange.getin().setbody(response, response.class); when try set pojo java object instantiated above onto body rather setting java pojo object onto exchange body pojo transformed xml form below:
exchange[message: <?xml version="1.0" encoding="utf-8" standalone="yes"?> <response xmlns="http://xxx.yyy.zzz/2008"> <response>success</response> </response> ] due conversion believe when cxf tries marshall out soap response exchange realises "invalid" body , disregards given me below empty body soap response instead of populated response:
<soap:envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"> <soap:body/> </soap:envelope> can me out? i'm lost ideas! highly-appreciated.
hopefully in future...as turns out bug causing behavior downgraded cxf-v3.1.0 , works should.
Comments
Post a Comment