A simpler way would be to use camel-cxf see if your can use this
http://camel.apache.org/cxf.html

Regards,
-Yogesh

On Mon, May 16, 2016 at 5:14 PM, miri eyni [via Camel] <
ml-node+s465427n5782665...@n5.nabble.com> wrote:

> 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";);
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://camel.465427.n5.nabble.com/rest-to-soap-tp5782601p5782665.html
> To unsubscribe from rest to soap, click here
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5782601&code=eW9ndTEzQGdtYWlsLmNvbXw1NzgyNjAxfC04ODQzODQxMjM=>
> .
> NAML
> <http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://camel.465427.n5.nabble.com/rest-to-soap-tp5782601p5782666.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to