Thank you very very much Chamikara! By following your instructions i finally got it worked. It seems that the documentation should be improved in user guide.For those who are newbie too, i want to share my experinces:1) I wanted to create a web service from a WSDL. And followed the instructions given in the user guide.2) Instead of directly using the WSDL2Java command given in http://ws.apache.org/axis2/0_94/userguide2.html#Writing_Web_Services_by_Code_Generating_Skeleton, i used the following command: c:\axis2\bin>WSDL2Java -uri ..\samples\wsdl\Axis2SampleDocLit.wsdl -ss -sd -d xmlbeans -o ..\samples\mysample -p org.apache.axis2.userguideAs you may easily notice, i added "-d xmlbeans" parameter to make it use XMLBeans databinding. I also directed the output to samples\mysample to easily differentiate all the generated files and folders.3) All the generated files and folders were put under c:\axis2\samples\mysample fol
der. I
noticed that there was a build.xml file generated as well.4) I entered the c:\axis2\samples\mysample directory and run the ant with the following command:c:\axis2\samples\mysample>antIt gave me following error:BUILD FAILEDfile:c:/axis2/samples/mysample/build.xml:32: c:\axis2\samples\mysample\${env.AXIS2_HOME} not found.Then i set the AXIS2_HOME environment variable with the following command:c:\axis2\samples\mysample>set AXIS2_HOME=c:\axis2This may be set once as Environment Variable in Windows to prevent this process to be made for every code generation.Then i again run the ant command. This time it gave me following error:BUILD FAILEDfile:c:/axis2/samples/mysample/build.xml:54: srcdir "c:\axis2\samples\mysample\test" does not exist!I created a directory named "test" under c:\axis2\samples and rerun the ant.At last, everything worked well!5) I saw
deployment-ready Axis2SampleDocLitService.aar file generated under c:\axis2\samples\mysample\build\lib\6) I copyied the file under ...\webapps\axis2\WEB-INF\services directory of Tomcat and started it.7) When i browse the link http://localhost:8080/axis2/listServices.jsp, my service called Axis2SampleDocLitService was there at last!Chamikara Jayalath <[EMAIL PROTECTED]> wrote: Hi Sadik , Actually the 'schema' directory mentioned in the userguide is the 'resources' directory that was created by the WSDL2Java tool. After generating the files you can easily create the service archieve file by running the ant task. 1. Set the AXIS2_HOME environmental variable to the directory you extracted the Axis2 distribution. 2. Go to a command prompt. Move to y
our
output folder (to which you generated the files) and run the commant 'ant'. This will create the 'Axis2SampleDocLitService.aar' file in the 'build\lib' subdirectory. 3. Drop this to your 'webapps\axis2\WEB-INF\services' folder and start tomcat. Thanks, Chamikara On 2/26/06, Ali Sadik Kumlali <[EMAIL PROTECTED]> wrote: Dear all,I'm a new axis2 user and want to learn it by following the instructions in it's user guide.First of all, i tried to generate a web service from a given WSDL as introduced in "Writing Web Services by Code Generating Skeleton". Therefore, i generated Java files from Axis2SampleDocLit.wsdl found in samples\wsdl directory. I also pass
ed "-d
xmlbeans" parameter to WSDL2Java.bat to make it use XMLBeans databinding. When i looked at the generated files, i found two directory created: src and resources. Under resources folder there was an interesting directory called "schemaorg_apache_xmlbeans" which i could not found any reference in user guide. I thought it must be "schema" directory mentioned in the guide. Anyway, i filled the empty methods in Axis2SampleDocLitPortTypeSkeleton.java file with the codes given in the user guide. Created services.xml file and filled with the code given in the guide. And created a package called Axis2SampleDocLitPortType.aar by following the instuctions. After all, i put the file under the \webapps\axis2\WEB-INF\services directory. Then after started Tomcat 5.5, clicked the "services" link listed in http://localhost:8080/axis2/index.jsp. Since i did not see
the
Axis2SampleDocLitPortType service listed in the page, looked at the log files of Tomcat resides under logs directory. Then i saw a line says "NullPointerException" without any further information. I also tried to change the name of schemaorg_apache_xmlbeans directory to schema. It did not work either.Am i missing something?Thans in advance,Ali Sadik Kumlali
Yahoo! Mail
Bring photos to life! New PhotoMail makes sharing a breeze.