12 Replies Last post: Jan 21, 2006 1:11 PM by AdvancedTools  
Guest
Currently Being Moderated

Jan 14, 2006 5:46 PM

Web Service

 

Hi all,

 

I´m somewhat lost trying to get a first sample Web Service to work

with IDEA 5.0.2 and the webservices plugin 0.4 build 5.

 

I've installed Tomcat 5.5.15 with Axis. Tthe Axis happyness page shows

Axis is happy and the EchoHeaders.jws sample compiles and works fine.

 

So I created a new "Web Module" project in IDEA, leaving all to

default values, put a simple method in a class in a package in /src,

hit "Enable Web Service Support", built the Project, "Generate Wsdl

from Java Code", configured Run/Debug to use local Tomcat (default

values).

 

Using a web browser to access http://localhost:8080/ (= deployment

root/app context/startup page) results in Tomcat showing error 404

(http://localhost:8080/axis and everything else is ok).

 

The "Run" dialog in IDEA shows the web module is deployed ok, but

trying to do Tools/"Deploy Java Class as Web Service" says:

"The web server is not running - launch the webservices web module in

local Tomcat run/debug session".

 

Any clues? Thanks!

 

AdvancedTools  Novice 133 posts since
Jan 14, 2006
Currently Being Moderated
Jan 14, 2006 6:12 PM in response to: Guenter Dannhaeuser
Re: Web Service

Most likely problem with root context. Try changing context to nonempty one.

AdvancedTools  Novice 133 posts since
Jan 14, 2006
Currently Being Moderated
Jan 14, 2006 9:39 PM in response to: Guenter Dannhaeuser
Re: Web Service

When selecting Tomcat run configuration, one can specify context to be used for running web module in 'Deployment' tab (it will mount your web module under http://localhost:8080/SomeContext ).

 

Actually, Axis library manipulations is not needed.

AdvancedTools  Novice 133 posts since
Jan 14, 2006
Currently Being Moderated
Jan 15, 2006 2:07 PM in response to: Guenter Dannhaeuser
Re: Web Service

It is feature of Tomcat 5.5.15, return 404 when no default document for directory available (creating index.html with some content will show it). Please, check out if it is possible to deploy some class after launchjing the server.

AdvancedTools  Novice 133 posts since
Jan 14, 2006
Currently Being Moderated
Jan 15, 2006 9:50 PM in response to: Guenter Dannhaeuser
Re: Web Service

Bug with 'root' web server context is fixed in new version of the plugin. Thank you for the feedback.

yo Newbie 4 posts since
Jan 20, 2006
Currently Being Moderated
Jan 20, 2006 11:03 AM in response to: AdvancedTools
El mismo problema

Yo tengo el mismo problema con la versión del plugin 0.4 build 6. Tengo configurado el run/debug para que el web module arranque como http://localhost:8081/sgrnet, pero no consigo que me detecte que la aplicación está lanzada.

También me ha dado problemas el plugin con el plugin Struts Assistant (v0.99), ya que hay que desactivar el code completion de este último plugin para que no haya conflictos. Con la última versión del Idea no ha habido problema porque te avisa del hecho sin más al iniciar, pero con una versión anterior se colgaba al iniciar debido a la incompatibilidad de plugins.

 

AdvancedTools  Novice 133 posts since
Jan 14, 2006
Currently Being Moderated
Jan 20, 2006 12:13 PM in response to: yo
Re: El mismo problema

Current version of the plugin uses port 8080, shortcut clash with Struts is also target for the next plugin build. Thank you for the feedback.

yo Newbie 4 posts since
Jan 20, 2006
Currently Being Moderated
Jan 20, 2006 1:14 PM in response to: AdvancedTools
Re: El mismo problema

Efectivamente el problema anterior se ha corregido cambiando el puerto de mi tomcat al 8080, pero ahora, obtengo a cambio el siguiente error cuando quiero "deployar" una clase como un servicio web.

 

Axis Servlet is not present => invoke 'Enable Web Wervice Support' action for module.

 

Por supuesto he seguido previamente todos los pasos, y ya he  hecho lo que se me solicita, tengo todas las librerías de axis en el proyecto, el web.xml está cambiado e incluso cuando en el navegador introduzco:

 

http://localhost:8080/prueba/servlet/AxisServlet

 

El servlet de Axis funciona correctamente.

 

No sé qué puedo estar haciendo mal, a ver si alguien me puede ayudar.

 

Un saludo y muchas gracias.

 

 

yo Newbie 4 posts since
Jan 20, 2006
Currently Being Moderated
Jan 20, 2006 1:21 PM in response to: yo
Re: El mismo problema

Solucionado. Hay que poner el web context name y yo no lo hacía. Gracias.

 

yo Newbie 4 posts since
Jan 20, 2006
Currently Being Moderated
Jan 20, 2006 1:29 PM in response to: yo
Re: El mismo problema

Impresionante, funciona de maravilla, gracias.

AdvancedTools  Novice 133 posts since
Jan 14, 2006
Currently Being Moderated
Jan 21, 2006 1:11 PM in response to: yo
Re: El mismo problema

Gracias por la regeneración

More Like This

  • Retrieving data ...