org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping doesn't map properly in 
Spring
--------------------------------------------------------------------------------------

         Key: XFIRE-316
         URL: http://jira.codehaus.org/browse/XFIRE-316
     Project: XFire
        Type: Bug

  Components: Spring  
    Versions: 1.0    
 Environment: Spring 1.2.5
JBoss 4.0.3sp1
    Reporter: Jason Tesser
 Assigned to: Dan Diephouse 


Using the example found at http://xfire.codehaus.org/JSR+181+HandlerMapping the 
mapping doesn't work.  When you try to goto the url where the service should be 
located Spring says that it isn't mapped.  I have tried to take the default 
urlPrefix for Jsr181HandlerMapping and set my own.  

Below is the config and code set up

web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app id="ws" version="2.4" 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";>
        <display-name>ws</display-name>
        
        <context-param>
                <param-name>contextConfigLocation</param-name>
                
<param-value>/WEB-INF/wsApp-context.xml,classpath:org/codehaus/xfire/spring/xfire.xml</param-value>
        </context-param>

  <context-param>
    <param-name>webAppRootKey</param-name>
    <param-value>wsapp</param-value>
  </context-param>

        <listener>
                
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
        </listener>

        <listener>
                
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
        </listener>
        
        <servlet>
                <servlet-name>wsApp</servlet-name>
                
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
        </servlet>
    <servlet-mapping>
        <servlet-name>wsApp</servlet-name>
        <url-pattern>/*</url-pattern>
    </servlet-mapping>
        <welcome-file-list>
                <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
    <error-page>
      <error-code>500</error-code>
      <location>/jsps/error500.jsp</location>
    </error-page>
    <error-page>
      <error-code>404</error-code>
      <location>/jsps/error404.jsp</location>
    </error-page>
    <error-page>
      <error-code>403</error-code>
      <location>/jsps/error403.jsps</location>
    </error-page>
</web-app>

the wsApp-servlet.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans SYSTEM "lib/spring-beans.dtd" >
<beans>
  
  <import resource="classpath:/org/codehaus/xfire/spring/xfire.xml"/>
  
<!-- ===================== xfire ==================== -->
  <bean id="webAnnotations" 
class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations"/>
  <bean id="handlerMapping" 
class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping">
    <property name="typeMappingRegistry">
      <ref bean="xfire.typeMappingRegistry"/>
    </property>
    <property name="xfire">
      <ref bean="xfire"/>
    </property>
    <property name="webAnnotations">
      <ref bean="webAnnotations"/>
    </property>
  </bean>
  
  <bean id="edirSync" class="edu.bju.ws.ldap.edir.EdirSyncMDBImpl"/>
   
 <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
    <property name="urlMap">
      <map>
        <entry key="/service">
          <ref bean="handlerMapping"/>
        </entry>
      </map>
    </property>
  </bean>
</beans>

and the class

import javax.jws.WebMethod;
import javax.jws.WebService;

@WebService(serviceName = "EdirSyncMDB")
public class EdirSyncMDBImpl {
        @WebMethod()
            public String echo( String echo )
            {
                System.out.print("Sending back " + echo);
                return echo;
            }
}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to