【发布时间】:2019-04-12 09:02:10
【问题描述】:
我使用以下代码将 x-www-form-urlencoded 消息发送到支持的服务器。
<endpoint xmlns="http://ws.apache.org/ns/synapse" name="FormDataReceiver">
<http uri-template="http://www.eaipatterns.com/MessageEndpoint.html" method="post">
<suspendOnFailure>
<progressionFactor>1.0</progressionFactor>
</suspendOnFailure>
<markForSuspension>
<retriesBeforeSuspension>0</retriesBeforeSuspension>
<retryDelay>0</retryDelay>
</markForSuspension>
</http>
</endpoint>
也使用了以下 API 代码。
<api xmlns="http://ws.apache.org/ns/synapse" name="FORM" context="/Service">
<resource methods="POST">
<inSequence>
<log level="full"></log>
<property name="name" value="Mark" scope="default" type="STRING"></property>
<property name="company" value="wso2" scope="default" type="STRING"></property>
<property name="country" value="US" scope="default" type="STRING"></property>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<root xmlns="">
<name>$1</name>
<company>$2</company>
<country>$3</country>
</root>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$ctx:name"></arg>
<arg evaluator="xml" expression="$ctx:company"></arg>
<arg evaluator="xml" expression="$ctx:country"></arg>
</args>
</payloadFactory>
<log level="full"></log>
<property name="messageType" value="application/x-www-form-urlencoded" scope="axis2" type="STRING"></property>
<property name="DISABLE_CHUNKING" value="true" scope="axis2" type="STRING"></property>
<call>
<endpoint key="FormDataReceiver"></endpoint>
</call>
<respond></respond>
</inSequence>
</resource>
</api>
但该消息仍然以休息呼叫方式发送。
我想要将消息正文跟随到支持的服务器中。此示例消息应通过消息正文发送。在这里,我使用了 WSO2 Given Example。我添加了相同的 wso2esb 链接供您进一步参考。 wso2。实际上我需要发送消息 XML={{my_xml_message_here}}。请帮我继续这个。非常感谢。
name=Mark&company=wso2
【问题讨论】:
-
您使用的 ESB 版本是什么? 4.8.1?另外,从 ESB 发出的确切有效负载是什么?
-
ESB 版本是 wso2ei-6.4.0
标签: rest soap wso2 wso2esb wso2ei