camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From miri eyni <miri.e...@sapiens.com>
Subject marshel
Date Sun, 22 May 2016 06:58:01 GMT
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.

Mime
View raw message