Advertisement
Guest User

Untitled

a guest
May 2nd, 2012
146
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.64 KB | None | 0 0
  1.         from("timer:mytimer?fixedRate=true&period=1m")
  2.             .setBody().constant(getMessageBody())  
  3.             .to("cxf://http://www.webservicex.net/stockquote.asmx?"
  4.                         + "wsdlURL=http://www.webservicex.net/stockquote.asmx?WSDL&"
  5.                         + "serviceName={http://www.webserviceX.NET/}StockQuote&"
  6.                         + "portName={http://www.webserviceX.NET/}StockQuoteSoap&"
  7.                         + "dataFormat=PAYLOAD&"
  8.                         + "operationName=GetStockquote")
  9.                 .log(LoggingLevel.INFO,"${body}");
  10.         ;
  11.  
  12.     }
  13.    
  14.     private String getMessageBody() {
  15.         return "<web:GetQuote xmlns:web=\"http://www.webserviceX.NET/\">\n" +
  16.                 "<web:symbol>Microsoft</web:symbol>\n" +
  17.                 "</web:GetQuote>\n";
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement