Re: rest to soap

2016-06-07 Thread miri eyni
i found the solution: i need to change the contectType to json and removing the marshal -- View this message in context: http://camel.465427.n5.nabble.com/rest-to-soap-tp5783547p5783570.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: rest to soap

2016-06-07 Thread Brad Johnson
Because XStream is marshaling it as XML. Why are you using XStream for that. I love XStream and it can do JSON but there are probably easier/better ways to do it. On Tue, Jun 7, 2016 at 6:08 AM, miri eyni wrote: > when i routing from soap to rest and than i marshal the response , i didn't > ge

Re: rest to soap

2016-05-16 Thread yogu13
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 t

Re: rest to soap

2016-05-16 Thread miri eyni
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(Exc

Re: rest to soap

2016-05-16 Thread yogu13
You need to transform the data which your SOAP endpoint can understand. Looks like you are missing that piece of code. BTW I see your payload is XML instead of JSON from the logs you added. Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/rest-to-soap-tp578

Re: rest to soap

2016-05-16 Thread miri eyni
thanks, i fixed the url but now i got status code :500 i check the server.log and its look like the request is a rest request instead of soap.request Content-Type: application/soap+xml Headers: {alis-datasource-key=[1], breadcrumbId=[ID-HLLT-PC0A4F7B-53348-1463390080537-0-2], Content-Length=

Re: rest to soap

2016-05-16 Thread miri eyni
the same error. i am also tested : from("jetty:http://localhost:8080/json?matchOnUriPrefix=true";). process(new Processor() { @Override public void process(Exchange exchange) throws Exception {

Re: rest to soap

2016-05-16 Thread yogu13
Status code 403 means its forbidden to access the url. is the url protected ? if yes then you might have to provide authentication details Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/rest-to-soap-tp5782601p5782609.html Sent from the Camel - Users maili

Re: rest to soap

2016-05-16 Thread yogu13
try setting the body of in message with the jsonObj exchange.getIn().setBody(jsonObj); and set the bean invocation to out as follows exchange.getOut.setBody(beanInvocation) Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/rest-to-soap-tp5782601p5782607.h

Re: rest to soap

2016-05-16 Thread miri eyni
now i process the request : public void process(Exchange exchange) throws Exception { * String payload = exchange.getIn().getBody(String.class); JSONObject jsonObj = JSONObject.fromObject(payload);*

Re: rest to soap

2016-05-15 Thread yogu13
Looks like you are not reading the request body which has come in as part of the from("jetty:http://localhost:8080/json?matchOnUriPrefix=true";) try reading it and convert it to the datatype that the route would use. Regards, -Yogesh -- View this message in context: http://camel.465427.n5