I am running glassfish 2.1.1 with openesb. I have a problem in that my web services are running correctly, but it is a requirement that the web service be registered in glassfish admin console. Unfortunately the admin console is not showing any of my web services. To clarify, when selecting "Web Services" in navigation the pane on the right shows "No Items Found" but the services are running just fine. I am completely at a loss on how to even troubleshoot this issue. I have turned on finest logging but do not see anything that would help me identify this problem. My project is a simple war application and I am not using any ejb's.
Web.xml
<?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">
<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>ConsolidatedWS</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ConsolidatedWS</servlet-name>
<url-pattern>/ConsolidatedWS</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
Web Service
@SchemaValidation(handler= SchemaValidationHandler.class)
@WebService(serviceName = "ConsolidatedWS", targetNamespace = "http://consolidatedapi/1.0", endpointInterface = "com.ConsolidatedWS")
@HandlerChain(file="/META-INF/SoapHandlerChain.xml")
public class ConsolidatedWSImpl implements ConsolidatedWS {
@Override
public CreateConsolidatedOrderResponse createConsolidatedOrder(ConsolidatedOrder order) {
return new CreateConsolidatedOrderResponse();
}
}
sun-jaxws.xml
<?xml version="1.0" encoding="UTF-8"?>
<endpoints version="2.0" xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime">
<endpoint implementation="com.ConsolidatedWSImpl" name="ConsolidatedWS" url-pattern="/ConsolidatedWS"/>
</endpoints>
I think I figured it out, it was a combination of a couple of things. Thanks to Paul because my web.xml now does not have the listener and servlets.
I made the metro webservices-rt provided because this may have been messing with the Glassfish metro implementation.
<dependency>
<groupId>org.glassfish.metro</groupId>
<artifactId>webservices-rt</artifactId>
<version>2.1</version>
<scope>provided</scope>
</dependency>
As Paul recommended I removed the servlet mappings and listeners
web.xml
<?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>
</web-app>
sun-javaws.xml
<?xml version="1.0" encoding="UTF-8"?>
<endpoints version="2.0" xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime">
</endpoints>
sun-web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.1 Servlet 2.4//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-1.dtd">
<sun-web-app error-url="">
<context-root>/consolidated-api</context-root>
<class-loader delegate="true"/>
<jsp-config>
<property name="keepgenerated" value="true">
<description>Keep a copy of the generated servlet class' java code.</description>
</property>
</jsp-config>
</sun-web-app>