2017-06-06 58 views
0

我使用分散聚集(成分騾子ESB)巫包含許多Saleforce來電,分散收集procces後,我得到了以下錯誤時拋出:分散聚集騾子例外:getPayloadAsString(),使用getPayloadAsString(DataType.STRING_DATA_TYPE)

java.lang.UnsupportedOperationException : getPayloadAsString(), use getPayloadAsString(DataType.STRING_DATA_TYPE)

散點圖的配置收集組件在默認情況下

還有就是我的XML配置

<?xml version="1.0" encoding="UTF-8"?> 


<mule xmlns:dw="http://www.mulesoft.org/schema/mule/ee/dw" 
xmlns:tracking="http://www.mulesoft.org/schema/mule/ee/tracking" 
xmlns:sfdc="http://www.mulesoft.org/schema/mule/sfdc" 
xmlns:http="http://www.mulesoft.org/schema/mule/http" 
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" 

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/sfdc 
http://www.mulesoft.org/schema/mule/sfdc/current/mule-sfdc.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/ee/dw 
http://www.mulesoft.org/schema/mule/ee/dw/current/dw.xsd"> 

<flow name="Test1"> 

<http:listener config-ref="httpListenerConfig" path="/test1" doc:name="HTTP" 
allowedMethods="POST"/> 

<dw:transform-message doc:name="Transform Message"> 

<dw:set-payload><![CDATA[%dw 1.0 

%output application/java 

— 

payload]]></dw:set-payload> 

</dw:transform-message> 

<logger level="INFO" doc:name="Logger" message="Before Scatter Gather"/> 

<scatter-gather doc:name="Scatter-Gather"> 

<processor-chain> 

<sfdc:query config-ref="Salesforce__Basic_Authentication" query="Query 
code....."/> 

<logger level="INFO" doc:name="Logger" message="Call Saleforce Number 1"/> 

</processor-chain> 

<processor-chain> 

<sfdc:query config-ref="Salesforce__Basic_Authentication" query="Query 
code....."/> 

<logger level="INFO" doc:name="Logger" message="Call Saleforce Number 2"/> 

</processor-chain> 

... 
... 

</scatter-gather> 
<logger level="INFO" doc:name="Logger" message="After Scatter Gather"/> 

<foreach doc:name="For Each"> 

<logger level="INFO" doc:name="Logger" message="First ForEach"/> 

<foreach doc:name="For Each"> 

<logger level="INFO" doc:name="Logger" message="Second ForEach"/> 

<flow-ref name="flowRefTest1" doc:name="flowRefTest1"/> 

</foreach> 

</foreach> 

</flow> 

</mule> 

任何想法如何解決這個問題的傢伙?

+0

粘貼您的XML配置 –

+0

@ vijaydhanakodi,做 – CooperShelly

回答

0

的那種輸出的原因,是因爲在一開始的HTTP端點沒有得到適當的迴應顯示,以嘗試在正確的格式說明完成所有到Salesforce的通話完成後,設置有效載荷。 希望這有助於

+0

有效載荷是正確的格式,JSON格式 – CooperShelly