0
我有一個基本的騾子流程:從URL獲取XML與騾子
<?xml version="1.0" encoding="UTF-8"?>
<mule xmlns:mulexml="http://www.mulesoft.org/schema/mule/xml" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:jersey="http://www.mulesoft.org/schema/mule/jersey" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.5.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd
http://www.mulesoft.org/schema/mule/ee/tracking http://www.mulesoft.org/schema/mule/ee/tracking/current/mule-tracking-ee.xsd
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd">
<flow name="flow_test" doc:name="flow_test">
<http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8089" doc:name="HTTP"/>
<logger level="INFO" doc:name="Logger"/>
<logger message="#[message.payloadAs(java.lang.String)]" level="INFO" doc:name="Logger"/>
</flow>
</mule>
我使用logger使用這個值由控制檯顯示一條消息:
#[message.payloadAs(java.lang.String)]
的問題是,只有我得到這樣的信息:
INFO 2015年5月27日12:36:42659 [[測試] .connector.http.mule.default.receiver.02] org.mule.api.processor.LoggerMessageProcessor:/
其中「/」值將是XML。我需要做什麼來顯示XML?
更新:問題是http.method INBOUND是GET並且它將POST以顯示數據。我可以將GET轉換爲POST嗎?
謝謝。