- This topic has 2 replies, 3 voices, and was last updated 15 years, 10 months ago by Brian Fernandes.
-
AuthorPosts
-
factsetParticipantHello,
I have 2 questions about Java6 webservices :
- Java6 Webservices / MyEclipse
Is there any support of Java6 webservices in MyEclipse ?
That means without using Axis or XFire, just java 6.
Is there is nothing yet (which I believe, but I might be wrong), do you know if it is planned ?- Java6 Webservices / ANT / wsgen
I’m getting mad when I spend hours to try to make a basic thing working…
I can not use wsgen properly, here is my build file :<?xml version="1.0" encoding="UTF-8"?> <project name="sucd" basedir="."> <property name="javaEE.home" value="C:\Sun\Java_EE5_SDK" /> <path id="jaxws.classpath"> <pathelement location="${javaEE.home}/lib/appserv-ws.jar"/> <pathelement location="${javaEE.home}/lib/activation.jar"/> <pathelement location="${javaEE.home}/lib/javaee.jar"/> <pathelement location="${javaEE.home}/lib/javaws.jar"/> <pathelement location="${javaEE.home}/jdk/jre/lib/rt.jar"/> </path> <taskdef name="wsimport" classname="com.sun.tools.ws.ant.WsImport"> <classpath refid="jaxws.classpath"/> </taskdef> <taskdef name="wsgen" classname="com.sun.tools.ws.ant.WsGen"> <classpath refid="jaxws.classpath"/> </taskdef> <taskdef name="apt" classname="com.sun.tools.ws.ant.Apt"> <classpath refid="jaxws.classpath"/> </taskdef> <target name="generateWS"> <wsgen resourcedestdir="C:\dev\aFolder" destdir="C:\dev\anotherFolder" genwsdl="true" classpath="someWebapp classes folder" sei="com.company.appNAme.web.webservice.MyWS"> </wsgen> </target> </project>
When I run ant I get the error BUILD FAILED
java.lang.UnsupportedClassVersionError: Bad version number in .class fileBut MyEclipse is configured to use the following default JRE : C:\Sun\Java_EE5_SDK\jdk (java6), and my project does not have any special setting (it uses workspace settings), so I everything should be using java6.
Does anyone know how to use that bloody wsgen in an ant file ?
Or, how to get a decent error message (with at least a class name…)I know it does not really look as a MyEclipse problem, but any help would be really appreciated, and it might help others to use Java6 Webservices in MyEclipse…
Thanks
Philippe
Loyal WaterMemberIs there any support of Java6 webservices in MyEclipse ?
That means without using Axis or XFire, just java 6.
Is there is nothing yet (which I believe, but I might be wrong), do you know if it is planned ?Java 6 web services is not supported at the moment. We plan to continue supporting XFire. Nothing is planned for Java 6 Web Services at the moment.
Brian FernandesModeratorPhilippe,
With version 6 of the JDK, the JAX-WS API and JAXB2 (extensively used by JAX-WS) are now bundled with the JDK itself. MyEclipse has supported JAX-WS web services since version 6.5 and any web service developed using these tools should work with JDK 6 as well. If you are looking for something specific with respect to “JDK 6 Web services”, please let me know so we may clarify further.
Here is our JAX-WS tutorial which should help you get started with these webservices instead of having to run wsgen / wsimport manually. http://www.myeclipseide.com/documentation/quickstarts/webservices_jaxws/
But MyEclipse is configured to use the following default JRE : C:\Sun\Java_EE5_SDK\jdk (java6), and my project does not have any special setting (it uses workspace settings), so I everything should be using java6.
In case you still wish to use the ant task, you may need to run MyEclipse with JDK/JRE 6 and not JRE 5. This is in addition to the JRE6 you have specified on the preference page.
To do this in MyEclipse 7, please edit your myeclipse.ini file and look for the -vm argument. Change that path to point to the corresponding DLL in your JDK 6 installation.
For MyEclipse versions prior to 7, you can edit the MyEclipse shortcut and add a “-vm c:\java\jdk6\bin\javaw.exe” switch (with the correct path of course).
Please let us know how it goes and if you need further assistance.
-
AuthorPosts