Tried running through the steps to re-create the camel-mail-binding quickstart and ran into an issue.
STEPS TO REPRODUCE 1. Create a bean component 2. Promote 3. Add mail binding 4. Use the options shown in the screenshot attached. Do not change or edit the Account Type 5. View the generated switchyard.xml. You should see a mail binding like the following :
<mail:binding.mail name="mail1" secure="true"> <sy:operationSelector operationName="process"/> <mail:host>imap.gmail.com</mail:host> <mail:username>switchyardtest</mail:username> <mail:password>Sw1tchyard</mail:password> <mail:consume> <mail:folderName>inbox</mail:folderName> </mail:consume> </mail:binding.mail>
mail:consume should have a accountType="imap" attribute.
If I deploy this quickstart, I see an exception because the Mail component requires the account type :
Caused by: java.lang.NullPointerException: Name is null at java.lang.Enum.valueOf(Enum.java:235) [rt.jar:1.7.0_45] at org.switchyard.component.camel.mail.model.v1.V1CamelMailConsumerBindingModel$AccountType.valueOf(V1CamelMailConsumerBindingModel.java:30) at org.switchyard.component.camel.mail.model.v1.V1CamelMailConsumerBindingModel.getProtocol(V1CamelMailConsumerBindingModel.java:137) at org.switchyard.component.camel.mail.model.v1.V1CamelMailBindingModel.getComponentURI(V1CamelMailBindingModel.java:173) at org.switchyard.component.camel.common.handler.InboundHandler.getRouteId(InboundHandler.java:96) at org.switchyard.component.camel.common.handler.InboundHandler.createRouteDefinition(InboundHandler.java:81) at org.switchyard.component.camel.common.handler.InboundHandler.<init>(InboundHandler.java:67) ... 11 more
|