i converted the json to xml
i try to send soap request from rest , on the process method i converted the
body to xml
but i think i am missing somethings ,
from - is rest url
to - is webService url (soap)
from("jetty:http://localhost:8080/json?matchOnUriPrefix=true")
public void process(Exchange exchange) throws Exception {
String payload =
exchange.getIn().getBody(String.class);
JSONObject jsonObj =
JSONObject.fromObject(payload);
BeanInvocation beanInvocation = new
BeanInvocation();
beanInvocation.setMethod(PolicySOAPServices.class.getMethod("findPolicy",
RequestPolicyView.class));
RequestPolicyView requestPolicyView = new
RequestPolicyView();
requestPolicyView.setPolicyNo(
(Integer)jsonObj.get("policyNo"));
Object[] args = new Object[]
{requestPolicyView};
beanInvocation.setArgs(args);
exchange.getIn().setBody(beanInvocation);
}
}).marshal().xstream().to("http://localhost:6090/ws/policyServices?bridgeEndpoint=true&soapAction=http://policy.camel.com&wsAddressingAction=http://policy.camel.com");
--
View this message in context:
http://camel.465427.n5.nabble.com/rest-to-soap-tp5782601p5782665.html
Sent from the Camel - Users mailing list archive at Nabble.com.