XFire配置的问题

shy_baby_love 2016-08-16 11:10:50
web.xml配置

<!-- webservice 相关配置2,这种配置方式xfire在启动时候根据spring配置文件关于xfire配置内容来启动 -->
<servlet>
<servlet-name>xfireServlet</servlet-name>
<servlet-class>
org.codehaus.xfire.spring.XFireSpringServlet
</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/config/xfire-servlet.xml</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>xfireServlet</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>


xfire-servlet.xml配置
<!--?xml version=1.0 encoding=UTF-8? -->
<beans aop="" beans="" context="" http:="" schema=""
spring-aop-2.5.xsd=""
spring-beans-2.5.xsd=""
spring-context-2.5.xsd=""
spring-tx-2.5.xsd="" tx=""
www.springframework.org=""
xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemalocation="http://www.springframework.org/schema/beans">

<context:component-scan base-package="com.halis.souhuo.xfire">
<tx:annotation-driven transaction-manager="transactionManager">
<context:property-placeholder location="classpath:jdbc.properties">
<import resource="classpath:org/codehaus/xfire/spring/xfire.xml">
<bean class="org.codehaus.xfire.annotations.jsr181.Jsr181WebAnnotations" id="webAnnotations">
<bean class="org.codehaus.xfire.spring.remoting.Jsr181HandlerMapping" id="jsr181HandlerMapping">
<property name="xfire" ref="xfire">
<property name="webAnnotations" ref="webAnnotations">
</property>
</property>
</bean>
</bean>
</import>
</context:property-placeholder>
</tx:annotation-driven>
</context:component-scan>
</aop:aspectj-autoproxy>
</beans>


启动时报错No bean named 'xfire' is defined
...全文
432 15 打赏 收藏 转发到动态 举报
写回复
用AI写文章
15 条回复
切换为时间正序
请发表友善的回复…
发表回复
shy_baby_love 2016-08-17
  • 打赏
  • 举报
回复
application-context.xml的配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context" xmlns:task="http://www.springframework.org/schema/task" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.0.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd" default-autowire="byName"> <!-- 配置数据库连接 --> <context:property-placeholder location="/WEB-INF/config/database.properties" /> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource"> <property name="driverClassName"> <value>${driverclass}</value> </property> <property name="url"> <value>${jdbcurl}</value> </property> <property name="username"> <value>${user}</value> </property> <property name="password"> <value>${password}</value> </property> <property name="defaultAutoCommit"> <value>false</value> </property> </bean> <!-- 配置数据库相关数据 --> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource"> <ref bean="dataSource" /> </property> <property name="mappingLocations"> <list> <value>classpath*:/com/halis/platform/entity/*.hbm.xml</value> </list> </property> <property name="packagesToScan" value="com" /> <property name="hibernateProperties"> <props> <prop key="hibernate.jdbc.use_scrollable_resultset">true</prop> <prop key="hibernate.query.substitutions">1</prop> <prop key="hibernate.connection.provider_class"> org.hibernate.connection.DatasourceConnectionProvider </prop> <prop key="hibernate.jdbc.batch_versioned_data">true</prop> <prop key="hibernate.cache.use_second_level_cache">true</prop> <prop key="hibernate.cache.use_query_cache">true</prop> <prop key="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</prop> <prop key="hibernate.show_sql">${hibernate_show_sql}</prop> <prop key="hibernate.format_sql">${hibernate_format_sql}</prop> <prop key="hibernate.max_fetch_depth">3</prop> <prop key="hibernate.order_updates">true</prop> <prop key="hibernate.jdbc.fetch_size">100</prop> <prop key="hibernate.jdbc.batch_size">100</prop> <prop key="hibernate.dialect">${hibernate_dialect}</prop> </props> </property> </bean> <bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate" abstract="false" lazy-init="default" autowire="default"> <property name="sessionFactory"> <ref bean="sessionFactory" /> </property> </bean> <!-- 定时任务 --> <bean id="schedulerFactoryBean" class="org.springframework.scheduling.quartz.SchedulerFactoryBean" autowire="no"> </bean> <bean id="jobDetail" class="org.springframework.scheduling.quartz.JobDetailFactoryBean"> <property name="jobClass"> <value>com.halis.souhuo.manager.model.job.QuartzJobFactoryDisallowConcurrentExecution</value> </property> <property name="durability" value="true" /> </bean> <bean id="baseTaskDao" class="com.halis.core.dao.BaseDaoImpl" > <property name="taskSessionFactory" ref="sessionFactory"></property> </bean> <bean id="txManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> <property name="sessionFactory" ref="sessionFactory" /> </bean> <bean class="com.halis.core.context.ServletContextUtils" id="servletContextUtils"/> <bean class="com.halis.core.context.ApplicationContextUtils" id="applicationContextUtils"/> <!-- 配置资源文件 --> <bean id="messageSource" class="org.springframework.context.support.ReloadableResourceBundleMessageSource"> <property name="basenames"> <list> <value>/WEB-INF/messages/system</value> <value>/WEB-INF/messages/business</value> <value>/WEB-INF/messages/apkVersion</value> </list> </property> <!-- <property name="basename" value="/WEB-INF/admin/messages/messages"/> 在此默认找的是messages.properties文件 --> <property name="fileEncodings" value="utf-8"/> <property name="cacheSeconds" value="-1"/> </bean> <!-- 声明式事务管理 --> <aop:config> <aop:advisor pointcut="execution(* com.halis.*.*.model.*Service.*(..)) or execution(* com.halis.*.*.*model.*(..)) or execution(* com.halis.souhuo.*.*.*.*Service.*(..))" advice-ref="myAdvice" /> </aop:config> <tx:advice id="myAdvice" transaction-manager="txManager"> <tx:attributes> <tx:method name="add*" propagation="REQUIRED" /> <tx:method name="update*" propagation="REQUIRED" /> <tx:method name="del*" propagation="REQUIRED" /> <tx:method name="save*" propagation="REQUIRED" /> <tx:method name="modify*" propagation="REQUIRED" /> <tx:method name="reset*" propagation="REQUIRED" /> <tx:method name="refresh*" propagation="REQUIRED" /> <tx:method name="send*" propagation="REQUIRED" /> <tx:method name="receive*" propagation="REQUIRED" /> <tx:method name="max*" propagation="REQUIRED" /> <tx:method name="push*" propagation="REQUIRED" /> <tx:method name="change*" propagation="REQUIRED" /> <tx:method name="*" read-only="true" rollback-for="com.halis.core.exception.DatabaseException" /> </tx:attributes> </tx:advice> <!-- 自动扫描组件,需要把controller去掉,否则影响事务管理 --> <!-- <context:component-scan base-package="com.halis"> <context:exclude-filter type="regex" expression="com.halis.*.*Controller" /> </context:component-scan> --> <context:component-scan base-package="com.halis" /> <!-- 任务注解声明 --> <task:annotation-driven scheduler="qbScheduler" mode="proxy" /> <task:scheduler id="qbScheduler" pool-size="10" /> </beans>
shy_baby_love 2016-08-17
  • 打赏
  • 举报
