Announcement Announcement Module
Collapse
No announcement yet.
Problems with exporting standalone web services using JAX-WS and JDK 1.6 HTTP server Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problems with exporting standalone web services using JAX-WS and JDK 1.6 HTTP server

    Hello,

    Can anybody tell me what's wrong here - that would be great - thx.

    I'm trying to build some standalone web services using JAX-WS and the JDK 1.6 HTTP server. We are using JBoss as application server and because of the JBoss version we need to deploy this webservices as standalone web services using JDK 1.6 HTTP server.
    But after deploying the war file to JBoss(version jboss-4.2.3.GA) I get following error in the server.log file:

    Code:
    2009-07-27 15:16:50,282 INFO  [STDOUT] 15:16:50,266 ERROR [ContextLoader] Context initialization failed
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter#0' defined in ServletContext resource [/WEB-INF/spring.xml]: Invocation of init method failed; nested exception is com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class de.idv.bpm.server.services.jaxws.Welcome is not found. Have you run APT to generate them?
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1338)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:473)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    	at java.security.AccessController.doPrivileged(Native Method)

    I've written this simple code:

    web.xml:
    Code:
    <!DOCTYPE web-app PUBLIC
     "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
     "http://java.sun.com/dtd/web-app_2_3.dtd" >
    
    <web-app>
    
    	<!-- Spring Container startup -->
    	<context-param>
      		<param-name>contextConfigLocation</param-name>
      		<param-value>/WEB-INF/spring.xml</param-value>
    	</context-param>
    	
    	<servlet>
      		<servlet-name>context</servlet-name>
      		<servlet-class>org.springframework.web.context.ContextLoaderServlet</servlet-class>
      		<load-on-startup>1</load-on-startup>
    	</servlet>
    	
    	 <display-name>Archetype Created Web Application</display-name>
    
        	<servlet>
            	<servlet-name>spring-ws</servlet-name>
            	<servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class>
        	</servlet>
    
        	<servlet-mapping>
            	<servlet-name>spring-ws</servlet-name>
            	<url-pattern>/*</url-pattern>
        	</servlet-mapping>
    	    
        	<session-config>
            	<session-timeout>
                		50
            	</session-timeout>
        	</session-config>    	
    	
    	<welcome-file-list>
         		<welcome-file>Application.html</welcome-file>
    	</welcome-file-list>
    	
    </web-app>

    spring.xml Spring-configuration file:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
               http://www.springframework.org/schema/beans/spring-beans-2.5.xsd">
    	
    	<bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter" >
    	    <property name="baseAddress" value="http://localhost:9999/" />
    	</bean>
    	
    	<bean id="TestWS" class="de.idv.bpm.server.services.TestWS">
    		
    	</bean>
    		
    </beans>

    TestWS.java:

    Code:
    package de.idv.bpm.server.services;
    
    import javax.jws.WebService;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    
    import org.springframework.beans.factory.annotation.Autowired;
    import org.springframework.beans.annotation.*;
    
    @WebService(serviceName = "TestWS")
    public class TestWS {
    		
        /**
         * Web service operation
         */
        @WebMethod(operationName = "welcome")
        public String welcome()
        {
            //TODO write your implementation code here:
            return "Welcome to your first WS";
        }
    
    }
Working...
X