Monday, December 5, 2011

Netbeans and Apache Axis2



Netbeans and Axis2

1. Install the axis2 support plugin for netbeans (try to get the nbm file and then manually install it)

http://netbeans.org/kb/69/websvc/gs-axis.html
http://dlc.sun.com.edgesuite.net/netbeans/updates/6.7/uc/m2/dev/modules/extra/org-netbeans-modules-websvc-axis2.nbm

2. Whenever you make changes to classes
 - regenerate the wsdl
 - then redeploy else changes will not take effect

3. If regenerating wsdl generates errors related to ClassNotFound, add all the relevant libraries in axis2-build.xml file for the relevant target

Example: added reference to lucene-core-3.3.0.jar in the classpath


<target name="java2wsdl-WikitologyPrediction" depends="java2wsdl-check-WikitologyPrediction, compile" unless="java2wsdl-check-WikitologyPrediction.notRequired">
        <java2wsdl className="wikitology.WikitologyPrediction" serviceName="WikitologyPrediction" outputLocation="${basedir}/xml-resources/axis2/META-INF" outputFileName="WikitologyPrediction.wsdl" targetNamespace="http://wikitology/" schemaTargetNamespace="http://wikitology/xsd">
            <classpath>
                <pathelement location="${basedir}/libs/lucene-core-3.3.0.jar"/>
                <pathelement location="${build.dir}/classes"/>
                <pathelement location="${javac.classpath}"/>
            </classpath>
        </java2wsdl>
    </target>




   
       
           
               
               
               
           
       
   

No comments: