我希望开始使用WSO2 ESB来处理两个第三方产品之间发生的请求。
我无法更改呼叫客户端。我无法更改网络服务。
客户端发送带有SOAP标头的请求,ESB认为该标头无效。 Web服务直接从客户端接受呼叫。它没有通过ESB,我看到只有请求进入ESB并且回复返回到客户端而没有ESB呼叫端点。调试跟踪显示处理程序决定标题中包含的操作标记不符合所需标准。
TID: [0] [ESB] [2014-12-24 10:51:06,481] DEBUG {org.apache.axis2.context.MessageContext} - SoapAction is () {org.apache.axis2.context.MessageContext}
TID: [0] [ESB] [2014-12-24 10:51:06,481] DEBUG {org.apache.axis2.builder.BuilderUtil} - char set encoding set from default =UTF-8 {org.apache.axis2.builder.BuilderUtil}
TID: [0] [ESB] [2014-12-24 10:51:06,481] DEBUG {org.apache.axis2.handlers.addressing.AddressingInHandler} - No headers present corresponding to http://www.w3.org/2005/08/addressing {org.apache.axis2.handlers.addressing.AddressingInHandler}
TID: [0] [ESB] [2014-12-24 10:51:06,481] DEBUG {org.apache.axis2.handlers.addressing.AddressingInHandler} - http://schemas.xmlsoap.org/ws/2004/08/addressing headers present in the SOAP message. Starting to process ... {org.apache.axis2.handlers.addressing.AddressingInHandler}
TID: [0] [ESB] [2014-12-24 10:51:06,481] DEBUG {org.apache.axis2.client.Options} - getAction () from org.apache.axis2.client.Options@53781b2c {org.apache.axis2.client.Options}
TID: [0] [ESB] [2014-12-24 10:51:06,481] DEBUG {org.apache.axis2.handlers.addressing.AddressingInHandler} - The wsa:Action header is present but its contents are empty. This violates rules in the WS-A specification. The SOAP node that sent this message must be changed. {org.apache.axis2.handlers.addressing.AddressingInHandler}
TID: [0] [ESB] [2014-12-24 10:51:06,481] WARN {org.apache.axis2.addressing.AddressingFaultsHelper} - triggerActionNotSupportedFault: messageContext: [MessageContext: logID=d241a239ecfe36148a4f055b69d082a8d2b599e9cd6d6ba7] problemAction: {org.apache.axis2.addressing.AddressingFaultsHelper}
TID: [0] [ESB] [2014-12-24 10:51:06,481] DEBUG {org.apache.axis2.i18n.ProjectResourceBundle} - org.apache.axis2.addressing.i18n.resource::handleGetObject(spec.FAULT_ACTION_NOT_SUPPORTED_REASON) {org.apache.axis2.i18n.ProjectResourceBundle}
TID: [0] [ESB] [2014-12-24 10:51:06,481] ERROR {org.apache.synapse.transport.passthru.util.RelaySecuirtyMessageBuilderDispatchandler} - Error while executing the message at relaySecurity handler {org.apache.synapse.transport.passthru.util.RelaySecuirtyMessageBuilderDispatchandler}
org.apache.axis2.AxisFault: The [action] cannot be processed at the receiver.
at org.apache.axis2.addressing.AddressingFaultsHelper.triggerAddressingFault(AddressingFaultsHelper.java:373)
at org.apache.axis2.addressing.AddressingFaultsHelper.triggerActionNotSupportedFault(AddressingFaultsHelper.java:336)
at org.apache.axis2.handlers.addressing.AddressingInHandler.extractActionInformation(AddressingInHandler.java:539)
at org.apache.axis2.handlers.addressing.AddressingInHandler.extractAddressingInformation(AddressingInHandler.java:249)
客户端创建的请求具有以下标题
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<wsa:Action/>
<wsa:MessageID>urn:uuid:926dbf87-1f59-4fff-b1e9-341286567f8c</wsa:MessageID>
<wsa:ReplyTo>
<wsa:Address>http://schemas.xmlsoap.org/ws/2004/08/addressing/role/anonymous</wsa:Address>
</wsa:ReplyTo>
<wsa:To>http://blahblahblah:8280/services/PassTrhuProxy1</wsa:To>
</soap:Header>
<soap:Body>
...
</soap:Body>
</soap:Envelope>
我们已经通过在SOAPUI中创建请求进行了一些测试,如果我们使用如下所示的标题创建一个请求,我们可以从服务中获得正确的响应。
<soap:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
我不知道如何让ESB将消息传递给服务。有办法吗?
我不知道 1.我有没有办法让WSO2 ESB忽略验证错误,以便我可以将信息传入调解员,以便我可以操纵它们? 2.有没有办法完全关闭验证? 3.可以设置WSO2 ESB来开箱即用吗?需要更改源代码吗?
感谢您考虑我的问题......
答案 0 :(得分:0)
WS-Addressing验证有时令人讨厌,但您可以通过在axis2.xml配置中添加以下行来将其关闭:
<parameter name="disableAddressingForInMessages" locked="false">true</parameter>