users@glassfish.java.net

Re: web services not showing up

From: Vijay Ramachandran <Vijay.Ramachandran_at_Sun.COM>
Date: Fri, 14 Jul 2006 10:20:38 -0700

Comments in line :

> I am trying to deploy a web application to an instance of glassfish and
> I am having trouble. when I deploy the web application, it is listed
> under the Web Applications (on the admin console) but no Web Services
> associated with that application are listed under the "Web Services"
> section.

When this happens - are there any exceptions in the server.log
(AS_INSTALL/domains/domain1/logs/server.log) ?

> The weird thing is, sometimes they are. If I create a new
> project in netbeans(5.5), create a web services from a wsdl, and deploy
> it, occasionally a web services is listed.
>

This kind of a problem has not been reported so far !!!

> I know this is not a very helpful description of my problem. I am not
> seeing any errors in the log. sometimes it works and some times it does
> not.
>
> here is the code for the web service:
> package net.digitalxtractions.services.device;
>
> import javax.jws.WebService;
>
> @WebService(serviceName = "GetImagesService", portName =
> "GetImagesPort", endpointInterface =
> "net.digitalxtractions.services.device.GetImagesPortType",
> targetNamespace = "http://digitalxtractions.net/services/Device",
> wsdlLocation = "WEB-INF/wsdl/GetImagesService/Device.wsdl")
> public class GetImagesService implements
> net.digitalxtractions.services.device.GetImagesPortType {
>
> public net.digitalxtractions.services.device.GetImagesResponseType
> getImagesOperation(net.digitalxtractions.services.device.GetImagesRequestType request) throws net.digitalxtractions.services.device.ActionError {
>
> return new GetImagesResponseType();
>
> }
> }
>

This looks good

> I assume glassfish creates the web service from the information listed
> after @WebService.

yes it will
> How does one specify a web service in the web.xml
> file?

If you use annotations, you dont have to

> I would like to try and define the service without relying on
> magical introspection.
>

Then you have to specify all deployment descriptors like webservices.xml etc
> my current web.xml is:
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
> <session-config>
> <session-timeout>
> 30
> </session-timeout>
> </session-config>
> <welcome-file-list>
> <welcome-file>
> index.jsp
> </welcome-file>
> </welcome-file-list>
> </web-app>
>
> thanks for any help.
> -Lucas
>


Is it possible to let us have your WAR/EAR that gets deployed by
netbeans ? If not, at the WSDL that is packaged ?

Without these, it is tough to understand what is going on

Thanks

Vijay