zosoo7
Mar 20th, 2006, 03:26 PM
I'm trying to expose my java objects as web services using XFire, and JSR181 annotations, I'm able to config everything and have spring manage my services, but if you try to browse to another resource, such as an htm file, I get the following exception:
No mapping for [/InsightWeb/UnSecure/htm/Login.htm] in DispatcherServlet with name 'xfire'
I've tried setting my URL-PATTERN = "/services/*" in my web.xml, but it doesn't do anythig but make my services stop working. Any help would be appreciated. Thanks.
Here is my web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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>
<!-- START SNIPPET: xfire -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml
classpath:org/codehaus/xfire/spring/xfire.xml</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.properties</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListe ner</listener-class>
</listener>
<servlet>
<servlet-name>xfire</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>xfire</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<!-- END SNIPPET: xfire -->
</web-app>
and here is my servlet config:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="webAnnotations" class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnn otations"/>
<bean id="handlerMapping" class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMa pping">
<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="authenticationService" class="com.sunbridgecapital.insight.services.authenticati on.AuthenticationService">
<property name="userDao">
<ref bean="userDao"/>
</property>
</bean>
<bean class="org.springframework.web.servlet.handler.SimpleUrlH andlerMapping">
<property name="alwaysUseFullPath"><value>true</value></property>
<property name="urlMap">
<map>
<entry key="/">
<ref bean="handlerMapping"/>
</entry>
</map>
</property>
</bean>
</beans>
No mapping for [/InsightWeb/UnSecure/htm/Login.htm] in DispatcherServlet with name 'xfire'
I've tried setting my URL-PATTERN = "/services/*" in my web.xml, but it doesn't do anythig but make my services stop working. Any help would be appreciated. Thanks.
Here is my web.xml:
<?xml version="1.0" encoding="ISO-8859-1"?>
<!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>
<!-- START SNIPPET: xfire -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml
classpath:org/codehaus/xfire/spring/xfire.xml</param-value>
</context-param>
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/log4j.properties</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListe ner</listener-class>
</listener>
<servlet>
<servlet-name>xfire</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>xfire</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>
<!-- END SNIPPET: xfire -->
</web-app>
and here is my servlet config:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd">
<beans>
<bean id="webAnnotations" class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnn otations"/>
<bean id="handlerMapping" class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMa pping">
<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="authenticationService" class="com.sunbridgecapital.insight.services.authenticati on.AuthenticationService">
<property name="userDao">
<ref bean="userDao"/>
</property>
</bean>
<bean class="org.springframework.web.servlet.handler.SimpleUrlH andlerMapping">
<property name="alwaysUseFullPath"><value>true</value></property>
<property name="urlMap">
<map>
<entry key="/">
<ref bean="handlerMapping"/>
</entry>
</map>
</property>
</bean>
</beans>