0 Replies Latest reply on Apr 24, 2006 6:06 PM by Romina Barberis

    Wrong link to WSDL file

    Romina Barberis Newbie

      Affected version: JBoss 4.0.4CR2

      We have not succeeded in making work a Web Service using Java 1.5 annotations. The Web Service might have been deployed correctly:

      --------
      18:42:50,554 WARN [EndpointMetaData] Cannot obtain style, using default: document
      18:42:50,695 INFO [TomcatDeployer] deploy, ctxPath=/service, warUrl=.../tmp/deploy/tmp48123service-exp.war/
      18:42:50,836 INFO [WSDLFilePublisher] WSDL published to: file:/D:/jboss-4.0.4.CR2/server/default/data/wsdl/service.war/HelloWorld48124.wsdl
      18:42:50,851 INFO [ServiceEndpointManager] WebService started: http://ZAR03-ENG-200:8080/service/HelloWorld

      ---------

      JBoss even list the web service at its page http://localhost:8080/jbossws/services.
      However, the link to the WSDL file is wrong. When you click it, you receive a 404 error (file not found).

      Could you please tell us:
      - where is the WSDL file really located?
      - how can we verify (e.g. use) that the web service is working?

      Thank you for your help.

      Best regards.

      ADDITIONAL INFORMATION:
      input information:
      - own source code
      - web.xml file
      - build.xml for ant
      output information:
      - generated output: 2 java source files

      Source code: Endpoint implementation class:

      package com.test.annotations.ws;

      import javax.jws.WebMethod;
      import javax.jws.WebParam;
      import javax.jws.WebResult;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;

      @WebService(name = "HelloWorld",
      targetNamespace = "http://ws.annotations.test.com/HelloWorldImpl",
      serviceName = "HelloWorld")

      public class HelloWorldImpl
      {

      @WebMethod
      @WebResult(name="helloResult")
      public String hello(@WebParam(name = "msg") String msg)
      {
      return "Hello " + msg + "!";
      }

      }

      web.xml file:

      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
      http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
      version="2.4">

      <servlet-name>HelloWorld</servlet-name>
      <servlet-class>
      com.test.annotations.ws.HelloWorldImpl
      </servlet-class>

      <servlet-mapping>
      <servlet-name>HelloWorld</servlet-name>
      <url-pattern>/helloWorld</url-pattern>
      </servlet-mapping>
      </web-app>


      build.xml file used by ant:

      <?xml version="1.0" encoding="ISO-8859-1"?>


      <!-- Initialize time stamp -->




      <!-- Common Properties -->

      <!-- read the build.properties file from the same directory -->









      <!--property name="temp.dir" value="${env.BUILD_OUTPUT}" /-->



      <!-- Project Properties -->







      <!--property name="project.temp.output.dir" value="${temp.dir}/output" /-->




      <!-- Sets Classpath -->
      <!--path id="classpath">



      </path-->





















      <!--mkdir dir="${project.build.dir}" /-->







      <!--classpath refid="classpath" /-->










      <!--classpath refid="classpath" /-->
















      <!-- now build the war file -->





      <!--include name="lib/*.jar" /-->











      Generated output:

      Hello.java

      package com.test.annotations.ws.jaxws;

      import javax.xml.bind.annotation.AccessType;
      import javax.xml.bind.annotation.XmlAccessorType;
      import javax.xml.bind.annotation.XmlElement;
      import javax.xml.bind.annotation.XmlRootElement;
      import javax.xml.bind.annotation.XmlType;
      import com.test.annotations.ws.jaxws.Hello;

      @XmlRootElement(name = "hello", namespace = "http://ws.annotations.test.com/")
      @XmlAccessorType(AccessType.FIELD)
      @XmlType(name = "hello", namespace = "http://ws.annotations.test.com/")
      public class Hello {

      @XmlElement(name = "msg", namespace = "")
      private String msg;

      /**
      *
      * @return
      * returns String
      */
      public String getMsg() {
      return this.msg;
      }

      /**
      *
      * @param msg
      * the value for the msg property
      */
      public void setMsg(String msg) {
      this.msg = msg;
      }

      }


      HelloResponse.java

      package com.test.annotations.ws.jaxws;

      import javax.xml.bind.annotation.AccessType;
      import javax.xml.bind.annotation.XmlAccessorType;
      import javax.xml.bind.annotation.XmlElement;
      import javax.xml.bind.annotation.XmlRootElement;
      import javax.xml.bind.annotation.XmlType;
      import com.test.annotations.ws.jaxws.HelloResponse;

      @XmlRootElement(name = "helloResponse", namespace = "http://ws.annotations.test.com/")
      @XmlAccessorType(AccessType.FIELD)
      @XmlType(name = "helloResponse", namespace = "http://ws.annotations.test.com/")
      public class HelloResponse {

      @XmlElement(name = "helloResult", namespace = "")
      private String _return;

      /**
      *
      * @return
      * returns String
      */
      public String get_return() {
      return this._return;
      }

      /**
      *
      * @param _return
      * the value for the _return property
      */
      public void set_return(String _return) {
      this._return = _return;
      }

      }