I have JSR181, XFire 1.0 and Spring 1.2.7 working perfectly.  I just followed the directions online and it works like a charm.  Here are my context file entries:

    <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping ">
        <property name="urlMap">
            <map>
                <entry key="/MyService">
                    <ref bean="MyService"/>
                </entry>
            </map>
        </property>
    </bean>
   
    <bean id="xfire.annotationServiceFactory"
        class="org.codehaus.xfire.annotations.AnnotationServiceFactory ">
        <constructor-arg index="0">
            <ref bean="xfire.jsr181annotations"/>
        </constructor-arg>
        <constructor-arg index="1">
            <ref bean="xfire.transportManager"/>
        </constructor-arg>
        <constructor-arg index="2">
            <ref bean="xfire.aegisBindingProvider"/>
        </constructor-arg>
    </bean>
   
    <bean id="xfire.jsr181annotations"
        class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations"/>
   
    <bean id="remoteFaultHandler" class="foo.MyFaultHandler"/>
   
    <bean id="myService"
        class="org.codehaus.xfire.spring.remoting.XFireExporter">
        <property name="serviceFactory">
            <ref bean="xfire.annotationServiceFactory" />
        </property>       
        <property name="serviceBean">
            <bean class="foo.MyServiceImpl"/>
        </property>
        <property name="faultHandlers">
            <list>
                <ref bean="remoteFaultHandler"/>
            </list>
        </property>       
    </bean>

--Andrew

