Hi Kim,

Task is the abstraction layer and in this particular case you are using one
implementation of that, which is the MessageInjector which just injects a
message to the synapse environment... (which means to the main sequence of
synapse). The to address you specify is just used to set the To value of the
message context so if you do a send without specifying an endpoint this To
address will be used to send the message.

I had the idea of writing a ProxyMessageinjector so that it will be
injecting the messages to the specified proxy service, but didn't complete
it yet. We could get this into the 1.3 release and you are more than welcome
to report this as an enhancement to the synapse JIRA.

Thanks,
Ruwan

On Wed, Mar 11, 2009 at 3:38 AM, kimhorn <[email protected]> wrote:

>
> I assumed task would do a send if a message was injected. So this solves
> problem:
>
> <definitions xmlns="http://ws.apache.org/ns/synapse";>
>  <task class="org.apache.synapse.startup.tasks.MessageInjector"
> name="MyProxy">
>     <property name="to" value="http://localhost:8280/soap/MyProxy"/>
>     <property name="soapAction" value="MyProxy"/>
>    <property name="message">
>      <doNothing/>
>    </property>
>    <trigger interval="10"/>
>  </task>
>  <sequence name="DoStuff">
>    <log level="custom">
>       <property name="MSG" value="&gt;&gt;&gt;&gt;&gt;&gt;&gt; In IN
> Sequence"/>
>    </log>
>  </sequence>
>  <proxy name="MyProxy">
>    <target inSequence="DoStuff"/>
>  </proxy>
>  <in>
>     <send/>
>  </in>
> </definitions>
>
>
>
>
> kimhorn wrote:
> >
> > Can some one explain what is going on here:
> >
> > seting TCPMON to map 8070 to 8280 (Synapse)
> >
> > Why does this code not hit PORT 8070 ever, but goes through <in>
> sequence.
> > What is the hidden magic going on within Synapse here, can it be
> > documented  ?
> >
> > <definitions xmlns="http://ws.apache.org/ns/synapse";>
> >   <task class="org.apache.synapse.startup.tasks.MessageInjector"
> > name="MyProxy">
> >     <property name="to" value="http://localhost:8070/soap/MyProxy"/>
> >     <property name="soapAction" value="MyProxy"/>
> >     <property name="message">
> >       <doNothing/>
> >     </property>
> >     <trigger interval="10"/>
> >   </task>
> >   <sequence name="DoStuff">
> >     <log level="custom">
> >       <property name="MSG" value="In IN Sequence"/>
> >     </log>
> >   </sequence>
> >   <proxy name="MyProxy">
> >     <target inSequence="DoStuff"/>
> >   </proxy>
> >   <in>
> >     <log level="full"/>
> >   </in>
> > </definitions>
> >
> > I would like to use timer via proxy to start a sequence.
> > Seems REALLY ugly to have to filter the inSequence to do this ?
> >
> >
> >
> >
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/Task-Implementation-tp22427256p22444676.html
> Sent from the Synapse - User mailing list archive at Nabble.com.
>
>


-- 
Ruwan Linton
Senior Software Engineer & Product Manager; WSO2 ESB; http://wso2.org/esb
WSO2 Inc.; http://wso2.org
email: [email protected]; cell: +94 77 341 3097
blog: http://ruwansblog.blogspot.com

Reply via email to