On Mon, Aug 25, 2014 at 4:42 PM, Suhan Dharmasuriya <suh...@wso2.com> wrote:
> Thanks a lot Rajith, > > It is working now... :) :) :) > > Why don't you compare the pom file with existing stubs in SVN ? :) -Ajith > <plugin> > <groupId>org.apache.axis2</groupId> > <artifactId>axis2-wsdl2code-maven-plugin</artifactId> > <version>1.6.2</version> > <executions> > <execution> > <goals> > <goal>wsdl2code</goal> > </goals> > <configuration> > <generateServerSide>false</generateServerSide> > > <packageName>org.wso2.carbon.student.mgt.stub</packageName> > > <wsdlFile>src/main/resources/StudentManager.wsdl</wsdlFile> > <databindingName>adb</databindingName> > > <outputDirectory>target/generated-code</outputDirectory> > </configuration> > </execution> > </executions> > </plugin> > > Thanks and Regards, > Suhan > > > On Mon, Aug 25, 2014 at 4:00 PM, Rajith Vitharana <raji...@wso2.com> > wrote: > >> Hi Thushara, Suhan, >> >> Try using "axis2-wsdl2code-maven-plugin" to generate the stub, instead of >> using "maven-antrun-plugin". >> >> <plugin> >> <groupId>org.apache.axis2</groupId> >> <artifactId>axis2-wsdl2code-maven-plugin</artifactId> >> <version>1.6.2</version> >> <executions> >> <execution> >> <goals> >> <goal>wsdl2code</goal> >> </goals> >> <configuration> >> <generateServerSide>false</generateServerSide> >> >> <packageName>org.wso2.carbon.order.mgt.ui</packageName> >> >> <wsdlFile>src/main/resources/OrderManager.wsdl</wsdlFile> >> <databindingName>adb</databindingName> >> >> <outputDirectory>target/generated-code</outputDirectory> >> </configuration> >> </execution> >> </executions> >> </plugin> >> >> Thanks, >> >> >> On Mon, Aug 25, 2014 at 3:24 PM, Suhan Dharmasuriya <suh...@wso2.com> >> wrote: >> >>> Hi Danushka, >>> >>> I also was getting the same error and I tried build with the pom file >>> updated with namespaces. >>> >>> <configuration> >>> <tasks> >>> <path id="wsdl2java.classpath"> >>> <pathelement >>> location="${settings.localRepository}/org/apache/ws/commons/axiom/wso2/axiom/1.2.11.wso2v4/axiom-1.2.11.wso2v4.jar"/> >>> <pathelement >>> location="${settings.localRepository}/org/apache/axis2/wso2/axis2-client/1.6.1.wso2v10/axis2-client-1.6.1.wso2v10.jar" >>> /> >>> <pathelement >>> location="${settings.localRepository}/org/apache/axis2/wso2/axis2/1.6.1.wso2v10/axis2-1.6.1.wso2v10.jar" >>> /> >>> </path> >>> <java >>> classname="org.apache.axis2.wsdl.WSDL2Java" fork="true"> >>> <classpath >>> refid="wsdl2java.classpath" /> >>> <arg line="-uri >>> src/main/resources/StudentManager.wsdl -u -uw >>> -o target/generated-code -p >>> org.wso2.carbon.student.mgt.stub >>> -ns2p >>> http://mgt.student.carbon.wso2.org=org.wso2.carbon.student.mgt.stub, >>> >>> http://data.mgt.student.carbon.wso2.org/xsd=org.wso2.carbon.student.mgt.stub.xsd >>> , >>> >>> http://org.apache.axis2/xsd=org.wso2.carbon.student.mgt.stub.axis2.xsd >>> "/> >>> </java> >>> </tasks> >>> </configuration> >>> >>> But still getting the same error. >>> >>> Please be kind enough to give further advice. >>> >>> The tutorial we are following[1]. >>> >>> [1] >>> http://wso2.com/library/tutorials/2014/03/how-to-write-a-wso2-carbon-component/ >>> >>> Thanks, >>> Suhan >>> >>> >>> On Mon, Aug 25, 2014 at 2:24 PM, Danushka Fernando <danush...@wso2.com> >>> wrote: >>> >>>> Seems you haven't defined the namespaces in the pom. Check [1]. There >>>> you can see following line which defines the namespaces mentioned in wsdl. >>>> >>>> <arg line="-uri src/main/resources/ApplicationDeployer.wsdl -u -uw >>>> -o target/generated-code -p >>>> org.wso2.carbon.appfactory.application.deployer.stub >>>> -ns2p >>>> http://deploy.core.appfactory.carbon.wso2.org >>>> =org.wso2.carbon.appfactory.application.deployer.stub, >>>> http://deploy.core.appfactory.carbon.wso2.org/xsd=org.wso2.carbon.appfactory.application.deployer.stub.xsd,http://org.apache.axis2/xsd=org.wso2.carbon.appfactory.application.deployer.stub.axis2.xsd >>>> "/> >>>> >>>> >>>> [1] >>>> https://svn.wso2.org/repos/wso2/scratch/appfactory_2.0.0/service-stubs/org.wso2.carbon.appfactory.application.deployer.stub/2.0.1 >>>> >>>> Thanks & Regards >>>> Danushka Fernando >>>> Software Engineer >>>> WSO2 inc. http://wso2.com/ >>>> Mobile : +94716332729 >>>> >>>> >>>> On Mon, Aug 25, 2014 at 2:03 PM, Thushara Ranawaka <thusha...@wso2.com> >>>> wrote: >>>> >>>>> Kindly fine the requested files. >>>>> >>>>> >>>>> On Mon, Aug 25, 2014 at 1:14 PM, Danushka Fernando <danush...@wso2.com >>>>> > wrote: >>>>> >>>>>> Hi >>>>>> Can you add the pom.xml and the wsdl used for stub generation? >>>>>> >>>>>> Thanks & Regards >>>>>> Danushka Fernando >>>>>> Software Engineer >>>>>> WSO2 inc. http://wso2.com/ >>>>>> Mobile : +94716332729 >>>>>> >>>>>> >>>>>> On Mon, Aug 25, 2014 at 12:43 PM, Thushara Ranawaka < >>>>>> thusha...@wso2.com> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> After adding the repository xml code to the stub pom.xml I got the >>>>>>> following log file which include a error message. Currently im using mvn >>>>>>> 3.2.3 and i tried to get rid from the error by using mvn 3.0.5 but >>>>>>> still it >>>>>>> prints the error log. I found a mail-archive[1] which include the >>>>>>> same error log as per the answer he has found including the axis2-client >>>>>>> jar dependency to pom.xml but i try to add above dependancy and >>>>>>> fail. Can someone help me on this. >>>>>>> >>>>>>> *axis2-client dependency added to the stub pom.xml(which failed):-* >>>>>>> >>>>>>> *<dependency>* >>>>>>> >>>>>>> * <groupId>org.apache.axis2.wso2</groupId>* >>>>>>> >>>>>>> * <artifactId>axis2-client</artifactId>* >>>>>>> >>>>>>> * <version>${axis2.client.version}</version>* >>>>>>> >>>>>>> * </dependency>* >>>>>>> >>>>>>> *Log:-* >>>>>>> >>>>>>> Thusharas-MacBook-Pro:org.wso2.carbon.student.mgt.stub thushara$ mvn >>>>>>> clean install -e >>>>>>> >>>>>>> [INFO] Error stacktraces are turned on. >>>>>>> >>>>>>> [INFO] Scanning for projects... >>>>>>> >>>>>>> [WARNING] >>>>>>> >>>>>>> [WARNING] Some problems were encountered while building the >>>>>>> effective model for >>>>>>> org.wso2.carbon:org.wso2.carbon.student.mgt.stub:bundle:4.2.0 >>>>>>> >>>>>>> [WARNING] 'build.plugins.plugin.version' for >>>>>>> org.apache.felix:maven-bundle-plugin is missing. @ line 70, column 21 >>>>>>> >>>>>>> [WARNING] 'build.plugins.plugin.version' for >>>>>>> org.codehaus.mojo:build-helper-maven-plugin is missing. @ line 51, >>>>>>> column 21 >>>>>>> >>>>>>> [WARNING] >>>>>>> >>>>>>> [WARNING] It is highly recommended to fix these problems because >>>>>>> they threaten the stability of your build. >>>>>>> >>>>>>> [WARNING] >>>>>>> >>>>>>> [WARNING] For this reason, future Maven versions might no longer >>>>>>> support building such malformed projects. >>>>>>> >>>>>>> [WARNING] >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> >>>>>>> [INFO] >>>>>>> ------------------------------------------------------------------------ >>>>>>> >>>>>>> [INFO] Building org.wso2.carbon.student.mgt.stub 4.2.0 >>>>>>> >>>>>>> [INFO] >>>>>>> ------------------------------------------------------------------------ >>>>>>> >>>>>>> Downloading: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom >>>>>>> >>>>>>> Downloaded: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.pom >>>>>>> (5 >>>>>>> KB at 2.9 KB/sec) >>>>>>> >>>>>>> Downloading: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/18/maven-plugins-18.pom >>>>>>> >>>>>>> Downloaded: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/18/maven-plugins-18.pom >>>>>>> (13 >>>>>>> KB at 21.2 KB/sec) >>>>>>> >>>>>>> Downloading: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/16/maven-parent-16.pom >>>>>>> >>>>>>> Downloaded: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/maven/maven-parent/16/maven-parent-16.pom >>>>>>> (23 >>>>>>> KB at 26.1 KB/sec) >>>>>>> >>>>>>> Downloading: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/apache/7/apache-7.pom >>>>>>> >>>>>>> Downloaded: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/apache/7/apache-7.pom (15 >>>>>>> KB at 9.9 KB/sec) >>>>>>> >>>>>>> Downloading: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar >>>>>>> >>>>>>> Downloaded: >>>>>>> http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.4.1/maven-clean-plugin-2.4.1.jar >>>>>>> (23 >>>>>>> KB at 24.4 KB/sec) >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ >>>>>>> org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Deleting >>>>>>> /Users/thushara/Documents/workspaceluna/student-manager/student-manager-components/org.wso2.carbon.student.mgt.stub/target >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- build-helper-maven-plugin:1.9:add-source (add-source) @ >>>>>>> org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Source directory: >>>>>>> /Users/thushara/Documents/workspaceluna/student-manager/student-manager-components/org.wso2.carbon.student.mgt.stub/target/generated-code/src >>>>>>> added. >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-resources-plugin:2.6:resources (default-resources) >>>>>>> @ org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Using 'UTF-8' encoding to copy filtered resources. >>>>>>> >>>>>>> [INFO] Copying 1 resource >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-antrun-plugin:1.1:run (source-code-generation) @ >>>>>>> org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Executing tasks >>>>>>> >>>>>>> [java] Exception in thread "main" >>>>>>> java.lang.NoClassDefFoundError: javax/wsdl/WSDLException >>>>>>> >>>>>>> [java] at >>>>>>> org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) >>>>>>> >>>>>>> [java] at >>>>>>> org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) >>>>>>> >>>>>>> [java] Caused by: java.lang.ClassNotFoundException: >>>>>>> javax.wsdl.WSDLException >>>>>>> >>>>>>> [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:366) >>>>>>> >>>>>>> [java] at java.net.URLClassLoader$1.run(URLClassLoader.java:355) >>>>>>> >>>>>>> [java] at java.security.AccessController.doPrivileged(Native >>>>>>> Method) >>>>>>> >>>>>>> [java] at >>>>>>> java.net.URLClassLoader.findClass(URLClassLoader.java:354) >>>>>>> >>>>>>> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:423) >>>>>>> >>>>>>> [java] at >>>>>>> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) >>>>>>> >>>>>>> [java] at java.lang.ClassLoader.loadClass(ClassLoader.java:356) >>>>>>> >>>>>>> [java] ... 2 more >>>>>>> >>>>>>> [java] Java Result: 1 >>>>>>> >>>>>>> [INFO] Executed tasks >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ >>>>>>> org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Changes detected - recompiling the module! >>>>>>> >>>>>>> [INFO] Compiling 1 source file to >>>>>>> /Users/thushara/Documents/workspaceluna/student-manager/student-manager-components/org.wso2.carbon.student.mgt.stub/target/classes >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-resources-plugin:2.6:testResources >>>>>>> (default-testResources) @ org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Using 'UTF-8' encoding to copy filtered resources. >>>>>>> >>>>>>> [INFO] skip non existing resourceDirectory >>>>>>> /Users/thushara/Documents/workspaceluna/student-manager/student-manager-components/org.wso2.carbon.student.mgt.stub/src/test/resources >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-compiler-plugin:3.1:testCompile >>>>>>> (default-testCompile) @ org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Changes detected - recompiling the module! >>>>>>> >>>>>>> [INFO] Compiling 1 source file to >>>>>>> /Users/thushara/Documents/workspaceluna/student-manager/student-manager-components/org.wso2.carbon.student.mgt.stub/target/test-classes >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-surefire-plugin:2.17:test (default-test) @ >>>>>>> org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Surefire report directory: >>>>>>> /Users/thushara/Documents/workspaceluna/student-manager/student-manager-components/org.wso2.carbon.student.mgt.stub/target/surefire-reports >>>>>>> >>>>>>> >>>>>>> ------------------------------------------------------- >>>>>>> >>>>>>> T E S T S >>>>>>> >>>>>>> ------------------------------------------------------- >>>>>>> >>>>>>> Running org.org.wso2.carbon.student.mgt.stub.AppTest >>>>>>> >>>>>>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: >>>>>>> 0.001 sec - in org.org.wso2.carbon.student.mgt.stub.AppTest >>>>>>> >>>>>>> >>>>>>> Results : >>>>>>> >>>>>>> >>>>>>> Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 >>>>>>> >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-bundle-plugin:2.5.0:bundle (default-bundle) @ >>>>>>> org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [WARNING] Bundle >>>>>>> org.wso2.carbon:org.wso2.carbon.student.mgt.stub:bundle:4.2.0 : Unused >>>>>>> Export-Package instructions: [org.wso2.carbon.student.mgt.*] >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-install-plugin:2.5.1:install (default-install) @ >>>>>>> org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Installing >>>>>>> /Users/thushara/Documents/workspaceluna/student-manager/student-manager-components/org.wso2.carbon.student.mgt.stub/target/org.wso2.carbon.student.mgt.stub-4.2.0.jar >>>>>>> to >>>>>>> /Users/thushara/.m2/repository/org/wso2/carbon/org.wso2.carbon.student.mgt.stub/4.2.0/org.wso2.carbon.student.mgt.stub-4.2.0.jar >>>>>>> >>>>>>> [INFO] Installing >>>>>>> /Users/thushara/Documents/workspaceluna/student-manager/student-manager-components/org.wso2.carbon.student.mgt.stub/pom.xml >>>>>>> to >>>>>>> /Users/thushara/.m2/repository/org/wso2/carbon/org.wso2.carbon.student.mgt.stub/4.2.0/org.wso2.carbon.student.mgt.stub-4.2.0.pom >>>>>>> >>>>>>> [INFO] >>>>>>> >>>>>>> [INFO] --- maven-bundle-plugin:2.5.0:install (default-install) @ >>>>>>> org.wso2.carbon.student.mgt.stub --- >>>>>>> >>>>>>> [INFO] Installing >>>>>>> org/wso2/carbon/org.wso2.carbon.student.mgt.stub/4.2.0/org.wso2.carbon.student.mgt.stub-4.2.0.jar >>>>>>> >>>>>>> [INFO] Writing OBR metadata >>>>>>> >>>>>>> [INFO] >>>>>>> ------------------------------------------------------------------------ >>>>>>> >>>>>>> [INFO] BUILD SUCCESS >>>>>>> >>>>>>> [INFO] >>>>>>> ------------------------------------------------------------------------ >>>>>>> >>>>>>> [INFO] Total time: 8.935s >>>>>>> >>>>>>> [INFO] Finished at: Mon Aug 25 12:14:50 IST 2014 >>>>>>> >>>>>>> [INFO] Final Memory: 17M/51M >>>>>>> >>>>>>> [INFO] >>>>>>> ------------------------------------------------------------------------ >>>>>>> >>>>>>> -- >>>>>>> Thushara Kasun Ranawaka >>>>>>> Software Engineer >>>>>>> WSO2 Inc.; <http://www.wso2.com> >>>>>>> lean.enterprise.middleware >>>>>>> Mobile : *+94 (0) 773438949 <%2B94%20%280%29%20773438949>* >>>>>>> *thusha...@wso2.com <thusha...@wso2.com>* >>>>>>> >>>>>>> _______________________________________________ >>>>>>> Dev mailing list >>>>>>> Dev@wso2.org >>>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>>>>> >>>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Thushara Kasun Ranawaka >>>>> Software Engineer >>>>> WSO2 Inc.; <http://www.wso2.com> >>>>> lean.enterprise.middleware >>>>> Mobile : *+94 (0) 773438949 <%2B94%20%280%29%20773438949>* >>>>> *thusha...@wso2.com <thusha...@wso2.com>* >>>>> >>>> >>>> >>>> _______________________________________________ >>>> Dev mailing list >>>> Dev@wso2.org >>>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>>> >>>> >>> >>> >>> -- >>> Suhan Dharmasuriya >>> Software Engineer - Test Automation >>> >>> *WSO2, Inc. * >>> >>> lean . enterprise . middleware >>> Tel: +94 112 145345 >>> Mob: +94 779 869138 >>> >>> _______________________________________________ >>> Dev mailing list >>> Dev@wso2.org >>> http://wso2.org/cgi-bin/mailman/listinfo/dev >>> >>> >> >> >> -- >> Rajith Vitharana >> >> Software Engineer, >> WSO2 Inc. : wso2.com >> Mobile : +94715883223 >> Blog : http://lankavitharana.blogspot.com/ >> > > > > -- > Suhan Dharmasuriya > Software Engineer - Test Automation > > *WSO2, Inc. * > > lean . enterprise . middleware > Tel: +94 112 145345 > Mob: +94 779 869138 > > _______________________________________________ > Dev mailing list > Dev@wso2.org > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Ajith Vitharana. WSO2 Inc. - http://wso2.org Email : aji...@wso2.com Mobile : +94772217350
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev