Spring ws 弹簧OXM 3和x2B;JiBXException:没有为类定义封送拆收器

Spring ws 弹簧OXM 3和x2B;JiBXException:没有为类定义封送拆收器,spring-ws,spring-3,jibx,spring-oxm,Spring Ws,Spring 3,Jibx,Spring Oxm,我在应用程序中使用了Spring OXM和JiBX 下面是我的Spring配置文件 <context:component-scan base-package="com.controller"/> <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/> <bean class="org.springframework.web.serv

我在应用程序中使用了Spring OXM和JiBX

下面是我的Spring配置文件

<context:component-scan base-package="com.controller"/>

<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>

<oxm:jibx-marshaller target-class="com.request.RequestClass" id="rqMarshaller"/>
<oxm:jibx-marshaller target-class="com.response.ResponseClass" id="rsMarshaller"/>

<bean id="xmlViewer" class="org.springframework.web.servlet.view.xml.MarshallingView">
    <constructor-arg ref="rsMarshaller" />
</bean>
<bean id="viewResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver"/>
当我发送XML请求时,它已成功封送,但对于响应,我收到以下错误消息

org.jibx.runtime.JiBXException: No marshaller defined for class com.response.ResponseClass
我已经在spring配置文件中为
ResponseClass
定义了封送拆收器


请帮忙。谢谢。

我终于想出了解决办法

注册
JiBxMarshaller
时需要指定
bindingName
属性

<oxm:jibx-marshaller target-class="com.request.RequestClass" id="rqMarshaller" bindingName="rqBinding"/>
<oxm:jibx-marshaller target-class="com.response.ResponseClass" id="rsMarshaller" bindingName="rsBinding/>


我的代码中的配置已正确完成。我能够获取记录,但当我在很短的时间内多次调用该服务时,我会不断遇到此异常。
<oxm:jibx-marshaller target-class="com.request.RequestClass" id="rqMarshaller" bindingName="rqBinding"/>
<oxm:jibx-marshaller target-class="com.response.ResponseClass" id="rsMarshaller" bindingName="rsBinding/>