Wso2 充实中介器要插入到消息正文中的对象类型无效
错误:要插入到消息正文中的丰富中介无效对象类型 尝试充实消息时,以下是代理配置:Wso2 充实中介器要插入到消息正文中的对象类型无效,wso2,wso2esb,Wso2,Wso2esb,错误:要插入到消息正文中的丰富中介无效对象类型 尝试充实消息时,以下是代理配置: <proxy xmlns="http://ws.apache.org/ns/synapse" name="Database" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence> <dbl
<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>
1234
根
jdbc:mysql://localhost:3306/new_db
com.mysql.jdbc.Driver
从用户中选择*,其中name=“rik”
以及序列配置(但此处不应出现问题):
非常感谢
编辑:日志有效,但消息无效。这是日志文件:
[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>
[2012-09-03 09:44:28853]信息-LogMediator为客户端返回值
在is:=2012-08-30上,客户端id的返回值为:=1,客户端id的返回值为
客户名称为:=rik
[2012-09-03 09:44:28854]错误-要插入的EnrichMediator对象类型无效
将文本转换为消息体
[2012-09-03 09:44:28856]信息-日志中介收件人:,WSAction:urn:mediate,SOAPA
操作:urn:mediate,消息ID:urn:uuid:f0035921-8b6a-48db-a9a4-78be2687336d,Di
回复:回复,信封:<
/soapenv:信封>
像这样丰富中介并尝试
<enrich>
<source type="custom" xpath="get-property('property1')"/>
<target type="body" action="sibling"/>
</enrich>
不幸的是,它没有改变错误,如果您想查看,我已经发布了日志。。。
<enrich>
<source type="custom" xpath="get-property('property1')"/>
<target type="body" action="sibling"/>
</enrich>