Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass variable to camel route #41

Open
vagostep opened this issue Mar 16, 2018 · 1 comment
Open

Pass variable to camel route #41

vagostep opened this issue Mar 16, 2018 · 1 comment

Comments

@vagostep
Copy link

Hi, i follow the instructor for the readme page with indicate that the form for pass variable to a camel route.

The code is: "${camel.sendTo('direct:llamarPrueba', 'request')}"

Here, i call the route "llamarPrueba" and send the variable request.

The camel route is this: from("direct:llamarPrueba") .routeId(ROUTE_NAME) .marshal(marshaller) .to("spring-ws:http://localhost:8081/ws") .unmarshal(marshaller);

But when the marshal tried to process the variable, throw:

java.io.IOException: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.util.HashMap to the required type: java.io.InputStream with value {request=com.example.demo.cliente.GetCountryRequest@1922e2c1}

How i get only the value of 'request' for make the soap request properly?

@seletz
Copy link

seletz commented May 29, 2018

I think you can only marshal simple java types that way. That is, the process variable in this case sholuld be a simple java type (string, integer).

If you need complex types you might want to serialize them to e.g. JSON/XML and use spin in camuda to process/filter them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants