Polycom 3725-49106-001 Rev A Cell Phone User Manual


 
Web Application for Polycom Phones UC Software 5.0.0
Polycom, Inc. 67
// DEFINE URL FROM WHERE CONTENT TO BE RETRIEVED
String stockUrl = "http://ichart.yahoo.com/t?s=";
// RETRIEVE THE STOCK SYMBOL FROM REQUEST
String stockSymbol = "PLCM"; // DEFAULT TO PLCM
if ( request.getParameter("stockname") != null ) {
stockSymbol = request.getParameter("stockname");
}
readAndConvertContentToBmp(stockUrl + stockSymbol, bmpFilePath, stockSymbol);
%>
<%!
// READ THE CONTENT FROM GIVEN URL AND THEN CONVERT THE CONTENT TO A BMP FILE
private void readAndConvertContentToBmp(String a_stockUrl, String a_filePath, String
a_name) throws IOException {
try {
BufferedImage stockImage = ImageIO.read(new URL(a_stockUrl));
ImageIO.write(stockImage, "bmp", new File(a_filePath));
}
catch (IOException ex) { throw ex; }
}
%>
<!-- START DISPLAY BMP FILE -->
<img src="quote.bmp"/>
<!-- END DISPLAY BMP FILE -->
</body>
</html>
4 Configure the Web server to deploy the above JSP file.
For example, if you are using Apache Tomcat to try this example, put this file into the
webapps\PLCM folder of Tomcat.
5 For this example, change mb.main.home to
http://<WEBSERVER_ADDRESS:PORT>/PLCM/AddStock.xhtml .
6 Reboot the phone.
7 On a SoundPoint IP phone, press the Applications key.
The AddStock.xhtml displays on the screen.
8 Enter a stock symbol, and select the Get Quote soft key.
The stock quote for the entered stock symbol displays on the screen.
XML API Application
The following instructions show you how to create a XML API application that provides a callback request
in the main browser.
This example uses a Telephone Integration URI:
This is an ASP.NET sample for an IIS Server.