You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by miri eyni <mi...@sapiens.com> on 2016/05/22 06:58:01 UTC

marshel

hi 


i routing from rest to soap :

from("jetty:http://localhost:8080/json?matchOnUriPrefix=true").
    	 process(new Processor() {
			
			@Override
			public void process(Exchange exchange) throws Exception {
				String payload = exchange.getIn().getBody(String.class);
				JSONObject jsonObj = JSONObject.fromObject(payload);
				exchange.getIn().setHeader(CxfConstants.OPERATION_NAME, "find);
				RequestPolicyView requestPolicyView = new RequestPolicyView();
				requestPolicyView.setPolicyNo( (Integer)jsonObj.get("pNo"));
				Object[] args = new Object[] {requestPolicyView};	
				exchange.getIn().setBody(requestPolicyView);
				
				
			}
		}).to(serviceEndpoint).process(new Processor() {
			
			@Override
			public void process(Exchange exchange) throws Exception {
				ResponsePView responsePolicyView =
exchange.getIn().getBody(ResponsePView.class);
				JSONObject jsonObj = JSONObject.fromObject(responsePolicyView);
				exchange.getIn().setBody(jsonObj.toString());
				
			}
		}).marshal().xstream();
    }

and its work fine ,now i try to configure this code with xml 

how can .marshal().xstream() on xml ?


thanks 



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