Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 8877 invoked from network); 8 Jan 2007 02:40:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Jan 2007 02:40:09 -0000 Received: (qmail 53327 invoked by uid 500); 8 Jan 2007 02:40:07 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 53308 invoked by uid 500); 8 Jan 2007 02:40:07 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 53297 invoked by uid 99); 8 Jan 2007 02:40:07 -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 18:40:07 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of fawad.nazir@nicta.com.au designates 203.143.174.70 as permitted sender) Received: from [203.143.174.70] (HELO mail.nicta.com.au) (203.143.174.70) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 07 Jan 2007 18:39:57 -0800 Received: from mail.nicta.com.au (localhost [127.0.0.1]) by localhost.nicta.com.au (Postfix) with ESMTP id 3CE91CDFB3; Mon, 8 Jan 2007 13:39:36 +1100 (EST) Received: from mailbag.nicta.com.au (mailbag.nicta.com.au [203.143.174.79]) by mail.nicta.com.au (Postfix) with ESMTP id 28E4FCDFAF; Mon, 8 Jan 2007 13:39:36 +1100 (EST) Received: from 203.143.170.104 (SquirrelMail authenticated user NICTA\fnazir\fawad.nazir) by mailbag.nicta.com.au with HTTP; Mon, 8 Jan 2007 13:39:36 +1100 (EST) Message-ID: <60460.203.143.170.104.1168223976.squirrel@mailbag.nicta.com.au> In-Reply-To: References: <40369.203.143.170.104.1168216866.squirrel@mailbag.nicta.com.au> Date: Mon, 8 Jan 2007 13:39:36 +1100 (EST) Subject: Re: Unrecognized option: -cn... Could not create the Java virtual machine... From: "Fawad Nazir" To: "Martin Gainty" Cc: axis-user@ws.apache.org Reply-To: fawad.nazir@nicta.com.au User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Virus-Checked: Checked by ClamAV on apache.org Thanks a lot... Martin. > Here is the fix (I used StockQuoteService frpm quickstart.service.pojo.. > > 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 Double>(); > > 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)); > } > } > } > > HTH > MG- > --------------------------------------------------------------------------- > This e-mail message (including attachments, if any) is intended for the > use of the individual or entity to which it is addressed and may contain > information that is privileged, proprietary , confidential and exempt from > disclosure. If you are not the intended recipient, you are notified that > any dissemination, distribution or copying of this communication is > strictly prohibited. > --------------------------------------------------------------------------- > Le pr�sent message �lectronique (y compris les pi�ces qui y sont annex�es, > le cas �ch�ant) s'adresse au destinataire indiqu� et peut contenir des > renseignements de caract�re priv� ou confidentiel. Si vous n'�tes pas le > destinataire de ce document, nous vous signalons qu'il est strictement > interdit de le diffuser, de le distribuer ou de le reproduire. > ----- Original Message ----- > From: "Fawad Nazir" > To: > Sent: Sunday, January 07, 2007 7:41 PM > Subject: Unrecognized option: -cn... Could not create the Java virtual > machine... > > >> >> 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 email and any attachments may be confidential. They may contain >> legally >> privileged information or copyright material. You should not read, >> copy, >> use or disclose them without authorisation. If you are not an intended >> recipient, please contact us at once by return email and then delete >> both >> messages. We do not accept liability in connection with computer virus, >> data corruption, delay, interruption, unauthorised access or >> unauthorised >> amendment. This notice should not be removed. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org >> For additional commands, e-mail: axis-user-help@ws.apache.org >> >> -- Fawad Nazir --------------------------------------------------------------------- To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org For additional commands, e-mail: axis-user-help@ws.apache.org