【发布时间】:2013-11-08 13:24:55
【问题描述】:
客户不想得到错误的肥皂消息并且喜欢像这样的东西
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<ns2:TestResponse xmlns:ns2="http://teclot.com/exchange">
<ns2:return>ERROR</ns2:return>
</ns2:TestResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
我们在项目中使用 Spring Integration。我认为它应该看起来像
<int-ws:inbound-gateway id="wsInboundGateway"
request-channel="inboundChannel"
marshaller="serverSchemaMarshaller"
unmarshaller="serverSchemaMarshaller"
error-channel="errorChannel" />
<bean id="errorWrapper" class="pro.tender.customer.ws2apmq.ErrorWrapper"/>
<int:transformer id="errorWrap" input-channel="errorChannel" ref="errorWrapper" output-channel="inboundChannel" />
我的错误在哪里?
`
【问题讨论】:
-
提供更多关于您想要实现的目标的背景信息。
-
听起来你的客户需要明白他们必须处理在你的托管代码之外发生的soap错误(服务器错误,客户端错误),所以处理逻辑抛出应该不是什么大问题代码中的肥皂错误。
标签: java web-services spring-integration