Return-Path: Delivered-To: apmail-ws-synapse-dev-archive@www.apache.org Received: (qmail 70707 invoked from network); 21 Nov 2007 06:13:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Nov 2007 06:13:12 -0000 Received: (qmail 28699 invoked by uid 500); 21 Nov 2007 06:12:58 -0000 Delivered-To: apmail-ws-synapse-dev-archive@ws.apache.org Received: (qmail 28640 invoked by uid 500); 21 Nov 2007 06:12:58 -0000 Mailing-List: contact synapse-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: synapse-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list synapse-dev@ws.apache.org Received: (qmail 28560 invoked by uid 99); 21 Nov 2007 06:12:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 20 Nov 2007 22:12:57 -0800 X-ASF-Spam-Status: No, hits=3.2 required=10.0 tests=HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.68.5.17] (HELO relay03.pair.com) (209.68.5.17) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 21 Nov 2007 06:12:47 +0000 Received: (qmail 30253 invoked from network); 21 Nov 2007 06:12:38 -0000 Received: from unknown (HELO ?10.100.1.106?) (unknown) by unknown with SMTP; 21 Nov 2007 06:12:38 -0000 X-pair-Authenticated: 123.231.23.58 Message-ID: <4743CC54.5070208@wso2.com> Date: Wed, 21 Nov 2007 11:42:36 +0530 From: "Asankha C. Perera" User-Agent: Thunderbird 2.0.0.9 (X11/20071031) MIME-Version: 1.0 To: synapse-user@ws.apache.org, synapse-dev@ws.apache.org Subject: Re: Clone mediator References: <006701c82b62$60755230$0132a8c0@agora.msanet> <4742C5F7.3090708@wso2.com> In-Reply-To: <4742C5F7.3090708@wso2.com> Content-Type: multipart/alternative; boundary="------------010600030801050701080009" X-Virus-Checked: Checked by ClamAV on apache.org --------------010600030801050701080009 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8bit I committed a simple Callout mediator last night to the Synapse trunk. For those of you who may want to check it out, I have uploaded a SNAPSHOT build here http://people.apache.org/~asankha/builds/synapse/SNAPSHOT/ The Syntax is as follows: Basically the callout mediator would make a blocking call to the provided service using the URL and the optional action. This request message could be a fragment from the current message if the source attribute specifies an XPath expression to get the necessary payload (Note: only the payload which will go within the SOAP body should be specified here). Alternatively you could refer to some XML fragment you have previously stored into the current message context via a property key, or even a local or remote registry entry that holds an XML request payload. If a target XPath expression is specified, that node from the current message is replaced with the reply received after the callout. If a key is specified, the response is stored on the current message context as an XML fragment. Note that I also made a slight enhancement to the XSLT mediator to be able to store the result of a transformation (i.e. the XML fragment) as a message context property. i.e. the "target" attribute as shown below. Your thoughts and suggestions are welcome. However, note that this offers only the ability to make simple callouts and thus would have limitations! asankha Asankha C. Perera wrote: > Hi Guys > > This is your lucky day! I would be committing a simple Callout mediator > to the Synapse trunk later today.. and this would allow you to do this > rather easily.. I will try to make a nightly build and upload along with > it.. > > thanks > asankha > > Alexander Faust wrote: > >> Hi, >> >> you could maybe NOT clone the message with the clone mediator and just >> create a mediator that will copy the MessageContext, request the other >> WS, wait for an answer, send the answer to the endpoint and then >> continue processing the original MessageContext like nothing happened? >> This way the processing of the original Message would be delayed until >> you could process the copy. >> >> Hope this helps... sorry for the bad english. >> >> Alexander Faust >> >> Am 20.11.2007 um 11:44 schrieb Laurent CHARTIER: >> >> >>> Hi all, >>> in the sequence I'm writing, when I receive a message, I have to create >>> another message to request a specific WS before I can send the received >>> message to the endpoint. >>> Is there a way that the cloned messages created by the clone mediator >>> are >>> not processed parallelly ? >>> >>> Thanks, >>> Laurent CHARTIER >>> ME Socles Techniques - P�le Mise en �uvre >>> AGORA Montauban - T�l. :05.63.68.48.11 >>> P Avant d'imprimer, pensez � l'Environnement >>> >>> >>> >>> >>> Ce message est prot�g� par les r�gles relatives au secret des >>> correspondances. Il est donc �tabli � destination exclusive de son >>> destinataire. Celui-ci peut donc contenir des informations >>> confidentielles. La divulgation de ces informations est � ce titre >>> rigoureusement interdite. Si vous avez re�u ce message par erreur, >>> merci de le renvoyer � l'exp�diteur dont l'adresse e-mail figure >>> ci-dessus et de d�truire le message ainsi que toute pi�ce jointe. >>> >>> This message is protected by the secrecy of correspondence rules. >>> Therefore, this message is intended solely for the attention of the >>> addressee. This message may contain privileged or confidential >>> information, as such the disclosure of these informations is strictly >>> forbidden. If, by mistake, you have received this message, please >>> return this message to the addressser whose e-mail address is written >>> above and destroy this message and all files attached. >>> >>> >>> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org >> For additional commands, e-mail: synapse-user-help@ws.apache.org >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org > For additional commands, e-mail: synapse-user-help@ws.apache.org > > > --------------010600030801050701080009 Content-Type: text/html; charset=WINDOWS-1252 Content-Transfer-Encoding: 8bit I committed a simple Callout mediator last night to the Synapse trunk. For those of you who may want to check it out, I have uploaded a SNAPSHOT build here http://people.apache.org/~asankha/builds/synapse/SNAPSHOT/

