You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2010/10/27 21:00:24 UTC

svn commit: r1028073 - /wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stockquote/StockQuote.java

Author: mgrigorov
Date: Wed Oct 27 19:00:24 2010
New Revision: 1028073

URL: http://svn.apache.org/viewvc?rev=1028073&view=rev
Log:
Fix stockquote example

Modified:
    wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stockquote/StockQuote.java

Modified: wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stockquote/StockQuote.java
URL: http://svn.apache.org/viewvc/wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stockquote/StockQuote.java?rev=1028073&r1=1028072&r2=1028073&view=diff
==============================================================================
--- wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stockquote/StockQuote.java (original)
+++ wicket/trunk/wicket-examples/src/main/java/org/apache/wicket/examples/stockquote/StockQuote.java Wed Oct 27 19:00:24 2010
@@ -36,7 +36,7 @@ public class StockQuote
 	 * We used to use the www.xmethods.com demo webservice for stockquotes. We now use webservicex,
 	 * as xmethods was really overloaded and unreliable.
 	 */
-	private static final String serviceUrl = "http://www.webservicex.net/stockquote.asmx";
+	private static final String serviceUrl = "http://www.webservicex.net/stockquote.asmx?op=GetQuote";
 
 	/** the symbol to get the quote for. */
 	private String symbol;
@@ -162,7 +162,7 @@ public class StockQuote
 	 * @throws ProtocolException
 	 */
 	private HttpURLConnection setUpHttpConnection(URL url, int length) throws IOException,
-			ProtocolException
+		ProtocolException
 	{
 		URLConnection connection = url.openConnection();
 		HttpURLConnection httpConn = (HttpURLConnection)connection;
@@ -211,8 +211,7 @@ public class StockQuote
 	private String createMessage(String symbol)
 	{
 		StringBuffer message = new StringBuffer("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
-		message
-				.append("<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">");
+		message.append("<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">");
 		message.append("  <soap:Body>");
 		message.append("    <GetQuote xmlns=\"http://www.webserviceX.NET/\">");
 		message.append("      <symbol>").append(symbol).append("</symbol>");