我正在尝试创建一个基于定义一个请求和一个响应的 WSDL 的 WS。传入请求应根据 SOAP 消息中定义的 SOAPAction 映射到端点。为实现这一点,我尝试在我的 servlet.xml 配置文件中使用 SoapActionEndpointMapping 并定义映射,如 Spring documentation 中所述。 .
<bean id="endpointMapping" class="org.springframework.ws.soap.server.endpoint.mapping.SoapActionEndpointMapping">
<property name="mappings">
<props>
<prop key="http://myCompany/MyService/MyRequest/mySoapActionOne">myFirstEndpoint</prop>
<prop key="http://myCompany/MyService/MyRequest/mySoapActionTwo">mySecondEndpoint</prop>
</props>
</property>
我的端点扩展了 AbstractMarshallingPayloadEndpoint 并且应该能够处理请求。
问题是,当我尝试发送请求(使用 SoapUI)时,我在日志中收到以下错误:
WARN [EndpointNotFound] No endpoint mapping found for [SaajSoapMessage {http://schemas.mycompany/MyService}MyRequest]
我之前使用过 PayloadRootQNameEndpointMapping 并取得了巨大成功,但无法正常工作。
感谢任何帮助。
问候。
最佳答案
您是否还定义了处理程序适配器 bean?您需要一个才能使用 MarshallingPayloadEndpoint,以便 spring 知道如何执行编码。该适配器的名称类似于 MarshallingEndpointHandlerAdapter 或类似名称。
关于web-services - SoapActionEndpointMapping在Spring-ws中的使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/974164/