The Syntax is as follows:
�<callout serviceURL="string" [action="string"]>
����� <source xpath="expression" | key="string">
����� <target xpath="expression" | key="string"/>
�</callout>

Basically the callout mediator would make a blocking call to the provided service using the URL and the optional action. This request message could be a fragment from the current message if the source attribute specifies an XPath expression to get the necessary payload (Note: only the payload which will go within the SOAP body should be specified here). Alternatively you could refer to some XML fragment you have previously stored into the current message context via a property key, or even a local or remote registry entry that holds an XML request payload. If a target XPath expression is specified, that node from the current message is replaced with the reply received after the callout. If a key is specified, the response is stored on the current message context as an XML fragment.

Note that I also made a slight enhancement to the XSLT mediator to be able to store the result of a transformation (i.e. the XML fragment) as a message context property. i.e. the "target" attribute as shown below.

<xslt key="property-key" [source="xpath"] [target="string"]>
�� <property name="string" (value="literal" | expression="xpath")/>
</transform>

Your thoughts and suggestions are welcome. However, note that this offers only the ability to make simple callouts and thus would have limitations!

asankha

Asankha C. Perera wrote:
Hi Guys

This is your lucky day! I would be committing a simple Callout mediator
to the Synapse trunk later today.. and this would allow you to do this
rather easily.. I will try to make a nightly build and upload along with
it..

thanks
asankha

Alexander Faust wrote:
  
Hi,

you could maybe NOT clone the message with the clone mediator and just
create a mediator that will copy the MessageContext, request the other
WS, wait for an answer, send the answer to the endpoint and then
continue processing the original MessageContext like nothing happened?
This way the processing of the original Message would be delayed until
you could process the copy.

Hope this helps... sorry for the bad english.

Alexander Faust

Am 20.11.2007 um 11:44 schrieb Laurent CHARTIER:

    
Hi all,
in the sequence I'm writing, when I receive a message, I have to create
another message to request a specific WS before I can send the received
message to the endpoint.
Is there a way that the cloned messages created by the clone mediator
are
not processed parallelly ?

Thanks,
Laurent CHARTIER
ME Socles Techniques - P�le Mise en �uvre
AGORA Montauban - T�l. :05.63.68.48.11
P Avant d'imprimer, pensez � l'Environnement




Ce message est prot�g� par les r�gles relatives au secret des
correspondances. Il est donc �tabli � destination exclusive de son
destinataire. Celui-ci peut donc contenir des informations
confidentielles. La divulgation de ces informations est � ce titre
rigoureusement interdite. Si vous avez re�u ce message par erreur,
merci de le renvoyer � l'exp�diteur dont l'adresse e-mail figure
ci-dessus et de d�truire le message ainsi que toute pi�ce jointe.

This message is protected by the secrecy of correspondence rules.
Therefore, this message is intended solely for the attention of the
addressee. This message may contain privileged or confidential
information, as such the disclosure of these informations is strictly
forbidden. If, by mistake, you have received this message, please
return this message to the addressser whose e-mail address is written
above and destroy this message and all files attached.


      
---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


    

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-user-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-user-help@ws.apache.org


  
--------------010600030801050701080009--