You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by mule_user <sg...@aol.com> on 2009/09/24 23:12:27 UTC

Java2WSDL in Axis1.2 gives error java.lang.NoClassDefFoundError: org/apache/axis/wsdlgen/Java2WSDL

I am using Axis 1.4 for Java2WSDL. It is a web project called MyAxis where
the source file is in src folder and the generated .class is under
WEB-INF/classes. However, for the sake of creating a WSDL, I copied .class
file to the src folder of MyAxis project.

AXIS_CLASSPATH is added as a user-variable as:

C:\Axis\axis-1_4\lib\axis.jar;C:\Axis\axis-1_4\lib\commons-discovery-0.2.jar;C:\Axis\axis-1_4\lib\commons-logging-1.0.4.jar;C:\Axis\axis-1_4\lib\jaxrpc.jar;C:\Axis\axis-1_4\lib\saaj.jar;C:\Axis\axis-1_4\lib\log4j-1.2.8.jar;C:\Axis\axis-1_4\lib\wsdl4j-1.5.1.jar;C:\Axis\axis-1_4\lib\xml-apis.jar;C:\Axis\axis-1_4\lib\xercesImpl.jar


I set the class path as: 

C:\Axis>set CLASSPATH=%AXIS_CLASSPATH%;C:\workspace-7.5\MyAxis\src

C:\Axis>echo %CLASSPATH%

C:\Axis\axis-1_4\lib\axis.jar;C:\Axis\axis-1_4\lib\commons-discovery-0.2.jar;C:\
Axis\axis-1_4\lib\commons-logging-1.0.4.jar;C:\Axis\axis-1_4\lib\jaxrpc.jar;C:\A
xis\axis-1_4\lib\saaj.jar;C:\Axis\axis-1_4\lib\log4j-1.2.8.jar;C:\Axis\axis-1_4\
lib\wsdl4j-1.5.1.jar;C:\Axis\axis-1_4\lib\xml-apis.jar;C:\Axis\axis-1_4\lib\xerc
esImpl.jar;C:\workspace-7.5\MyAxis\src


Next, I run Java2WSDL as:

C:\Axis>java -classpath %AXIS_CLASSPATH%;C:\workspace-7.5\MyAxis\src
org.apache.
axis.wsdlgen.Java2WSDL -o MySample.wsdl org.MyPojo

I get error as:

Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/axis/wsdlg
en/Java2WSDL

What am I missing?
-- 
View this message in context: http://www.nabble.com/Java2WSDL-in-Axis1.2-gives-error-java.lang.NoClassDefFoundError%3A-org-apache-axis-wsdlgen-Java2WSDL-tp25589017p25589017.html
Sent from the Axis - User mailing list archive at Nabble.com.


Re: Java2WSDL in Axis1.2 gives error java.lang.NoClassDefFoundError: org/apache/axis/wsdlgen/Java2WSDL

Posted by Anshuk Pal Chaudhuri <an...@yahoo.com>.
Hello,

I am trying to integrate axis2 1.5 with jibx 1.2.1. 
I am not sure that is a problem with axis2 or jibx.
I have the wsdl file and the schema with me.
I have used the jibx org.jibx.schema.codegen.CodeGen to generate the objects & the binding file from the schema. 
I then enhance the classes using the jibx binding compiler way.Uptil now all fine.

Then when am trying to generate server side skeletons using:

org.apache.axis2.wsdl.WSDL2Java  -uri Service.wsdl -d jibx -Ebindingfile binding.xml -s -ss -sd -scn ServiceName
referring http://ws.apache.org/axis2/1_1_1/jibx/jibx-codegen-integration.html#wsdl 
I am getting errors.

The stacktrace:

Exception in thread "main" org.apache.axis2.wsdl.codegen..CodeGenerationException
> java.lang.RuntimeException: No mapping defined for element {http://sample/types
}ElementName

I am not sure where I went wrong, also I did find it being mentioned in quite a few number of places such as, http://marc.info/?l=axis-user&m=117028406518758&w=2 

But I really did not find any solution, I think somebody has got some workaround for this.
If I use jaxb instead of jibx, it works fine, there is not binding file in such a case, is the generated the binding file in correct, I am not really sure so hinting at different things.
Can anyone help in some workaround.


Regards,
Anshuk