0

我想通过 SOAP 方法从 CEP 调用 BPS 流程,但在 BPS 端出现异常。

事件输出格式化程序,例如:

 <?xml version="1.0" encoding="UTF-8"?>
 <eventFormatter name="output_formatter" statistics="disable"
     trace="enable" xmlns="http://wso2.org/carbon/eventformatter">
 <from streamName="output" version="1.0.0"/>
  <mapping customMapping="enable" type="xml">
  <inline>
  <TestEchoRequest>
    <input>{{meta_output}}</input>
  </TestEchoRequest>
</inline>
</mapping>
<to eventAdaptorName="outputadapter" eventAdaptorType="soap">
<property name="headers">SOAPAction:"http://wso2.org/bps/sample/process" </property>
<property name="username">admin@carbon.super</property>
<property name="password">admin</property>
<property name="url">http://192.168.20.213:9767/services/TestEcho/</property>
</to>
</eventFormatter>

但从 Enter Event Formatter Details 来看,headers 属性与 XML 版本不匹配,丢失了“SOAPAction”的下半部分。

如果从 Event Stream Simulator 触发事件,BPS 会出现异常:

TID[-1234] [BPS] [2015-08-27 09:51:08,064] ERROR {org.apache.axis2.engine.AxisEngine} - The endpoint reference (EPR) for the Operation not found is http://192.168.11.250:9767/services/TestEcho/ and the WSA Action = . If this EPR was previously reachable, please contact the server administrator.

CEP发送的消息是这样的,好像丢失了SOAPAction头:

POST / HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
User-Agent: Axis2
Host: 192.168.20.213:9767
Transfer-Encoding: chunked

400
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1"><wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="Timestamp-71"><wsu:Created>2015-08-28T05:14:09.554Z</wsu:Created><wsu:Expires>2015-08-28T05:19:09.554Z</wsu:Expires></wsu:Timestamp><wsse:UsernameToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="UsernameToken-72"><wsse:Username>admin</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">admin</wsse:Password></wsse:UsernameToken></wsse:Security></soapenv:Header><soapenv:Body><event xmlns="http://wso2.org/carbon/event"><metaData><im>AAAAAAA</im></metaData></event></soapenv:Body></soapenv:Envelope>
0

这是一个错误还是任何建议?

4

1 回答 1

1

以上是 WSO2 CEP 3.1.0 中的一个已知问题,请参阅 [1]。作为一种解决方法,您可以调用 TestEcho 服务的 soap12 端点,因为 SOAPAction 属性在 soap12 中是可选的(为 url 属性添加带有 soap12 端点的完整 url)。

例如, http: //192.168.20.213 :9767/services/TestEcho.TestEchoHttpsSoap12Endpoint/

[1] https://wso2.org/jira/browse/CEP-1108

于 2015-08-31T02:23:13.343 回答