On 3/22/06, Jason Tesser < [EMAIL PROTECTED]> wrote:
I pasted the logging here and I do not see the service being exposed as you suggested it should be
12:47:22,671 INFO  [DispatcherServlet] Initializing servlet 'wsApp'
12:47:22,718 INFO  [DispatcherServlet] FrameworkServlet 'wsApp': initialization started
12:47:22,718 INFO  [[/ws]] Loading WebApplicationContext for Spring FrameworkServlet 'wsApp'
12:47:22,734 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from ServletContext resource [/WEB-INF/wsApp-servlet.xml ]
12:47:22,750 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [org/codehaus/xfire/spring/xfire.xml]
12:47:22,781 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions from class path resource [org/codehaus/xfire/spring/customEditors.xml]
12:47:22,937 INFO  [XmlWebApplicationContext] Bean factory for application context [WebApplicationContext for namespace 'wsApp-servlet']: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [customEditorConfigurer, xfire.serviceRegistry,xfire.transportManager,xfire,xfire.typeMappingRegistry,xfire.aegisBindingProvider,xfire.serviceFactory,xfire.servletController,xfire.messageServiceFactory,xfire.messageBindingProvider,webAnnotations,handlerMapping,edirSync, org.springframework.web.servlet.handler.SimpleUrlHandlerMapping]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [dataSource,factory,customEditorConfigurer,xfire.serviceRegistry ,xfire.transportManager,xfire,xfire.typeMappingRegistry,xfire.aegisBindingProvider,xfire.serviceFactory,xfire.servletController,xfire.messageServiceFactory,xfire.messageBindingProvider]; root of BeanFactory hierarchy
12:47:22,937 INFO  [XmlWebApplicationContext] 14 beans defined in application context [WebApplicationContext for namespace 'wsApp-servlet']
12:47:22,937 INFO  [XmlWebApplicationContext] Unable to locate MessageSource with name 'messageSource': using default [EMAIL PROTECTED]
12:47:22,937 INFO  [XmlWebApplicationContext] Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [ [EMAIL PROTECTED]
12:47:22,937 INFO  [UiApplicationContextUtils] Unable to locate ThemeSource with name 'themeSource': using default [EMAIL PROTECTED] ]
12:47:22,937 INFO  [DefaultListableBeanFactory] Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [customEditorConfigurer,xfire.serviceRegistry ,xfire.transportManager,xfire,xfire.typeMappingRegistry,xfire.aegisBindingProvider,xfire.serviceFactory,xfire.servletController,xfire.messageServiceFactory,xfire.messageBindingProvider,webAnnotations,handlerMapping,edirSync, org.springframework.web.servlet.handler.SimpleUrlHandlerMapping]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [dataSource,factory,customEditorConfigurer,xfire.serviceRegistry ,xfire.transportManager,xfire,xfire.typeMappingRegistry,xfire.aegisBindingProvider,xfire.serviceFactory,xfire.servletController,xfire.messageServiceFactory,xfire.messageBindingProvider]; root of BeanFactory hierarchy]
12:47:23,218 INFO  [DispatcherServlet] Using context class [org.springframework.web.context.support.XmlWebApplicationContext] for servlet 'wsApp'
12:47:23,218 INFO  [DispatcherServlet] Unable to locate MultipartResolver with name 'multipartResolver': no multipart request handling provided
12:47:23,218 INFO  [DispatcherServlet] Unable to locate LocaleResolver with name 'localeResolver': using default [EMAIL PROTECTED]
12:47:23,265 INFO  [DispatcherServlet] Unable to locate ThemeResolver with name 'themeResolver': using default [ [EMAIL PROTECTED]
12:47:23,281 INFO  [DispatcherServlet] No HandlerAdapters found in servlet 'wsApp': using default
12:47:23,312 INFO  [DispatcherServlet] No ViewResolvers found in servlet 'wsApp': using default
12:47:23,312 INFO  [DispatcherServlet] FrameworkServlet 'wsApp': initialization completed in 594 ms
12:47:23,312 INFO  [DispatcherServlet] Servlet 'wsApp' configured successfully

On 3/22/06, Karthikeyan M <[EMAIL PROTECTED]> wrote:
You are accessing the URL using /ws/EdirSyncMDB. Shouldn't it be
/services/EdirSyncMDB. Actually, you can turn on the log4j logging and
the you will have messages like:
"[10:37:18,656] [main]
[INFO:org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping ] -
Exposing  service {urn:your:namespace}SomeService to /services/SomeService"
hope that helps,
-karthik

Jason Tesser wrote:

> does anyone actually have this working with Spring?
>
> On 3/21/06, *Jason Tesser* <[EMAIL PROTECTED]
> <mailto: [EMAIL PROTECTED]>> wrote:
>
>     OK I have an example very similar to teh one on the xfire site.  I
>     will past my files below.  Basically when I goto
>     http://localhost:8080/ws/EdirSyncMDB
>     < http://localhost:8080/ws/EdirSyncMDB> it says the mapping doesn't
>     exist.  What am I missing.
>
>     web.xml
>     ...
>         <servlet>
>             <servlet-name>wsApp</servlet-name>
>             <servlet-class>
>     org.springframework.web.servlet.DispatcherServlet</servlet-class>
>             <load-on-startup>1</load-on-startup>
>         </servlet>
>         <servlet-mapping>
>             <servlet-name>wsApp</servlet-name>
>             <url-pattern>/*</url-pattern>
>         </servlet-mapping>
>     ...
>
>     wsApp-servlet.xml
>     <?xml version="1.0" encoding="UTF-8"?>
>     <!DOCTYPE beans SYSTEM "lib/spring- beans.dtd" >
>     <beans>
>
>     <!-- ===================== 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="/">
>               <ref bean="handlerMapping"/>
>             </entry>
>           </map>
>         </property>
>       </bean>
>     </beans>
>
>     EdirSyncMDBImpl class
>
>     package edu.bju.ws.ldap.edir;
>
>     import javax.jws.WebMethod;
>     import javax.jws.WebService ;
>
>     //@WebService(endpointInterface = "edu.bju.shared.ws.ldap.EdirSync")
>     @WebService(serviceName = "EdirSyncMDB")
>
>     public class EdirSyncMDBImpl {
>         @WebMethod()
>             public String echo( String echo )
>             {
>                 System.out.print("Sending back " + echo);
>                 return echo;
>             }
>     }
>
>


Reply via email to