Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 17180 invoked from network); 8 Jan 2007 03:18:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jan 2007 03:18:57 -0000 Received: (qmail 83007 invoked by uid 500); 8 Jan 2007 03:18:55 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 82924 invoked by uid 500); 8 Jan 2007 03:18:55 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 82899 invoked by uid 99); 8 Jan 2007 03:18:55 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Jan 2007 19:18:55 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Jan 2007 19:18:47 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DDD497142B6 for ; Sun, 7 Jan 2007 19:18:27 -0800 (PST) Message-ID: <24142549.1168226307905.JavaMail.jira@brutus> Date: Sun, 7 Jan 2007 19:18:27 -0800 (PST) From: "Fawad Nazir (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Commented: (AXIS2-1951) Axis2 Quick Start Guide is not working with JDK 1.5 In-Reply-To: <9723833.1168225107643.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-1951?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462936 ] Fawad Nazir commented on AXIS2-1951: ------------------------------------ Got a reply from "Martin Gainty" > package samples.quickstart.service.pojo; > > import java.util.HashMap; > > public class StockQuoteService { > // private java.util.HashMap map = new HashMap(); > //remember templates in C++ well we can do the same thing here in our declaration for HashMap > protected HashMap map = new HashMap(); > > public double getPrice(String symbol) { > Double price = (Double) map.get(symbol); > if(price != null){ > return price.doubleValue(); > } > return 42.00; > } > > public void update(String symbol, double price) > { > //quick sanity check..MCG > if(!map.isEmpty()) > { //technically map.put returns either previous value associated with key or null if error > Object returned_object = map.put(symbol, new Double(price)); > } > } > } A small correction: orrection the test for map.isEmpty is not needed for put so comment or delete that line > public void update(String symbol, double price) > { > //quick sanity check..MCG > if(!map.isEmpty()) > { //technically map.put returns either previous value associated with key or null if error > Object returned_object = map.put(symbol, new Double(price)); > } > } to public void update(String symbol, double price) { //technically map.put returns either previous value associated with key or null if error Object returned_object = map.put(symbol, new Double(price)); } > Axis2 Quick Start Guide is not working with JDK 1.5 > --------------------------------------------------- > > Key: AXIS2-1951 > URL: https://issues.apache.org/jira/browse/AXIS2-1951 > Project: Apache Axis 2.0 (Axis2) > Issue Type: Bug > Environment: java version "1.5.0_08" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03) > Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing) > Linux fawad-desktop 2.6.17-10-generic #2 SMP Tue Dec 5 22:28:26 UTC 2006 > i686 GNU/Linux > Reporter: Thilina Gunarathne > Priority: Blocker > > Creating a JIRA as per the request from an user.. > Hi, > I am following the Axis2 Quick Start Guide section (Getting Ready). > There are two steps for creating a WSDL file: > 1.Create and compile the Java class. > For this i am using the sample java class > samples/quickstart/service/pojo/StockQuoteService.java. > then i compiled the file. > fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$ > javac samples/quickstart/service/pojo/StockQuoteService.javaNote: > samples/quickstart/service/pojo/StockQuoteService.java uses unchecked or > unsafe operations. > Note: Recompile with -Xlint:unchecked for details. > I got the above error, then i did this: > fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$ > javac -Xlint:unchecked > samples/quickstart/service/pojo/StockQuoteService.javasamples/quickstart/service/pojo/StockQuoteService.java:17: > warning: [unchecked] unchecked call to put(K,V) as a member of the raw > type java.util.HashMap > map.put(symbol, new Double(price)); > ^ > 1 warning > Then i got the above mentioned warning. Is there anyway to get rid of this > warning?? > My java version is: > fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$ > java -version > java version "1.5.0_08" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_08-b03) > Java HotSpot(TM) Client VM (build 1.5.0_08-b03, mixed mode, sharing) > 2.The step two was: Generate the WSDL using the following command: > fawad@fawad-desktop:~/project/cobra/axis/axis2-1.1/samples/quickstart/src$ > $AXIS2_HOME/bin/java2wsdl.sh -cp . -cn > samples.quickstart.service.pojo.StockQuoteService -of > StockQuoteService.wsdl > Using AXIS2_HOME: /home/fawad/project/cobra/axis/axis2-1.1 > Using JAVA_HOME: /usr/lib/jvm/java-1.5.0-sun-1.5.0.08 > Unrecognized option: -cn > Could not create the Java virtual machine. > I got the above error. Please help me understand this and get rid of this. > Thanks... > -- > Fawad Nazir -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org