users@glassfish.java.net

Re: Problem deploying EJB web service

From: Ryan de Laplante <ryan_at_ijws.com>
Date: Tue, 12 Dec 2006 13:20:33 -0500

Hi,

I would like to clarify.. this is not a NetBeans question, it is a
question about Sun App Server 9.0 PE failing to deploy an ejb web
service endpoint when a web service method returns an object from
outside the project. The same example works fine using a web
application service endpoint.


Has anyone else been able to use an ejb web service endpoint successfully?


Thanks,
Ryan

Ryan de Laplante wrote:

> Hi,
>
> I'm using NetBeans 5.5 on XP Pro, Sun Application Server 9.0 PE. I
> create a new EJB module in netbeans, add a new web service and let it
> create a stateless session bean for me. I add a simple echo test
> method and am able to deploy successfully.
>
> Next I add a library to my project.. a jar containing a serializable
> class called Reservation which I am able to use in an other web
> service without any issues (a web application project, not ejb module
> project). I add a simple getRes method that has a return type of
> Reservation. Save and deploy. It fails to deploy. I have attached
> the dump from the app server.
>
> Below is the source code I was working with. I noticed the
> EJBModule1.jar built by netbeans/ant has the jar file containing the
> Reservation object. I also tried the same thing using a web
> application instead of EJB Module, and the service deploys successfully.
>
>
>
> package com.test.service;
>
> import com.ijws.cicokiosk.client.model.Reservation;
> import javax.ejb.Stateless;
> import javax.jws.WebMethod;
> import javax.jws.WebParam;
> import javax.jws.WebService;
>
> /**
> *
> * @author ryan
> */
>
> @Stateless()
> @WebService()
> public class NewWebService {
> /**
> * Web service operation
> */
> @WebMethod
> public String echoTest(@WebParam(name = "echo") String echo) {
> // TODO implement operation
> return echo;
> }
>
> /**
> * Web service operation
> */
> @WebMethod
> public Reservation getRes() {
> // TODO implement operation
> return null;
> } }