You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by mancocapac <ti...@yahoo.com> on 2011/04/11 19:55:47 UTC

Howto run XSLT Transform on logged Soap Msgs

I am debugging a Soap Interface where the msgs contain lots of 32 character
UIDs, this makes the msgs non-human readable. I have created an xslt script
to handle the conversion to readable format and it works fine. Currently, I
run the msgs via SoapUI, capture the responses and then apply the transform.
It seems that I could do this via Synapse.

I have only used Synapes once before in a very simple application. I know
that I can both log msgs and run xslt transforms. However, what I want to do
is let the messages go through un-molested, and run a transfrom on the
logged msg. Is this possible? Could someone give me some direction as to how
I might do this?

Thanks
-- 
View this message in context: http://old.nabble.com/Howto-run-XSLT-Transform-on-logged-Soap-Msgs-tp31372526p31372526.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: Howto run XSLT Transform on logged Soap Msgs

Posted by mancocapac <ti...@yahoo.com>.

Charith Wickramarachchi wrote:
> 
> One thing you can do is use the Clone Mediator. Where in one clone target
> you can just send it through and in another target one you can do the xslt
> and log and then drop the message.
> 
 
Thanks Charith, clone seems to be the way to go, however
as I said I am a rookie with Synapse and I don't see an actual example of
how I setup clone.

The only thing I did before was a simple filter, which is the bases for what
I need to do again.
My typical application is to use Synapse as a Soap Intermediary. We have a
machine with
VPN access to a 3rd party WS. I run my code on a box that has access to our
VPN box. I point
my TargetEndpoint URLs to the Synapse Running on our VPN Box and it
Filters/Forwards the 
Soap between my box and the outside WS.

I have used the following in the past:


    <sequence name="main">
    <!-- log all attributes of messages passing through -->
        <log level="full"/>
        <!-- filtering of messages with XPath and regex matches -->
        <filter source="get-property('To')" regex=".*/Something.*">
	            <then>
	                <send>
	                    <endpoint>
	                        <address
uri="http://SoapWS_IP_ADDR:PORT/stuff/services/Somthing"/>
	                    </endpoint>
	                </send>
	                <drop/>
	            </then>
        </filter>
        <send/>
    </sequence>
</definitions>

How do I combine this filter/forwarding with Clone? 

thanks

-- 
View this message in context: http://old.nabble.com/Howto-run-XSLT-Transform-on-logged-Soap-Msgs-tp31372526p31443731.html
Sent from the Synapse - User mailing list archive at Nabble.com.


Re: Howto run XSLT Transform on logged Soap Msgs

Posted by Charith Wickramarachchi <ch...@gmail.com>.
One thing you can do is use the Clone Mediator. Where in one clone target
you can just send it through and in another target one you can do the xslt
and log and then drop the message.

<clone>
                            <target>
                                    <send>
                                        <endpoint ....>
                                    </send>
                                </sequence>
                            </target>
                            <target>
                                <xslt key= ......>
                                 <log .....>
                                 <drop/>
                            </target>
</clone>



thanks,
Charith

On Mon, Apr 11, 2011 at 11:25 PM, mancocapac <ti...@yahoo.com> wrote:

>
> I am debugging a Soap Interface where the msgs contain lots of 32 character
> UIDs, this makes the msgs non-human readable. I have created an xslt script
> to handle the conversion to readable format and it works fine. Currently, I
> run the msgs via SoapUI, capture the responses and then apply the
> transform.
> It seems that I could do this via Synapse.
>
> I have only used Synapes once before in a very simple application. I know
> that I can both log msgs and run xslt transforms. However, what I want to
> do
> is let the messages go through un-molested, and run a transfrom on the
> logged msg. Is this possible? Could someone give me some direction as to
> how
> I might do this?
>
> Thanks
> --
> View this message in context:
> http://old.nabble.com/Howto-run-XSLT-Transform-on-logged-Soap-Msgs-tp31372526p31372526.html
> Sent from the Synapse - User mailing list archive at Nabble.com.
>
>




-- 
Charith Dhanushka Wickramarachchi
Software Engineer
WSO2 Inc
http://wso2.com/
http://wso2.org/

blog
http://charithwiki.blogspot.com/

twitter
http://twitter.com/charithwiki