1.用Poll定时从数据里查数据,java转换器转换成soup,调用webservice
2.Poll,频率、启动后延迟、时间单位,图例是1000ms执行一次,在AnyPoint里Poll不会按频率执行,只会执行1次,发布到mule-standalone后正常。
3.java转换器,如果转出为soup的话,MINE_TYPE = application/xml,java转换的类class="com.main.convert2Soup"
java转换器
该类需要:
import org.mule.transformer.AbstractMessageTransformer;
public class convert2Soup extends AbstractMessageTransformer
4.处理soap String需要按以下方式:
5.例子:
xmlns:spring="http://www.springframework.org/schema/beans" version="EE-3.6.0"
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/db http://www.mulesoft.org/schema/mule/db/current/mule-db.xsd
http://www.mulesoft.org/schema/mule/json http://www.mulesoft.org/schema/mule/json/current/mule-json.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/ws http://www.mulesoft.org/schema/mule/ws/current/mule-ws.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/ee/data-mapper http://www.mulesoft.org/schema/mule/ee/data-mapper/current/mule-data-mapper.xsd">