1
ERROR:豐富介體無效的對象類型將被插入到消息主體富民介體無效的對象類型到消息主體
試圖豐富消息時,這裏是代理配置:
<proxy xmlns="http://ws.apache.org/ns/synapse" name="Database" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<dblookup>
<connection>
<pool>
<password>1234</password>
<user>root</user>
<url>jdbc:mysql://localhost:3306/new_db</url>
<driver>com.mysql.jdbc.Driver</driver>
</pool>
</connection>
<statement>
<sql>select * from users where name="rik"</sql>
<result name="client_expiration" column="expiration" />
<result name="client_id" column="id" />
<result name="client_name" column="name" />
</statement>
</dblookup>
<log level="custom">
<property name="returned value for client_expiration is :" expression="get-property('client_expiration')" />
<property name="returned value for client_id is :" expression="get-property('client_id')" />
<property name="returned value for client_name is :" expression="get-property('client_name')" />
</log>
<property name="property1" expression="get-property('client_expiration')" scope="default" />
<enrich>
<source type="property" property="property1" />
<target type="body" action="sibling" />
</enrich>
<sequence key="getback" />
</inSequence>
</target>
</proxy>
和序列配置(但不應該是這裏的問題):
<sequence xmlns="http://ws.apache.org/ns/synapse" name="getback">
<header name="To" action="remove" />
<property name="RESPONSE" value="true" scope="default" />
<send />
<log level="full" />
</sequence>
提前非常感謝!
編輯:日誌工作,但消息沒有。這是日誌文件:
[2012-09-03 09:44:28,853] INFO - LogMediator returned value for client_expirati
on is : = 2012-08-30, returned value for client_id is : = 1, returned value for
client_name is : = rik
[2012-09-03 09:44:28,854] ERROR - EnrichMediator Invalid Object type to be inser
ted into message body
[2012-09-03 09:44:28,856] INFO - LogMediator To: , WSAction: urn:mediate, SOAPA
ction: urn:mediate, MessageID: urn:uuid:f0035921-8b6a-48db-a9a4-78be2687336d, Di
rection: response, Envelope: <?xml version='1.0' encoding='utf-8'?><soapenv:Enve
lope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Body /><
/soapenv:Envelope>
遺憾的是它不改變錯誤,我已經發布了LOG,如果你想看看... – nuvio