Java 返回错误为的soap消息

Java 返回错误为的soap消息,java,web-services,spring-integration,Java,Web Services,Spring Integration,客户机不希望获取错误soap消息,并且喜欢smth <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

客户机不希望获取错误soap消息,并且喜欢smth

<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>

首先:你的
错误包装器是什么?请出示密码。至少他对
ErrorMessage
做了些什么,他又做了些什么? 但是您的问题在这里
output channel=“inboundChannel”

删除此属性,如果您的
ErrorWrapper
没有返回
消息
,您将得到预期的结果。

提供有关您尝试实现的目标的更多背景信息。听起来您的客户机需要了解,他们必须处理托管代码之外发生的soap错误(服务器错误、客户机错误),因此,在代码中处理逻辑抛出的soap错误应该不是什么大问题。
    <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" />
`