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;
    }

}



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939050#3939050

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939050


-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to