facebook

Create Web Service gives Project must be a JEE 5 web project

  1. MyEclipse Archived
  2.  > 
  3. Web Services
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #307865 Reply

    jgprospect
    Member

    When I right-click a WSDL, select MyEclipse, select New Web Service, with JAX-WS selected as the framework, at the top of the dialog box it has a red dot and the message ” Project must be a JEE 5 web project”. My installation details are below. I have MyEclipse 8.5 with Java 1.6. My project is a Web project.

    I don’t know how to get around this issue so I can generate the webservice.

    Thanks for any help!
    Johnny

    *** Date:
    Thursday, April 22, 2010 11:39:41 AM CDT

    ** System properties:
    OS=WindowsXP
    OS version=5.1.0
    Java version=1.6.0_13

    *** MyEclipse details:
    MyEclipse Enterprise Workbench
    Version: 8.5
    Build id: 8.5-20100319

    *** Eclipse details:
    MyEclipse Enterprise Workbench

    Version: 8.5
    Build id: 8.5-20100319

    #307885 Reply

    Johnny,
    JAX-WS support is only available for Java EE 5 or higher web projects. As a work around, you should create a web project that is J2EE compliant.
    You can refer to the following tutorials for further reference –
    1. http://www.myeclipseide.com/documentation/quickstarts/webservices_jaxws/
    2. http://www.myeclipseide.com/documentation/quickstarts/webprojects/#creating_web_project
    Let me know if that helps

    #307888 Reply

    jgprospect
    Member

    Shalini,
    Thanks for the reply. I have created a web project from scratch and it worked correctly.

    I’m working with a web project that was already created and need to add a web service to it. The following is from .mymetadata. How can I tell what the web service generator doesn’t like?

    Thanks,
    Johnny

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <project-module
    type=”WEB”
    name=”IDM_IF2″
    id=”myeclipse.1113836400479″
    context-root=”/idm”
    j2ee-spec=”1.5″
    archive=”IDM_IF2.war”>
    <attributes>
    <attribute name=”webrootdir” value=”/WebRoot” />
    </attributes>
    </project-module>

    #307922 Reply

    Johnny,
    Its easier to create an x-fire web service that is compatible with 1.4 instead of changing the current projects metadata and libraries.
    Please refer to the following link on xfire webservices –
    http://www.myeclipseide.com/documentation/quickstarts/webservices/

    Let me know if that helps.

    #318791 Reply

    c3web
    Member

    I solved this problem just adding the JAX-WS 2.1 Runtime Libraries and JAX-WS 2.1 API LIbraries to classpath.

    C3Web

    #318805 Reply

    support-swapna
    Moderator

    c3web ,

    Thank you for posting your findings.
    Do let us know if you have any other issues.

    #325994 Reply

    GE
    Member

    I’m very new to Eclipse.

    Can you please clarify what you did when you say:

    you added JAX-WS 2.1 Runtime Libraries and JAX-WS 2.1 API LIbraries to classpath.

    Where exactly is that?

    I’m getting the same error but I can see that these libraries are already in my project build path. And, my .classpath file has the following:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <classpath>
    <classpathentry kind=”src” path=”src”/>
    <classpathentry kind=”src” path=”emailTemplates”/>
    <classpathentry kind=”src” path=”workflows”/>
    <classpathentry kind=”con” path=”melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER”/>
    <classpathentry exported=”true” kind=”con” path=”melibrary.com.genuitec.eclipse.ws.xfire.MYECLIPSE_JAXWS_API”/>
    <classpathentry exported=”true” kind=”con” path=”melibrary.com.genuitec.eclipse.ws.xfire.MYECLIPSE_METRO_IMPL”/>
    <classpathentry kind=”var” path=”APP_SERVER/plugins/com.ibm.ws.runtime.jar”/>
    <classpathentry kind=”var” path=”APP_SERVER/plugins/org.eclipse.emf.common.jar”/>
    <classpathentry kind=”var” path=”APP_SERVER/plugins/org.eclipse.emf.commonj.sdo.jar”/>
    <classpathentry kind=”var” path=”APP_SERVER/plugins/org.eclipse.emf.ecore.change.jar”/>
    <classpathentry kind=”var” path=”APP_SERVER/plugins/com.ibm.ws.jpa.jar”/>
    <classpathentry kind=”con” path=”org.eclipse.jst.j2ee.internal.module.container”>
    <accessrules>
    <accessrule kind=”accessible” pattern=”*.*”/>
    </accessrules>
    </classpathentry>
    <classpathentry kind=”lib” path=”lib/esapi-2.0.1.jar”/>
    <classpathentry kind=”lib” path=”lib/oscore-2.2.5.jar”/>
    <classpathentry kind=”lib” path=”lib/osworkflow-2.8.0.jar”/>
    <classpathentry kind=”lib” path=”lib/propertyset-1.4.jar”/>
    <classpathentry kind=”lib” path=”lib/xmlpull-1.1.3.1.jar”/>
    <classpathentry kind=”lib” path=”lib/xpp3_min-1.1.4c.jar”/>
    <classpathentry kind=”lib” path=”lib/xstream-1.4.1.jar”/>
    <classpathentry exported=”true” kind=”lib” path=”lib/commons-lang3-3.0.1.jar”>
    <attributes>
    <attribute name=”org.eclipse.jst.component.dependency” value=”../”/>
    </attributes>
    </classpathentry>
    <classpathentry kind=”con” path=”org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5″>
    <attributes>
    <attribute name=”owner.project.facets” value=”java”/>
    </attributes>
    </classpathentry>
    <classpathentry kind=”output” path=”classes”/>
    </classpath>

    Any help would be greatly appreciated! Thanks.

    #326004 Reply

    support-swapna
    Moderator

    ghada,

    Sorry that you are seeing this issue.

    Can you answer some more questions for us ?

    1. Can you share the Installation Details from MyEclipse > Installation Summary > Installation Details ?

    2. Can you clarify if you have checked the suggestions listed above by support-shalini ?

    3. Can you also create a new web project and check if the issue exists?

    4. Please share with us the steps you are following to help us replicate the issue at our end.

    #326020 Reply

    GE
    Member

    Hi,

    Thank you for the reply.

    Please find the attached installation file.

    I was able to create a new web service using the one of the examples/tutorials. It worked fine and I did not have the issue.

    Please find the screen shots of web service example. As you can see, xFire is deprecated and no longer appears in MyEclipse.

    The project that I’m having trouble with was previously created and I need to add a new web service to it. The new class has been created but I just can’t create a web service.

    Thanks for you help.

    Attachments:
    You must be logged in to view attached files.
    #326021 Reply

    GE
    Member

    Sorry, I forgot to mention the steps I take to create the issue:

    1. Select the new class I created – which will form the basis of the web service.
    2. From the menu, select File/New/Web Service
    3. Click Next
    4. The error appears on the next page – which I attached a screen shot.

    Please note that other web services were created in this project. There are over 3 web services that were created with this project by other contractors.

    Thanks,
    Ghada

    #326036 Reply

    support-swapna
    Moderator

    Ghada,

    Thank you for the screenshots.To create a Web Service, the project has to be a Java EE 5 or higher web project. In your case the project is an EJB project instead of a web project. The project needs to be a web project, producing a web application, to create a web service.

    Can you please verify that the web services that you mentioned created earlier, are in CodsDslEJB project ?

    Can you also attach a screenshot which verifies the same for us to help get a visual ?

    #326069 Reply

    GE
    Member

    It looks like I was greatly mistaken.

    So, how do I go about creating a WSDL from an EJB project.

    I found this link but it doesn’t really specify the steps of how to go about doing it.

    https://www.genuitec.com/forums/topic/creating-a-web-service-from-an-ejb-session-bean/

    Is there a tutorial or instructions somewhere that I may follow?

    Thanks.

    #326092 Reply

    support-swapna
    Moderator

    Azrek,

    Are you trying to generate from an ordinary class that is in the EJB project ?

    If yes then you can make the EJB project as dependent to a web project (new webservice project) and can be used to generate the web service.

    Hope this helps.

    #326106 Reply

    GE
    Member

    Yes, that’s basically what I’m trying to do. I’ll give it a go. Wish me luck!

    Thanks for all your help. And, sorry for all the silly questions.

Viewing 14 posts - 1 through 14 (of 14 total)
Reply To: Create Web Service gives Project must be a JEE 5 web project

You must be logged in to post in the forum log in