raj
raj

Reputation: 103

WSO2 how to solve scheduled task?

In wso2 esb 4.5.1, i don't have option of direct task scheduling for sequence or proxy service. so, i try to use property name SoapAction and to in task scheduling but iam getting the below error,

ERROR - TaskManagementHelper Invalid XML has been provided for property : message ERROR - TaskManagementHelper Invalid XML has been provided for property : format

Upvotes: 0

Views: 815

Answers (1)

Jean-Michel
Jean-Michel

Reputation: 5946

Here is a sample "Scheduled Task" that inject 2 times an XML message

<root>
   <node1>value1</node1>
</root>

It works with ESB 4.5.1

<?xml version="1.0" encoding="UTF-8"?>
<task xmlns="http://ws.apache.org/ns/synapse"
      name="TestTask"
      class="org.apache.synapse.startup.tasks.MessageInjector"
      group="synapse.simple.quartz">
   <trigger count="2" interval="5"/>
   <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks"
             name="format"
             value="application/xml"/>
   <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks"
             name="to"
             value="TestTaskProxy"/>
   <property xmlns:task="http://www.wso2.org/products/wso2commons/tasks" name="message">
      <root xmlns="">
         <node1>value1</node1>
      </root>
   </property>
</task>

format and to properties are literal types

message property is an XML type

Upvotes: 1

Related Questions