1 Reply Latest reply on Sep 5, 2008 8:28 AM by francis17101970

    Simple HelloWorld fails with

    ritesh001

      I'm trying to deploy a simple HelloWorld service on JBoss (which deploys just fine over GlassFish and WebLogic) but I keep getting "cannot find endpoint meta data" error. I've looked every where and exhausted every means to find an answer, this is last hope. Please help!!!

      Here's the error

      10:22:04,883 INFO [TomcatDeployer] deploy, ctxPath=/HelloWorldService, warUrl=.../tmp/deploy/tmp57420HelloWorldService-exp.war/
      10:22:04,935 INFO [WebappClassLoader] validateJarFile(/opt/wfnp/jboss-4.2.3.GA/server/default/./tmp/deploy/tmp57420HelloWorldService-exp.war/WEB-INF/lib/servlet-api-2.3.jar) - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: javax/servlet/Servlet.class
      10:22:05,205 ERROR [MainDeployer] Could not start deployment: file:/opt/wfnp/jboss-4.2.3.GA/server/default/deploy/HelloWorldService.war
      java.lang.IllegalStateException: Cannot find endpoint meta data for: HelloWorldService
       at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.getEndpointMetaData(UnifiedMetaDataDeploymentAspect.java:118)
       at org.jboss.wsf.stack.jbws.UnifiedMetaDataDeploymentAspect.start(UnifiedMetaDataDeploymentAspect.java:87)
       at org.jboss.wsf.framework.deployment.DeploymentAspectManagerImpl.start(DeploymentAspectManagerImpl.java:146)
       at org.jboss.wsf.container.jboss42.LazyAssemblyWSFRuntime.start(LazyAssemblyWSFRuntime.java:66)
       at org.jboss.wsf.container.jboss42.JAXWSDeployerHookPostJSE.deploy(JAXWSDeployerHookPostJSE.java:52)
       at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:90)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy45.start(Unknown Source)
       :
       :
      


      Here's my java class, web.xml, and the WSDL file

      package com.my.services.helloworld;
      
      import javax.jws.WebMethod;
      import javax.jws.WebService;
      
      @WebService(endpointInterface = "com.my.services.helloworld.HelloWorldPortType",
       portName = "HelloWorldPort",
       serviceName = "HelloWorldService",
       targetNamespace = "http://services.my.com/helloworld",
       wsdlLocation = "WEB-INF/wsdl/HelloWorldService.wsdl")
      public class HelloWorldServiceImpl implements HelloWorldPortType
      {
       public String helloWorld(String name) throws ServiceExceptionMessage
       {
       try
       {
       return ("Hello there, " + name);
       }
       catch (Exception ex)
       {
       ServiceFault sf = new ServiceFault();
       sf.setErrorMessage(ex.getMessage());
       throw new ServiceExceptionMessage("Error Saying Hello", sf, ex);
       }
       }
      }


      web.xml
      <web-app 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" version="2.5">
       <servlet>
       <servlet-name>HelloWorldService</servlet-name>
      <servlet-class>com.my.services.helloworld.HelloWorldServiceImpl</servlet-class>
       </servlet>
       <servlet-mapping>
       <servlet-name>HelloWorldService</servlet-name>
       <url-pattern>/HelloWorldService</url-pattern>
       </servlet-mapping>
       <session-config>
       <session-timeout>30</session-timeout>
       </session-config>
      </web-app>
      


      sun-jaxws.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <endpoints xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime" version="2.0">
       <endpoint name="HelloWorldService"
       implementation="com.my.services.helloworld.HelloWorldServiceImpl"
       wsdl="WEB-INF/wsdl/HelloWorldService.wsdl"
       service="{http://services.my.com/helloworld}HelloWorldService"
       port="{http://services.my.com/helloworld}HelloWorldPort"
       url-pattern="/HelloWorldService"/>
      </endpoints>
      


      HelloWorldService.wsdl
      <?xml version="1.0" encoding="UTF-8"?>
      <definitions
       name="HelloWorldService"
       targetNamespace="http://services.my.com/helloworld"
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"
       xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
       xmlns:tns="http://services.my.com/helloworld"
       xmlns="http://schemas.xmlsoap.org/wsdl/">
       <types>
       <schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" xmlns:tns="http://services.my.com/helloworld" targetNamespace="http://services.my.com/helloworld">
       <xsd:element name="helloWorld">
       <complexType>
       <xsd:sequence>
       <xsd:element name="name" type="xsd:string"/>
       </xsd:sequence>
       </complexType>
       </xsd:element>
       <xsd:element name="helloWorldResponse">
       <xsd:complexType>
       <xsd:sequence>
       <xsd:element name="return" type="xsd:string"/>
       </xsd:sequence>
       </xsd:complexType>
       </xsd:element>
       <xsd:element name="ServiceFault">
       <xsd:complexType>
       <xsd:sequence>
       <xsd:element name="errorMessage" nillable="false" type="xsd:string"/>
       </xsd:sequence>
       </xsd:complexType>
       </xsd:element>
       </schema>
       </types>
       <message name="helloWorldRequest">
       <part element="tns:helloWorld" name="parameters"/>
       </message>
       <message name="helloWorldResponse">
       <part element="tns:helloWorldResponse" name="parameters"/>
       </message>
       <message name="ServiceExceptionMessage">
       <part element="tns:ServiceFault" name="fault"/>
       </message>
       <portType name="HelloWorldPortType">
       <operation name="helloWorld">
       <input message="tns:helloWorldRequest" name="helloWorldRequest"/>
       <output message="tns:helloWorldResponse" name="helloWorldResponse"/>
       <fault message="tns:ServiceExceptionMessage" name="ServiceException"/>
       </operation>
       </portType>
       <binding name="HelloWorldPortBinding" type="tns:HelloWorldPortType">
       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="helloWorld">
       <soap:operation soapAction=""/>
       <input name="helloWorldRequest">
       <soap:body use="literal"/>
       </input>
       <output name="helloWorldResponse">
       <soap:body use="literal"/>
       </output>
       <fault name="ServiceException">
       <soap:fault name="ServiceException" use="literal"/>
       </fault>
       </operation>
       </binding>
       <service name="HelloWorldService">
       <port binding="tns:HelloWorldPortBinding" name="HelloWorldPort">
       <soap:address location="http://localhost:8080/helloworld/HelloWorldService"/>
       </port>
       </service>
      </definitions>
      


      I don't know what am i doing wrong, the war file deploys on GlassFish and I'm able to get use the service using SaopUI, but can't deploy on JBoss.