Hi,
Thanks for your response. I'm not using maven2, and I'm also not familiar
with it. That's probably why I don't understand your response.

Can you please give me some clues?
Does this mean I need to (re)build xfire? Which pom file are you referring
to? How do I do this?
I'm completely lost on the 'spring remoting' functionality. Do I need this,
and why?

Further help is greatly appreciated!
Thanks,
Tom

On 5/7/07, Henning Jensen <[EMAIL PROTECTED]> wrote:

Tom van den Berge wrote:
> Hi,
>
> I noticed that Xfire 1.2.5 has a dependency on Spring 1.2.6. In my
> project, I'm using Spring 2.0. Unfortunately, this version seems not to
> work with Xfire. If I replace the 1.2.6 version with 2.0, I'm getting
> the error " java.lang.IllegalStateException: Could not find valid
> implementation for: 2.0" (stacktrace below).
>
> How can I make Xfire 1.2.5 work with Spring 2.0?
>

Hi!

You don't say if you are using maven2, but if you do, the following
entries in pom.xml worked great for me:

         <dependency>
             <groupId>org.codehaus.xfire</groupId>
             <artifactId>xfire-core</artifactId>
             <version>1.2.6</version>
             <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.codehaus.xfire</groupId>
             <artifactId>xfire-aegis</artifactId>
             <version>1.2.6</version>
             <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.codehaus.xfire</groupId>
             <artifactId>xfire-java5</artifactId>
             <version>1.2.6</version>
             <scope>runtime</scope>
         </dependency>
         <dependency>
             <groupId>org.codehaus.xfire</groupId>
             <artifactId>xfire-spring</artifactId>
             <version>1.2.6</version>
             <scope>runtime</scope>
             <!-- THIS IS IMPORTANT IN ORDER TO REMOVE SPRING 1.X -->
             <exclusions>
                 <exclusion>
                     <groupId>org.springframework</groupId>
                     <artifactId>spring</artifactId>
                 </exclusion>
             </exclusions>
         </dependency>
...
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-beans</artifactId>
             <version>2.0.2</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.springframework</groupId>
             <artifactId>spring-context</artifactId>
             <version>2.0.2</version>
             <scope>compile</scope>
         </dependency>


The xfire-spring dependency has an exclusion rule that removes the
transitive spring 1.2.X dependency. Later in pom.xml the spring 2.0
dependency is included as usual.

In addition i had to use springs remoting functionality(see
http://xfire.codehaus.org/Spring+Remoting) to get it to play nice.

Include the following in web.xml:
  <context-param>
         <param-name>contextConfigLocation</param-name>
         <param-value>
             classpath:applicationContext.xml
             ...
             classpath:org/codehaus/xfire/spring/xfire.xml
         </param-value>
     </context-param>


     <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>/services/*</url-pattern>
     </servlet-mapping>


Following the instructions in
http://xfire.codehaus.org/Spring+Remoting#SpringRemoting-XFireExporter
you have to create the file /WEB-INF/xfire-servlet.xml that holds your
xfire beans.

--
Henning Jensen

---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to