Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CamelContext context =new DefaultCamelContext();
- HttpComponent httpComponent = new HttpComponent();
- context.addComponent("http", httpComponent);
- ProducerTemplate template = context.createProducerTemplate();
- GetQuote getQuote = new GetQuote();
- getQuote.setSymbol("test123");
- GetQuoteResponse getQuoteResponse = template.requestBody("http://www.webservicex.net/stockquote.asmx",getQuote, GetQuoteResponse.class);
- System.out.println(getQuoteResponse);
- Caused by: org.apache.camel.InvalidPayloadException: No body available of type: java.io.InputStream but has value: net.webservicex.GetQuote@10bdf5e5 of type: net.webservicex.GetQuote on: Message[ID-namal-PC-33172-1469806939935-0-1]. Caused by: No type converter available to convert from type: net.webservicex.GetQuote to the required type: java.io.InputStream with value net.webservicex.GetQuote@10bdf5e5. Exchange[ID-namal-PC-33172-1469806939935-0-2]. Caused by: [org.apache.camel.NoTypeConversionAvailableException - No type converter available to convert from type: net.webservicex.GetQuote to the required type: java.io.InputStream with value net.webservicex.GetQuote@10bdf5e5]
- Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: net.webservicex.GetQuote to the required type: java.io.InputStream with value net.webservicex.GetQuote@10bdf5e5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement