Looks like it is not finding the directory "temp" - I am guessing that "temp" does not exist. In your command line you specify it as : $ javac -extdirs /path/to/axis2-RC1-std-bin/lib/ org/apache/axis2/*.java -d temp/ -Xlint Yash
_____ From: Brian Riley [mailto:[email protected]] Sent: Friday, October 02, 2009 8:01 AM To: [email protected] Subject: Re: Trouble with wsdl2java.sh Thanks Amila, That was a step in the right direction, I followed the tutorial you mentioned and I was able to get the wsdl2java to work. It created my 2 java client files. I then created my own client.java to use these new java classes. When I go to run the $ javac -extdirs /path/to/axis2-RC1-std-bin/lib/ org/apache/axis2/*.java -d temp/ -Xlint line though in step 5 I get the following error which I cannot figure out. It seems like there is something wrong with the java generated by wsdl2java or there is a step I missed from the tutorial. Please let me know if you have any ideas why it would be doing this. I am running Mac OS X 10.5.8 with J2SE 5.0 32bit. Thank you! org/apache/ws/axis2/HelloWorldStub.java:676: warning: [unchecked] unchecked call to put(K,V) as a member of the raw type java.util.Map returnMap.put(ns.getPrefix(),ns.getNamespaceURI()); org/apache/ws/axis2/HelloWorldStub.java:1070: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList elementList.add(new javax.xml.namespace.QName("http://ws.apache.org/axis2", org/apache/ws/axis2/HelloWorldStub.java:1073: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList elementList.add(local_return==null?null: org/apache/ws/axis2/HelloWorldStub.java:1562: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList elementList.add(new javax.xml.namespace.QName("http://ws.apache.org/axis2", org/apache/ws/axis2/HelloWorldStub.java:1565: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList elementList.add(localArgs0==null?null: org/apache/ws/axis2/HelloWorldStub.java:2053: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList elementList.add(new javax.xml.namespace.QName("http://ws.apache.org/axis2", org/apache/ws/axis2/HelloWorldStub.java:2056: warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.ArrayList elementList.add(local_return==null?null: org/apache/ws/axis2/HelloWorldStub.java:379: error while writing : temp/org/apache/ws/axis2/HelloWorldStub$1.class (No such file or directory) public void onComplete() { 1 error 7 warnings Amila Suriarachchi wrote: try this[1]. Seems like your wsdl does not have a targetnamespace thanks, Amila. [1] http://wso2.org/library/95 On Fri, Oct 2, 2009 at 2:00 AM, Brian Riley wrote: > Hi all, > > I am new to Axis2 and am just getting back into Java (been away for 4 years > working in an MS shop ... shudder). Anyway, I am trying to test out a simple > hello world web service and am trying to generate the java classes from > Axis' handy wsdl2java.sh script, but I keep getting a NullPointerException > when executing. > > Here's the message after I run *$AXIS2_HOME/bin/wsdl2java.sh -uri > ./helloworld_ws.wsdl -ss -sd* the wsdl is attached. Any help would be > greatly appreciated, even if you could provide a basic hello world sample > that I could then build off of would be fantastic (all the ones I found > including the one on the Apache site did not work for me perhaps because > they were targeted for ant deploymenthelloworld_ws.wsdl) > as I'm just trying to put together a proof of concept at this point for my > project. > > Retrieving document at './helloworld_ws.wsdl'. [ERROR] > java.lang.NullPointerException at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.findBinding(WSDL11To AxisServiceBuilder.java:958) > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL 11ToAxisServiceBuilder.java:330) > at > org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServi ces(WSDL11ToAllAxisServicesBuilder.java:107) > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.jav a:147) > at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at > org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Exception in thread > "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing > WSDL at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.jav a:153) > at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at > org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by: > org.apache.axis2.AxisFault at > org.apache.axis2.AxisFault.makeFault(AxisFault.java:430) at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL 11ToAxisServiceBuilder.java:396) > at > org.apache.axis2.description.WSDL11ToAllAxisServicesBuilder.populateAllServi ces(WSDL11ToAllAxisServicesBuilder.java:107) > at > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.jav a:147) > ... 2 more Caused by: java.lang.NullPointerException at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.findBinding(WSDL11To AxisServiceBuilder.java:958) > at > org.apache.axis2.description.WSDL11ToAxisServiceBuilder.populateService(WSDL 11ToAxisServiceBuilder.java:330) > ... 4 more > ------------------------------ > View this message in context: Trouble with wsdl2java.sh > Sent from the Axis - User mailing list archiveat Nabble.com. > -- Amila Suriarachchi WSO2 Inc. blog: http://amilachinthaka.blogspot.com/ _____ View this message in context: Re: <http://www.nabble.com/Trouble-with-wsdl2java.sh-tp25705957p25716583.html> Trouble with wsdl2java.sh Sent from the Axis - User mailing list <http://www.nabble.com/Axis---User-f232.html> archive at Nabble.com.
