Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void configure() throws Exception {
- from("imaps://outlook.office365.com?username=almhu390@student.otago.ac.nz"
- + "&password=hussain1412"
- + "&searchTerm.subject=Vend:SaleUpdate"
- + "&debugMode=false" // set to true if you want to see the authentication details
- + "&folderName=INBOX") // change to whatever folder your Vend messages end up in
- .convertBodyTo(String.class)
- .log("${body}")
- .unmarshal().json(JsonLibrary.Gson, Sale.class)
- .to("jms:queue:vend-new-sale");
- from("jms:queue:vend-new-sale").log("${body}")
- .to("rmi://localhost:1099/sales?remoteInterfaces=aggregation.ISaleAggregation&method=newSale");
- from("imaps://outlook.office365.com?username=almhu390@student.otago.ac.nz"
- + "&password=hussain1412"
- + "&searchTerm.subject=Vend:InventoryUpdate"
- + "&debugMode=false" // set to true if you want to see the authentication details
- + "&folderName=INBOX") // change to whatever folder your Vend messages end up in
- .convertBodyTo(String.class)
- .log("${body}")
- .removeHeaders("*")
- .setHeader(Exchange.HTTP_METHOD, constant("POST"))
- .setHeader(Exchange.CONTENT_TYPE, constant("text/xml"))
- .unmarshal().json(JsonLibrary.Gson, Order.class).log("LOG HERE ******** : ${body}")
- .to("http4://localhost:8083/orders")
- .to("jms:queue:http-response");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement