Hi, all!
Now I'm trying to migrate from XFire 1.1.2 to CXF 2.0.2.
All is under Spring 1.2.7, app-server Tomcat 5.5.14, Java - 1.5.0_09-b03
The main reason of this migration is that Xfire 1.1.2 with Java 1.6.* starts
to return "nothing" on SOAP requests. When testing service with SOAP WSDL
Analyzer (of Oxygen XML Editor) it shows the next:
"Nested exception is javax.xml.stream.XMLStreamException: prefix cannot be
null or empty"
It only became to previous "normal" state when JDK was restored to 1.5.*
(Maybe someone met with that?)
So, migrating! ... possibly, to avoid above problems. And to upgrade right
away to upcoming project, not to xfire 2.*.
Production server has Spring 1.2.7 so I cannot use version 2.0> at the
moment.
In brief, I didn't delete Xfire libraries from release 1.1.2, added all jars
from CFX 2.0.2 except spring-2.0 related, then built the project and tried
to start tomcat:
12:49:49,234 [ERROR] [org.springframework.web.context.ContextLoader] -
Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Line 10 in
XML document from ServletContext resource [/WEB-INF/test-CxfServlets.xml] is
invalid; nested exception is org.xml.sax.SAXParseException: Attribute
"xmlns" must be declared for element type "beans".
org.xml.sax.SAXParseException: Attribute "xmlns" must be declared for
element type "beans".
at
org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown
Source)
...............................
my test-CxfServlets.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
"http://www.springframework.org/dtd/spring-beans.dtd">
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:jaxws="http://cxf.apache.org/jaxws"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
<import resource="classpath:META-INF/cxf/cxf.xml" />
<import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
<jaxws:endpoint
id="print_string"
implementor="uk.ltd.singles.datingengine.remoting.http.TestServiceImpl"
wsdlLocation="WEB-INF/wsdl/print_string.wsdl"
address="/print_string">
<jaxws:features>
<bean class="org.apache.cxf.feature.LoggingFeature"/>
</jaxws:features>
</jaxws:endpoint>
</beans>
Content of web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app 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"
version="2.4">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
...
/WEB-INF/applicationContext*.xml
classpath:org/codehaus/xfire/spring/xfire.xml
/WEB-INF/test-CxfServlets.xml
</param-value>
</context-param>
...
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
...
<!-- CXF SERVLETS Testing Configuration block Start -->
<servlet>
<servlet-name>CXFServlet</servlet-name>
<display-name>CXF Servlet</display-name>
<servlet-class>
org.apache.cxf.transport.servlet.CXFServlet
</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>CXFServlet</servlet-name>
<url-pattern>/cxfws/*</url-pattern>
</servlet-mapping>
<!-- CXF SERVLETS Testing Configuration block End -->
....
So, the questions are:
1) Is it possible to configure CFX with Spring less than 2.0 ?
2) Noticeable errors in code?
Any help would be appreciated, thanks.
--
View this message in context:
http://www.nabble.com/Spring-1.2.7-%22beans%22-configuration-problems%2C-XFire--%3E-CXF-migration.-tf4527535.html#a12918521
Sent from the cxf-user mailing list archive at Nabble.com.