回复
运行之后报错 17:16:43.671 DEBUG org.codehaus.xfire.transport.DefaultTransportManager - Registered transport org.codehaus.xfire.transport.local.LocalTransport@7c20a9de 17:16:43.673 DEBUG org.codehaus.xfire.transport.DefaultTransportManager - Registered transport org.codehaus.xfire.transport.dead.DeadLetterTransport@3ceda903 17:16:43.675 DEBUG org.codehaus.xfire.transport.DefaultTransportManager - Registered transport org.codehaus.xfire.transport.http.SoapHttpTransport@75eff472 17:16:43.675 DEBUG org.codehaus.xfire.transport.DefaultTransportManager - Registered transport org.codehaus.xfire.transport.http.HttpTransport@5c99a4db 17:16:43.702 WARN org.springframework.beans.factory.config.CustomEditorConfigurer - Passing PropertyEditor instances into CustomEditorConfigurer is deprecated: use PropertyEditorRegistrars or PropertyEditor class names instead. Offending key [org.codehaus.xfire.service.ServiceFactory; offending editor instance: org.codehaus.xfire.spring.editors.ServiceFactoryEditor@2d153029 17:16:43.842 DEBUG org.codehaus.xfire.transport.DefaultTransportManager - Registered transport org.codehaus.xfire.transport.http.XFireServletTransport@10ce86c2 17:16:43.858 DEBUG org.codehaus.xfire.service.documentation.XMLDocumentationBuilder - Searching for HelloWorld.doc.xml config.. 17:16:43.859 DEBUG org.codehaus.xfire.service.documentation.XMLDocumentationBuilder - Config HelloWorld.doc.xml NOT found. 17:16:43.875 INFO org.codehaus.xfire.spring.ServiceBean - Exposing service with name {http://controller.webService.souhuo.halis.com}HelloWorld 17:16:43.890 DEBUG org.codehaus.xfire.transport.DefaultTransportManager - Registered transport org.codehaus.xfire.transport.http.XFireServletTransport@53e70269 八月 17, 2016 5:16:43 下午 org.apache.catalina.core.ApplicationContext log 信息: Initializing Spring FrameworkServlet 'uc' 17:16:44.420 ERROR org.springframework.web.servlet.DispatcherServlet - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.halis.platform.session.MemberSession com.halis.core.base.BaseController.memberSession; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.halis.platform.session.MemberSession] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1122) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:626) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) ~[spring-context-3.2.2.jar:3.2.2] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) ~[spring-context-3.2.2.jar:3.2.2] at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:651) ~[spring-webmvc-3.2.2.jar:3.2.2] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:599) ~[spring-webmvc-3.2.2.jar:3.2.2] at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:665) ~[spring-webmvc-3.2.2.jar:3.2.2] at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:518) ~[spring-webmvc-3.2.2.jar:3.2.2] at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:459) ~[spring-webmvc-3.2.2.jar:3.2.2] at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:136) [spring-webmvc-3.2.2.jar:3.2.2] at javax.servlet.GenericServlet.init(GenericServlet.java:158) [servlet-api.jar:3.0.FR] at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1282) [catalina.jar:7.0.70] at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1195) [catalina.jar:7.0.70] at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1085) [catalina.jar:7.0.70] at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5349) [catalina.jar:7.0.70] at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5641) [catalina.jar:7.0.70] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) [catalina.jar:7.0.70] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1571) [catalina.jar:7.0.70] at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1561) [catalina.jar:7.0.70] at java.util.concurrent.FutureTask.run(FutureTask.java:262) [na:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_79] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_79] at java.lang.Thread.run(Thread.java:745) [na:1.7.0_79] Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.halis.platform.session.MemberSession com.halis.core.base.BaseController.memberSession; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.halis.platform.session.MemberSession] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:514) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:87) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:285) ~[spring-beans-3.2.2.jar:3.2.2] ... 29 common frames omitted Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.halis.platform.session.MemberSession] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoSuchBeanDefinitionException(DefaultListableBeanFactory.java:986) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:856) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:768) ~[spring-beans-3.2.2.jar:3.2.2] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:486) ~[spring-beans-3.2.2.jar:3.2.2] ... 31 common frames omitted
shy_baby_love 2016-08-17
  • 打赏
  • 举报
回复
web.xml配置 <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> <display-name>ha</display-name> <!-- spring 容器配置文件 --> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/config/application-context.xml /WEB-INF/config/bean-context.xml </param-value> </context-param> <context-param> <param-name>globalConfigLocation</param-name> <param-value>/WEB-INF/config/global.xml</param-value> </context-param> <!-- sitemesh 模板过滤器 --> <filter> <filter-name>sitemesh</filter-name> <filter-class>org.sitemesh.config.ConfigurableSiteMeshFilter</filter-class> <init-param> <param-name>configFile</param-name> <param-value>/WEB-INF/config/sitemesh3.xml</param-value> </init-param> </filter> <filter-mapping> <filter-name>sitemesh</filter-name> <url-pattern>*</url-pattern> <dispatcher>REQUEST</dispatcher> <dispatcher>FORWARD</dispatcher> </filter-mapping> <filter> <filter-name>encodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <init-param> <param-name>encoding</param-name> <param-value>UTF-8</param-value> </init-param> <init-param> <param-name>forceEncoding</param-name> <param-value>true</param-value><!-- 强制进行转码 --> </init-param> </filter> <filter-mapping> <filter-name>encodingFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- Log4j Configfile START --> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/config/log4j.properties</param-value> </context-param> <listener> <listener-class>org.springframework.web.util.Log4jConfigListener</listener-class> </listener> <!-- Log4j Configfile END --> <!-- log4j要再此之前加载否则坚挺不到log配置信息 --> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- springmvc 容器上下文 --> <servlet> <servlet-name>uc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/config/uc-servlet.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>customerService</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/config/customerService-servlet.xml</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet> <servlet-name>manager</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/config/manager-servlet.xml</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet> <servlet-name>app</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/config/app-servlet.xml</param-value> </init-param> <load-on-startup>3</load-on-startup> </servlet> <servlet> <servlet-name>web</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/config/web-servlet.xml</param-value> </init-param> <load-on-startup>4</load-on-startup> </servlet> <servlet> <servlet-name>Captcha</servlet-name> <servlet-class>com.google.code.kaptcha.servlet.KaptchaServlet</servlet-class> <init-param> <param-name>kaptcha.border</param-name> <param-value>no</param-value> </init-param> <init-param> <param-name>kaptcha.textproducer.font.color</param-name> <param-value>black</param-value> </init-param> <init-param> <param-name>kaptcha.textproducer.char.space</param-name> <param-value>4</param-value> </init-param> <init-param> <param-name>kaptcha.textproducer.font.size</param-name> <param-value>24</param-value> </init-param> <init-param> <param-name>kaptcha.image.width</param-name> <param-value>100</param-value> </init-param> <init-param> <param-name>kaptcha.image.height</param-name> <param-value>35</param-value> </init-param> <init-param> <param-name>kaptcha.textproducer.char.length</param-name> <param-value>5</param-value> </init-param> <init-param> <param-name>kaptcha.obscurificator.impl</param-name> <param-value>com.xinlong.captcha.impl.WaterRipple</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>Captcha</servlet-name> <url-pattern>/captcha.jpg</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>uc</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>customerService</servlet-name> <url-pattern>*.cs</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>manager</servlet-name> <url-pattern>*.action</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>app</servlet-name> <url-pattern>/api/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>web</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index</welcome-file> <welcome-file>index.html</welcome-file> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <error-page> <error-code>500</error-code> <location>/WEB-INF/error/500.html</location> </error-page> <error-page> <error-code>404</error-code> <location>/WEB-INF/error/404.jsp</location> </error-page> <servlet> <display-name>Apache-Axis Servlet</display-name> <servlet-name>AxisServlet</servlet-name> <servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class> </servlet> <servlet> <display-name>Axis Admin Servlet</display-name> <servlet-name>AdminServlet</servlet-name> <servlet-class>org.apache.axis.transport.http.AdminServlet</servlet-class> <load-on-startup>100</load-on-startup> </servlet> <servlet-mapping> <servlet-name>AxisServlet</servlet-name> <url-pattern>/servlet/AxisServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AxisServlet</servlet-name> <url-pattern>*.jws</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AxisServlet</servlet-name> <url-pattern>/servicess/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>AdminServlet</servlet-name> <url-pattern>/servlet/AdminServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.css</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.gif</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.jpg</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.png</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.js</url-pattern> </servlet-mapping> <session-config> <session-timeout>30</session-timeout> </session-config> <listener> <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class> </listener> <!-- 注意因为servlet-name为xfire,固xfire配置文件名应该是xfire-servlet.xml --> <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>*.ws</url-pattern> </servlet-mapping> <!-- 配合Spring容器中XFire一起工作的Servlet- --> <servlet> <servlet-name>xfireServlet</servlet-name> <servlet-class> org.codehaus.xfire.spring.XFireSpringServlet </servlet-class> </servlet> <servlet-mapping> <servlet-name>xfireServlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> <context-param> <param-name>contextConfigLocation</param-name> <param-value> /WEB-INF/config/xfire-servlet.xml </param-value> </context-param> </web-app> xfire-servlet.xml配置 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"> <beans> <!-- 引入XFire预配置信息 --> <import resource="classpath:org/codehaus/xfire/spring/xfire.xml" /> <!-- 定义访问的url--> <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="urlMap"> <map> <entry key="/HelloWorldService.ws"> <ref bean="HelloWorldService" /> </entry> </map> </property> </bean> <!-- 使用XFire导出器 --> <bean id="baseWebService" class="org.codehaus.xfire.spring.remoting.XFireExporter" lazy-init="false" abstract="true"> <!-- 引用xfire.xml中定义的工厂 --> <property name="serviceFactory" ref="xfire.serviceFactory" /> <!-- 引用xfire.xml中的xfire实例 --> <property name="xfire" ref="xfire" /> </bean> <bean id="HelloWorldService" parent="baseWebService"> <!-- 业务服务bean --> <property name="serviceBean" ref="HelloWorldBean" /> <!-- 业务服务bean的窄接口类 --> <property name="serviceClass" value="com.halis.souhuo.webService.controller.HelloWorld" /> </bean> <bean id="HelloWorldBean" class="com.halis.souhuo.webService.controller.HelloWorldImpl" /> </beans>
  • 打赏
  • 举报
回复
你把代码传上来吧,搞不清楚现在你要描述的是什么错误了,是原来的错误解决了又抛了新的错误还是什么?还是拿代码跑一下吧
shy_baby_love 2016-08-17
  • 打赏
  • 举报
回复
如果删掉XFire的配置文件是正常的
shy_baby_love 2016-08-17
  • 打赏
  • 举报
回复
发现只要加上XFire的配置就会报其他模块的错误,也不知道是不是冲突了
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.halis.platform.session.MemberSession] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
shy_baby_love 2016-08-17
  • 打赏
  • 举报
回复
引用 8 楼 qnmdcsdn 的回复:
org/codehaus/xfire/spring/xfire.xml jar包全不全,能不能找到这个文件
有这个文件的
  • 打赏
  • 举报
回复
property name="xfire" ref="xfire">
shy_baby_love 2016-08-16
  • 打赏
  • 举报
回复
有没有懂的大神,稍微指点下小弟我啊,纠结了3、4天了,快崩溃了
  • 打赏
  • 举报
回复
org/codehaus/xfire/spring/xfire.xml jar包全不全,能不能找到这个文件
  • 打赏
  • 举报
回复
不行就打开这个文件,把对应的bean配置拷出来
shy_baby_love 2016-08-16
  • 打赏
  • 举报
回复
引用 5 楼 fangmingshijie 的回复:
<import resource="classpath*:org/codehaus/xfire/spring/xfire.xml">加个星,代表可以从jar里搜索,你这个xfire文件应该在第三方jar里吧
好像没用唉
  • 打赏
  • 举报
回复
<import resource="classpath*:org/codehaus/xfire/spring/xfire.xml">加个星,代表可以从jar里搜索,你这个xfire文件应该在第三方jar里吧
shy_baby_love 2016-08-16
  • 打赏
  • 举报
回复
我重新布置了下关于XFire的配置 web.xml配置 <!-- begin XFire 配置 --> <servlet> <servlet-name>xfireServlet</servlet-name> <servlet-class>org.codehaus.xfire.spring.XFireSpringServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/config/xfire-servlet.xml</param-value> </init-param> <load-on-startup>2</load-on-startup> </servlet> <servlet-mapping> <servlet-name>xfireServlet</servlet-name> <url-pattern>/xfService/*</url-pattern> </servlet-mapping> <!-- end XFire 配置 --> xfire-servlet.xml配置 <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://xfire.codehaus.org/config/1.0"> <service> <name>HelloWorld</name> <serviceClass>com.halis.souhuo.xfire.IHelloWorld</serviceClass> <implementationClass> com.halis.souhuo.xfire.HelloWorldImpl </implementationClass> <style>wrapped</style> <use>literal</use> <scope>application</scope> </service> </beans> 接口 package com.halis.souhuo.xfire; public interface IHelloWorld { public String example(String message); } 实现类 package com.halis.souhuo.xfire; public class HelloWorldImpl implements IHelloWorld { @Override public String example(String message) { System.out.println(this); return "你好,这是我的第一个Web Service,你输入的消息是:"+message; } } 启动报错 八月 16, 2016 3:26:49 下午 org.apache.catalina.core.StandardContext loadOnStartup 严重: Servlet [xfireServlet] in web application [/ha] threw load() exception org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'xfire' is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:568) at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1102) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:278) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:198) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1121) at org.codehaus.xfire.spring.XFireSpringServlet.init(XFireSpringServlet.java:33) at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1282) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1195) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1085) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5349) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5641) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1260) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:2002) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
shy_baby_love 2016-08-16
  • 打赏
  • 举报
回复
没用啊,删了一样报这个错误,而且这个不是预留的配置信息吗,哪位大哥可以贴个正确的配置代码啊

81,091

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