You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@synapse.apache.org by Laurent CHARTIER <ex...@agora.msa.fr> on 2008/02/20 15:00:39 UTC

Generic Proxy

Hi all,
I'm interested in a generic proxy.
My needs are to mediate the message (in order to log some informations) and
then to route to another server.
It seems that I must declare one proxy for each service in the synapse
configuration.
Is there a way to declare just one proxy to only switch the host and not the
path?
 
Thanks,
Laurent CHARTIER
MiddleWare - Pôle Gestion des flux
AGORA Montauban - Tél. :05.63.68.46.24
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.



RE : RE : Generic Proxy

Posted by Laurent CHARTIER <ex...@agora.msa.fr>.
I'm going to try this.
Thank you.

-----Message d'origine-----
De : Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Envoyé : vendredi 14 mars 2008 15:25
À : user@synapse.apache.org
Objet : Re: RE : Generic Proxy


Hi Laurent,

You can find the URLRewrite Mediator with documentation at the esbsite.orgat
[1].

[1] -
http://esbsite.org/resources.jsp?path=/mediators/thilinamb/URLRewrite%20Medi
ator

Thanks,
Ruwan

On Fri, Mar 14, 2008 at 7:31 PM, Laurent CHARTIER <
ext_chartier.laurent@agora.msa.fr> wrote:

> If I log the To property, then it is good (/soap/R5WSService). The 
> only thing I want to change is the target Host 
> (http://localhost:8219-> http://170.217.251.101:8210). If I have an 
> endpoint to the send mediator, it seems that the To property is
> flushed and replaced by the endpoint uri (http://170.217.251.101:8210).
> I don't know how to update the host without modifying the To property...
> Could you tell me?
>
> Is there some new informations about the "mod rewrite" mediator?
>
> Laurent.
>
>
> -----Message d'origine-----
> De : Asankha C. Perera [mailto:asankha@wso2.com]
> Envoyé : mercredi 20 février 2008 15:15
> À : user@synapse.apache.org
> Objet : Re: Generic Proxy
>
>
> Hi Laurent
> > I'm interested in a generic proxy.
> > My needs are to mediate the message (in order to log some
> > informations) and then to route to another server. It seems that I 
> > must declare one proxy for each service in the synapse 
> > configuration. Is there a way to declare just one proxy to only 
> > switch the host and not
> the
> > path?
> >
> Sure, you can use the 'message mediation' feature of Synapse for this 
> ( 
> http://synapse.apache.org/Synapse_Configuration_Language.html#a_messag
> e_med
> iation)
>
> Thus, the sequence named "main" accepts / handles any message not 
> dispatched to a proxy service. You can then use Synapse to re-write 
> the To address as appropriate, and I am informed that a university 
> student is currently writing a mediator which can do just this very 
> simply - e.g. like mod reqrite.. This mediator should be available in 
> the next week..
>
> asankha
>
>
>
>
> 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.
>
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"




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.



Re: RE : Generic Proxy

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Laurent,

You can find the URLRewrite Mediator with documentation at the
esbsite.orgat [1].

[1] -
http://esbsite.org/resources.jsp?path=/mediators/thilinamb/URLRewrite%20Mediator

Thanks,
Ruwan

On Fri, Mar 14, 2008 at 7:31 PM, Laurent CHARTIER <
ext_chartier.laurent@agora.msa.fr> wrote:

> If I log the To property, then it is good (/soap/R5WSService).
> The only thing I want to change is the target Host (http://localhost:8219->
> http://170.217.251.101:8210).
> If I have an endpoint to the send mediator, it seems that the To property
> is
> flushed and replaced by the endpoint uri (http://170.217.251.101:8210).
> I don't know how to update the host without modifying the To property...
> Could you tell me?
>
> Is there some new informations about the "mod rewrite" mediator?
>
> Laurent.
>
>
> -----Message d'origine-----
> De : Asankha C. Perera [mailto:asankha@wso2.com]
> Envoyé : mercredi 20 février 2008 15:15
> À : user@synapse.apache.org
> Objet : Re: Generic Proxy
>
>
> Hi Laurent
> > I'm interested in a generic proxy.
> > My needs are to mediate the message (in order to log some
> > informations) and then to route to another server. It seems that I
> > must declare one proxy for each service in the synapse configuration.
> > Is there a way to declare just one proxy to only switch the host and not
> the
> > path?
> >
> Sure, you can use the 'message mediation' feature of Synapse for this
> (
> http://synapse.apache.org/Synapse_Configuration_Language.html#a_message_med
> iation)
>
> Thus, the sequence named "main" accepts / handles any message not
> dispatched to a proxy service. You can then use Synapse to re-write the
> To address as appropriate, and I am informed that a university student
> is currently writing a mediator which can do just this very simply -
> e.g. like mod reqrite.. This mediator should be available in the next
> week..
>
> asankha
>
>
>
>
> 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.
>
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

RE : Generic Proxy

Posted by Laurent CHARTIER <ex...@agora.msa.fr>.
If I log the To property, then it is good (/soap/R5WSService).
The only thing I want to change is the target Host (http://localhost:8219 ->
http://170.217.251.101:8210).
If I have an endpoint to the send mediator, it seems that the To property is
flushed and replaced by the endpoint uri (http://170.217.251.101:8210).
I don't know how to update the host without modifying the To property...
Could you tell me?

Is there some new informations about the "mod rewrite" mediator?

Laurent.


-----Message d'origine-----
De : Asankha C. Perera [mailto:asankha@wso2.com] 
Envoyé : mercredi 20 février 2008 15:15
À : user@synapse.apache.org
Objet : Re: Generic Proxy


Hi Laurent
> I'm interested in a generic proxy.
> My needs are to mediate the message (in order to log some 
> informations) and then to route to another server. It seems that I 
> must declare one proxy for each service in the synapse configuration.
> Is there a way to declare just one proxy to only switch the host and not
the
> path?
>   
Sure, you can use the 'message mediation' feature of Synapse for this 
(http://synapse.apache.org/Synapse_Configuration_Language.html#a_message_med
iation)

Thus, the sequence named "main" accepts / handles any message not 
dispatched to a proxy service. You can then use Synapse to re-write the 
To address as appropriate, and I am informed that a university student 
is currently writing a mediator which can do just this very simply - 
e.g. like mod reqrite.. This mediator should be available in the next week..

asankha




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.



Re: Generic Proxy

Posted by "Asankha C. Perera" <as...@wso2.com>.
Hi Laurent
> I'm interested in a generic proxy.
> My needs are to mediate the message (in order to log some informations) and
> then to route to another server.
> It seems that I must declare one proxy for each service in the synapse
> configuration.
> Is there a way to declare just one proxy to only switch the host and not the
> path?
>   
Sure, you can use the 'message mediation' feature of Synapse for this 
(http://synapse.apache.org/Synapse_Configuration_Language.html#a_message_mediation)

Thus, the sequence named "main" accepts / handles any message not 
dispatched to a proxy service. You can then use Synapse to re-write the 
To address as appropriate, and I am informed that a university student 
is currently writing a mediator which can do just this very simply - 
e.g. like mod reqrite.. This mediator should be available in the next week..

asankha

Re: RE : RE : RE : Generic Proxy

Posted by Paul Fremantle <pz...@gmail.com>.
Laurent

Any chance of contributing it to the esbsite.org?

Paul

On Wed, Mar 19, 2008 at 10:38 AM, Laurent CHARTIER
<ex...@agora.msa.fr> wrote:
> Thank all!
>
>  My initial problem was to rewrite the To URL only keeping the prefix of the
>  original one and replacing the other parts with new informations.
>  I write a mediator.
>  It has a key parameter wich refers an endpoint in the configuration file.
>  Its role is to obtain the prefix of the original To URL, obtain protocol,
>  host and port of the referenced endpoint (with the key) and then to concat
>  everything to update the To address.
>
>  If someone is interrested, let me know.
>
>
>  Laurent.
>
>  -----Message d'origine-----
>  De : Ruwan Linton [mailto:ruwan.linton@gmail.com]
>  Envoyé : lundi 17 mars 2008 18:17
>
> À : user@synapse.apache.org
>  Objet : Re: RE : RE : Generic Proxy
>
>
>  Hi Laurent,
>
>
>
>  I think Paul is right, you should be able to use it.
>
>  Any way here is how you could retrieve the information you required;
>
>  port --> ((Axis2MessageContext)
>  msgCtx).getAxis2MessageContext().getTransportIn().getParameter("port").getVa
>  lue();
>  protocol --> ((Axis2MessageContext)
>  msgCtx).getAxis2MessageContext().getTransportIn().getName();
>
>  Host retrieval is a bit difficult, and if this can not be achieved by the
>  URLRewrite mediator we can provide these information from the transport as a
>  property inside the message context.
>
>  Thanks,
>  Ruwan
>
>  On Mon, Mar 17, 2008 at 9:33 PM, Paul Fremantle <pz...@gmail.com> wrote:
>
>  > Laurent
>  >
>  > You don't need to use WS-Addressing to use the Rewrite mediator. In
>  > the absence of WS-A, the "To" property is the suffix of URL of the
>  > incoming request:
>  >
>  > eg.
>  > to = "/soap/services/MyProxy"
>  >
>  > Paul
>  >
>  > On Mon, Mar 17, 2008 at 2:56 PM, Laurent CHARTIER
>  > <ex...@agora.msa.fr> wrote:
>  > > Hi Ruwan,
>  > >  You're right. I don't have any addressing informations in the
>  > > requests!  And so I think the URLRewriter mediator on the
>  > > esbsite.org can't help
>  > me.
>  > >  Moreover I have to keep the part after the host and the port (I
>  > > musn't  replace the entire URL).  So I'd like to create a mediator
>  > > to update one part of the target URL
>  > of the
>  > >  message.
>  > >
>  > >  Please tell me how to get these informations!
>  > >
>  > >  Thanks a lot,
>  > >  Laurent.
>  > >
>  > >  -----Message d'origine-----
>  > >
>  > > De : Ruwan Linton [mailto:ruwan.linton@gmail.com]
>  > >  Envoyé : lundi 17 mars 2008 14:33
>  > >
>  > > À : user@synapse.apache.org
>  > >  Objet : Re: RE : Generic Proxy
>  > >
>  > >
>  > >
>  > >
>  > >  Hi Laurent,
>  > >
>  > >  Let me help you on this... :)
>  > >
>  > >  Have you had a look at the URL Rewrite mediator in the esbsite.org?
>  > > In  general unless you send a message with addressing headers the To
>  > > URL
>  > refers
>  > >  to the part after the synapse server URL.... You don't want to use
>  > > addressing in the request right?
>  > >
>  > >  If all the above questions does not help you to get this done
>  > > please
>  > let me
>  > >  know, so that I will tell you how to get the information that you
>  > require
>  > >  inside a custom mediator that you are going to write or if these
>  > information
>  > >  cannot be retrieved from the message context we must add those
>  > information
>  > >  to the message context.
>  > >
>  > >  Thanks,
>  > >  Ruwan
>  > >
>  > >  On Mon, Mar 17, 2008 at 4:18 PM, Laurent CHARTIER <
>  > > ext_chartier.laurent@agora.msa.fr> wrote:
>  > >
>  > >  > I was wrong...
>  > >  > I don't need a proxy, but an URL rewriter.
>  > >  > The target of my client is Synapse and Synapse have to rewrite
>  > > the
>  > URL
>  > >  > to aim the real services. I'm writing a mediator to do this, but
>  > > the  > "To" information in the message context doesn't contains the
>  > protocol,
>  > >  > the host and the port. How can I know the original protocol, host
>  > > and  > port?  >
>  > >  > Thank you.
>  > >  >
>  > >  >
>  > >  > -----Message d'origine-----
>  > >  > De : Paul Fremantle [mailto:pzfreo@gmail.com]
>  > >  > Envoyé : vendredi 14 mars 2008 19:13
>  > >  > À : user@synapse.apache.org
>  > >  > Objet : Re: Generic Proxy
>  > >  >
>  > >  >
>  > >  > Laurent
>  > >  >
>  > >  > The other option is that Synapse acts as a HTTP Proxy. If you have
>  > >  > Synapse running on 8080 and you set that as the proxy for your HTTP
>  > >  > client, the message will be passed to the main mediation with the
>  > >  > correct endpoint automatically. No rewriting necessary, because the
>  > >  > correct endpoint is specified by the client.
>  > >  >
>  > >  > Paul
>  > >  >
>  > >  > 2008/2/20 Laurent CHARTIER <ex...@agora.msa.fr>:
>  > >  > > Hi all,
>  > >  > >  I'm interested in a generic proxy.
>  > >  > >  My needs are to mediate the message (in order to log some
>  > >  > > informations) and  then to route to another server.  It seems that
>  > I
>  > >  > > must declare one proxy for each service in the synapse  > >
>  > > configuration.  Is there a way to declare just one proxy to only  >
>  > > > switch the host and  > not
>  > >  > the
>  > >  > >  path?
>  > >  > >
>  > >  > >  Thanks,
>  > >  > >  Laurent CHARTIER
>  > >  > >  MiddleWare - Pôle Gestion des flux
>  > >  > >  AGORA Montauban - Tél. :05.63.68.46.24
>  > >  > >  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.
>  > > > >  > >
>  > >  > >
>  > >  >
>  > >  >
>  > >  >
>  > >  > --
>  > >  > Paul Fremantle
>  > >  > Co-Founder and VP of Technical Sales, WSO2
>  > >  > Apache Synapse PMC Chair
>  > >  > OASIS WS-RX TC Co-chair
>  > >  >
>  > >  > blog: http://pzf.fremantle.org
>  > >  > paul@wso2.com
>  > >  >
>  > >  > "Oxygenating the Web Service Platform", www.wso2.com
>  > >  >
>  > >  >
>  > >  >
>  > >  >
>  > >  > 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.
>  > >  >
>  > >  >
>  > >  >
>  > >
>  > >
>  > >  --
>  > >  Ruwan Linton
>  > >  http://www.wso2.org - "Oxygenating the Web Services Platform"
>  > >
>  > >
>  > >
>  > >
>  > >  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.
>  > >
>  > >
>  > >
>  >
>  >
>  >
>  > --
>  > Paul Fremantle
>  > Co-Founder and VP of Technical Sales, WSO2
>  > Apache Synapse PMC Chair
>  > OASIS WS-RX TC Co-chair
>  >
>  > blog: http://pzf.fremantle.org
>  > paul@wso2.com
>  >
>  > "Oxygenating the Web Service Platform", www.wso2.com
>  >
>
>
>
>  --
>  Ruwan Linton
>  http://www.wso2.org - "Oxygenating the Web Services Platform"
>
>
>
>
>  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.
>
>
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

RE : RE : RE : Generic Proxy

Posted by Laurent CHARTIER <ex...@agora.msa.fr>.
Thank all!

My initial problem was to rewrite the To URL only keeping the prefix of the
original one and replacing the other parts with new informations.
I write a mediator.
It has a key parameter wich refers an endpoint in the configuration file.
Its role is to obtain the prefix of the original To URL, obtain protocol,
host and port of the referenced endpoint (with the key) and then to concat
everything to update the To address.

If someone is interrested, let me know.

Laurent.

-----Message d'origine-----
De : Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Envoyé : lundi 17 mars 2008 18:17
À : user@synapse.apache.org
Objet : Re: RE : RE : Generic Proxy


Hi Laurent,

I think Paul is right, you should be able to use it.

Any way here is how you could retrieve the information you required;

port --> ((Axis2MessageContext)
msgCtx).getAxis2MessageContext().getTransportIn().getParameter("port").getVa
lue();
protocol --> ((Axis2MessageContext)
msgCtx).getAxis2MessageContext().getTransportIn().getName();

Host retrieval is a bit difficult, and if this can not be achieved by the
URLRewrite mediator we can provide these information from the transport as a
property inside the message context.

Thanks,
Ruwan

On Mon, Mar 17, 2008 at 9:33 PM, Paul Fremantle <pz...@gmail.com> wrote:

> Laurent
>
> You don't need to use WS-Addressing to use the Rewrite mediator. In 
> the absence of WS-A, the "To" property is the suffix of URL of the 
> incoming request:
>
> eg.
> to = "/soap/services/MyProxy"
>
> Paul
>
> On Mon, Mar 17, 2008 at 2:56 PM, Laurent CHARTIER 
> <ex...@agora.msa.fr> wrote:
> > Hi Ruwan,
> >  You're right. I don't have any addressing informations in the 
> > requests!  And so I think the URLRewriter mediator on the 
> > esbsite.org can't help
> me.
> >  Moreover I have to keep the part after the host and the port (I 
> > musn't  replace the entire URL).  So I'd like to create a mediator 
> > to update one part of the target URL
> of the
> >  message.
> >
> >  Please tell me how to get these informations!
> >
> >  Thanks a lot,
> >  Laurent.
> >
> >  -----Message d'origine-----
> >
> > De : Ruwan Linton [mailto:ruwan.linton@gmail.com]
> >  Envoyé : lundi 17 mars 2008 14:33
> >
> > À : user@synapse.apache.org
> >  Objet : Re: RE : Generic Proxy
> >
> >
> >
> >
> >  Hi Laurent,
> >
> >  Let me help you on this... :)
> >
> >  Have you had a look at the URL Rewrite mediator in the esbsite.org? 
> > In  general unless you send a message with addressing headers the To 
> > URL
> refers
> >  to the part after the synapse server URL.... You don't want to use  
> > addressing in the request right?
> >
> >  If all the above questions does not help you to get this done 
> > please
> let me
> >  know, so that I will tell you how to get the information that you
> require
> >  inside a custom mediator that you are going to write or if these
> information
> >  cannot be retrieved from the message context we must add those
> information
> >  to the message context.
> >
> >  Thanks,
> >  Ruwan
> >
> >  On Mon, Mar 17, 2008 at 4:18 PM, Laurent CHARTIER <  
> > ext_chartier.laurent@agora.msa.fr> wrote:
> >
> >  > I was wrong...
> >  > I don't need a proxy, but an URL rewriter.
> >  > The target of my client is Synapse and Synapse have to rewrite 
> > the
> URL
> >  > to aim the real services. I'm writing a mediator to do this, but 
> > the  > "To" information in the message context doesn't contains the
> protocol,
> >  > the host and the port. How can I know the original protocol, host 
> > and  > port?  >
> >  > Thank you.
> >  >
> >  >
> >  > -----Message d'origine-----
> >  > De : Paul Fremantle [mailto:pzfreo@gmail.com]
> >  > Envoyé : vendredi 14 mars 2008 19:13
> >  > À : user@synapse.apache.org
> >  > Objet : Re: Generic Proxy
> >  >
> >  >
> >  > Laurent
> >  >
> >  > The other option is that Synapse acts as a HTTP Proxy. If you have
> >  > Synapse running on 8080 and you set that as the proxy for your HTTP
> >  > client, the message will be passed to the main mediation with the
> >  > correct endpoint automatically. No rewriting necessary, because the
> >  > correct endpoint is specified by the client.
> >  >
> >  > Paul
> >  >
> >  > 2008/2/20 Laurent CHARTIER <ex...@agora.msa.fr>:
> >  > > Hi all,
> >  > >  I'm interested in a generic proxy.
> >  > >  My needs are to mediate the message (in order to log some
> >  > > informations) and  then to route to another server.  It seems that
> I
> >  > > must declare one proxy for each service in the synapse  > > 
> > configuration.  Is there a way to declare just one proxy to only  > 
> > > switch the host and  > not
> >  > the
> >  > >  path?
> >  > >
> >  > >  Thanks,
> >  > >  Laurent CHARTIER
> >  > >  MiddleWare - Pôle Gestion des flux
> >  > >  AGORA Montauban - Tél. :05.63.68.46.24
> >  > >  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.  
> > > >  > >
> >  > >
> >  >
> >  >
> >  >
> >  > --
> >  > Paul Fremantle
> >  > Co-Founder and VP of Technical Sales, WSO2
> >  > Apache Synapse PMC Chair
> >  > OASIS WS-RX TC Co-chair
> >  >
> >  > blog: http://pzf.fremantle.org
> >  > paul@wso2.com
> >  >
> >  > "Oxygenating the Web Service Platform", www.wso2.com
> >  >
> >  >
> >  >
> >  >
> >  > 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.
> >  >
> >  >
> >  >
> >
> >
> >  --
> >  Ruwan Linton
> >  http://www.wso2.org - "Oxygenating the Web Services Platform"
> >
> >
> >
> >
> >  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.
> >
> >
> >
>
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> Apache Synapse PMC Chair
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>



-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"




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.



Re: RE : RE : Generic Proxy

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Laurent,

I think Paul is right, you should be able to use it.

Any way here is how you could retrieve the information you required;

port --> ((Axis2MessageContext)
msgCtx).getAxis2MessageContext().getTransportIn().getParameter("port").getValue();
protocol --> ((Axis2MessageContext)
msgCtx).getAxis2MessageContext().getTransportIn().getName();

Host retrieval is a bit difficult, and if this can not be achieved by the
URLRewrite mediator we can provide these information from the transport as a
property inside the message context.

Thanks,
Ruwan

On Mon, Mar 17, 2008 at 9:33 PM, Paul Fremantle <pz...@gmail.com> wrote:

> Laurent
>
> You don't need to use WS-Addressing to use the Rewrite mediator. In
> the absence of WS-A, the "To" property is the suffix of URL of the
> incoming request:
>
> eg.
> to = "/soap/services/MyProxy"
>
> Paul
>
> On Mon, Mar 17, 2008 at 2:56 PM, Laurent CHARTIER
> <ex...@agora.msa.fr> wrote:
> > Hi Ruwan,
> >  You're right. I don't have any addressing informations in the requests!
> >  And so I think the URLRewriter mediator on the esbsite.org can't help
> me.
> >  Moreover I have to keep the part after the host and the port (I musn't
> >  replace the entire URL).
> >  So I'd like to create a mediator to update one part of the target URL
> of the
> >  message.
> >
> >  Please tell me how to get these informations!
> >
> >  Thanks a lot,
> >  Laurent.
> >
> >  -----Message d'origine-----
> >
> > De : Ruwan Linton [mailto:ruwan.linton@gmail.com]
> >  Envoyé : lundi 17 mars 2008 14:33
> >
> > À : user@synapse.apache.org
> >  Objet : Re: RE : Generic Proxy
> >
> >
> >
> >
> >  Hi Laurent,
> >
> >  Let me help you on this... :)
> >
> >  Have you had a look at the URL Rewrite mediator in the esbsite.org? In
> >  general unless you send a message with addressing headers the To URL
> refers
> >  to the part after the synapse server URL.... You don't want to use
> >  addressing in the request right?
> >
> >  If all the above questions does not help you to get this done please
> let me
> >  know, so that I will tell you how to get the information that you
> require
> >  inside a custom mediator that you are going to write or if these
> information
> >  cannot be retrieved from the message context we must add those
> information
> >  to the message context.
> >
> >  Thanks,
> >  Ruwan
> >
> >  On Mon, Mar 17, 2008 at 4:18 PM, Laurent CHARTIER <
> >  ext_chartier.laurent@agora.msa.fr> wrote:
> >
> >  > I was wrong...
> >  > I don't need a proxy, but an URL rewriter.
> >  > The target of my client is Synapse and Synapse have to rewrite the
> URL
> >  > to aim the real services. I'm writing a mediator to do this, but the
> >  > "To" information in the message context doesn't contains the
> protocol,
> >  > the host and the port. How can I know the original protocol, host and
> >  > port?
> >  >
> >  > Thank you.
> >  >
> >  >
> >  > -----Message d'origine-----
> >  > De : Paul Fremantle [mailto:pzfreo@gmail.com]
> >  > Envoyé : vendredi 14 mars 2008 19:13
> >  > À : user@synapse.apache.org
> >  > Objet : Re: Generic Proxy
> >  >
> >  >
> >  > Laurent
> >  >
> >  > The other option is that Synapse acts as a HTTP Proxy. If you have
> >  > Synapse running on 8080 and you set that as the proxy for your HTTP
> >  > client, the message will be passed to the main mediation with the
> >  > correct endpoint automatically. No rewriting necessary, because the
> >  > correct endpoint is specified by the client.
> >  >
> >  > Paul
> >  >
> >  > 2008/2/20 Laurent CHARTIER <ex...@agora.msa.fr>:
> >  > > Hi all,
> >  > >  I'm interested in a generic proxy.
> >  > >  My needs are to mediate the message (in order to log some
> >  > > informations) and  then to route to another server.  It seems that
> I
> >  > > must declare one proxy for each service in the synapse
> >  > > configuration.  Is there a way to declare just one proxy to only
> >  > > switch the host and
> >  > not
> >  > the
> >  > >  path?
> >  > >
> >  > >  Thanks,
> >  > >  Laurent CHARTIER
> >  > >  MiddleWare - Pôle Gestion des flux
> >  > >  AGORA Montauban - Tél. :05.63.68.46.24
> >  > >  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.
> >  > >
> >  > >
> >  > >
> >  >
> >  >
> >  >
> >  > --
> >  > Paul Fremantle
> >  > Co-Founder and VP of Technical Sales, WSO2
> >  > Apache Synapse PMC Chair
> >  > OASIS WS-RX TC Co-chair
> >  >
> >  > blog: http://pzf.fremantle.org
> >  > paul@wso2.com
> >  >
> >  > "Oxygenating the Web Service Platform", www.wso2.com
> >  >
> >  >
> >  >
> >  >
> >  > 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.
> >  >
> >  >
> >  >
> >
> >
> >  --
> >  Ruwan Linton
> >  http://www.wso2.org - "Oxygenating the Web Services Platform"
> >
> >
> >
> >
> >  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.
> >
> >
> >
>
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> Apache Synapse PMC Chair
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>



-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

Re: RE : RE : Generic Proxy

Posted by Paul Fremantle <pz...@gmail.com>.
Laurent

You don't need to use WS-Addressing to use the Rewrite mediator. In
the absence of WS-A, the "To" property is the suffix of URL of the
incoming request:

eg.
to = "/soap/services/MyProxy"

Paul

On Mon, Mar 17, 2008 at 2:56 PM, Laurent CHARTIER
<ex...@agora.msa.fr> wrote:
> Hi Ruwan,
>  You're right. I don't have any addressing informations in the requests!
>  And so I think the URLRewriter mediator on the esbsite.org can't help me.
>  Moreover I have to keep the part after the host and the port (I musn't
>  replace the entire URL).
>  So I'd like to create a mediator to update one part of the target URL of the
>  message.
>
>  Please tell me how to get these informations!
>
>  Thanks a lot,
>  Laurent.
>
>  -----Message d'origine-----
>
> De : Ruwan Linton [mailto:ruwan.linton@gmail.com]
>  Envoyé : lundi 17 mars 2008 14:33
>
> À : user@synapse.apache.org
>  Objet : Re: RE : Generic Proxy
>
>
>
>
>  Hi Laurent,
>
>  Let me help you on this... :)
>
>  Have you had a look at the URL Rewrite mediator in the esbsite.org? In
>  general unless you send a message with addressing headers the To URL refers
>  to the part after the synapse server URL.... You don't want to use
>  addressing in the request right?
>
>  If all the above questions does not help you to get this done please let me
>  know, so that I will tell you how to get the information that you require
>  inside a custom mediator that you are going to write or if these information
>  cannot be retrieved from the message context we must add those information
>  to the message context.
>
>  Thanks,
>  Ruwan
>
>  On Mon, Mar 17, 2008 at 4:18 PM, Laurent CHARTIER <
>  ext_chartier.laurent@agora.msa.fr> wrote:
>
>  > I was wrong...
>  > I don't need a proxy, but an URL rewriter.
>  > The target of my client is Synapse and Synapse have to rewrite the URL
>  > to aim the real services. I'm writing a mediator to do this, but the
>  > "To" information in the message context doesn't contains the protocol,
>  > the host and the port. How can I know the original protocol, host and
>  > port?
>  >
>  > Thank you.
>  >
>  >
>  > -----Message d'origine-----
>  > De : Paul Fremantle [mailto:pzfreo@gmail.com]
>  > Envoyé : vendredi 14 mars 2008 19:13
>  > À : user@synapse.apache.org
>  > Objet : Re: Generic Proxy
>  >
>  >
>  > Laurent
>  >
>  > The other option is that Synapse acts as a HTTP Proxy. If you have
>  > Synapse running on 8080 and you set that as the proxy for your HTTP
>  > client, the message will be passed to the main mediation with the
>  > correct endpoint automatically. No rewriting necessary, because the
>  > correct endpoint is specified by the client.
>  >
>  > Paul
>  >
>  > 2008/2/20 Laurent CHARTIER <ex...@agora.msa.fr>:
>  > > Hi all,
>  > >  I'm interested in a generic proxy.
>  > >  My needs are to mediate the message (in order to log some
>  > > informations) and  then to route to another server.  It seems that I
>  > > must declare one proxy for each service in the synapse
>  > > configuration.  Is there a way to declare just one proxy to only
>  > > switch the host and
>  > not
>  > the
>  > >  path?
>  > >
>  > >  Thanks,
>  > >  Laurent CHARTIER
>  > >  MiddleWare - Pôle Gestion des flux
>  > >  AGORA Montauban - Tél. :05.63.68.46.24
>  > >  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.
>  > >
>  > >
>  > >
>  >
>  >
>  >
>  > --
>  > Paul Fremantle
>  > Co-Founder and VP of Technical Sales, WSO2
>  > Apache Synapse PMC Chair
>  > OASIS WS-RX TC Co-chair
>  >
>  > blog: http://pzf.fremantle.org
>  > paul@wso2.com
>  >
>  > "Oxygenating the Web Service Platform", www.wso2.com
>  >
>  >
>  >
>  >
>  > 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.
>  >
>  >
>  >
>
>
>  --
>  Ruwan Linton
>  http://www.wso2.org - "Oxygenating the Web Services Platform"
>
>
>
>
>  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.
>
>
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

RE : RE : Generic Proxy

Posted by Laurent CHARTIER <ex...@agora.msa.fr>.
Hi Ruwan,
You're right. I don't have any addressing informations in the requests!
And so I think the URLRewriter mediator on the esbsite.org can't help me.
Moreover I have to keep the part after the host and the port (I musn't
replace the entire URL).
So I'd like to create a mediator to update one part of the target URL of the
message.

Please tell me how to get these informations!

Thanks a lot,
Laurent.

-----Message d'origine-----
De : Ruwan Linton [mailto:ruwan.linton@gmail.com] 
Envoyé : lundi 17 mars 2008 14:33
À : user@synapse.apache.org
Objet : Re: RE : Generic Proxy


Hi Laurent,

Let me help you on this... :)

Have you had a look at the URL Rewrite mediator in the esbsite.org? In
general unless you send a message with addressing headers the To URL refers
to the part after the synapse server URL.... You don't want to use
addressing in the request right?

If all the above questions does not help you to get this done please let me
know, so that I will tell you how to get the information that you require
inside a custom mediator that you are going to write or if these information
cannot be retrieved from the message context we must add those information
to the message context.

Thanks,
Ruwan

On Mon, Mar 17, 2008 at 4:18 PM, Laurent CHARTIER <
ext_chartier.laurent@agora.msa.fr> wrote:

> I was wrong...
> I don't need a proxy, but an URL rewriter.
> The target of my client is Synapse and Synapse have to rewrite the URL 
> to aim the real services. I'm writing a mediator to do this, but the 
> "To" information in the message context doesn't contains the protocol, 
> the host and the port. How can I know the original protocol, host and 
> port?
>
> Thank you.
>
>
> -----Message d'origine-----
> De : Paul Fremantle [mailto:pzfreo@gmail.com]
> Envoyé : vendredi 14 mars 2008 19:13
> À : user@synapse.apache.org
> Objet : Re: Generic Proxy
>
>
> Laurent
>
> The other option is that Synapse acts as a HTTP Proxy. If you have 
> Synapse running on 8080 and you set that as the proxy for your HTTP 
> client, the message will be passed to the main mediation with the 
> correct endpoint automatically. No rewriting necessary, because the 
> correct endpoint is specified by the client.
>
> Paul
>
> 2008/2/20 Laurent CHARTIER <ex...@agora.msa.fr>:
> > Hi all,
> >  I'm interested in a generic proxy.
> >  My needs are to mediate the message (in order to log some
> > informations) and  then to route to another server.  It seems that I 
> > must declare one proxy for each service in the synapse  
> > configuration.  Is there a way to declare just one proxy to only 
> > switch the host and
> not
> the
> >  path?
> >
> >  Thanks,
> >  Laurent CHARTIER
> >  MiddleWare - Pôle Gestion des flux
> >  AGORA Montauban - Tél. :05.63.68.46.24
> >  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.
> >
> >
> >
>
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> Apache Synapse PMC Chair
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
>
>
> 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.
>
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"




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.



Re: RE : Generic Proxy

Posted by Ruwan Linton <ru...@gmail.com>.
Hi Laurent,

Let me help you on this... :)

Have you had a look at the URL Rewrite mediator in the esbsite.org? In
general unless you send a message with addressing headers the To URL refers
to the part after the synapse server URL.... You don't want to use
addressing in the request right?

If all the above questions does not help you to get this done please let me
know, so that I will tell you how to get the information that you require
inside a custom mediator that you are going to write or if these information
cannot be retrieved from the message context we must add those information
to the message context.

Thanks,
Ruwan

On Mon, Mar 17, 2008 at 4:18 PM, Laurent CHARTIER <
ext_chartier.laurent@agora.msa.fr> wrote:

> I was wrong...
> I don't need a proxy, but an URL rewriter.
> The target of my client is Synapse and Synapse have to rewrite the URL to
> aim the real services.
> I'm writing a mediator to do this, but the "To" information in the message
> context doesn't contains the protocol, the host and the port.
> How can I know the original protocol, host and port?
>
> Thank you.
>
>
> -----Message d'origine-----
> De : Paul Fremantle [mailto:pzfreo@gmail.com]
> Envoyé : vendredi 14 mars 2008 19:13
> À : user@synapse.apache.org
> Objet : Re: Generic Proxy
>
>
> Laurent
>
> The other option is that Synapse acts as a HTTP Proxy. If you have Synapse
> running on 8080 and you set that as the proxy for your HTTP client, the
> message will be passed to the main mediation with the correct endpoint
> automatically. No rewriting necessary, because the correct endpoint is
> specified by the client.
>
> Paul
>
> 2008/2/20 Laurent CHARTIER <ex...@agora.msa.fr>:
> > Hi all,
> >  I'm interested in a generic proxy.
> >  My needs are to mediate the message (in order to log some
> > informations) and  then to route to another server.  It seems that I
> > must declare one proxy for each service in the synapse  configuration.
> >  Is there a way to declare just one proxy to only switch the host and
> not
> the
> >  path?
> >
> >  Thanks,
> >  Laurent CHARTIER
> >  MiddleWare - Pôle Gestion des flux
> >  AGORA Montauban - Tél. :05.63.68.46.24
> >  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.
> >
> >
> >
>
>
>
> --
> Paul Fremantle
> Co-Founder and VP of Technical Sales, WSO2
> Apache Synapse PMC Chair
> OASIS WS-RX TC Co-chair
>
> blog: http://pzf.fremantle.org
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
>
>
> 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.
>
>
>


-- 
Ruwan Linton
http://www.wso2.org - "Oxygenating the Web Services Platform"

RE : Generic Proxy

Posted by Laurent CHARTIER <ex...@agora.msa.fr>.
I was wrong...
I don't need a proxy, but an URL rewriter.
The target of my client is Synapse and Synapse have to rewrite the URL to
aim the real services.
I'm writing a mediator to do this, but the "To" information in the message
context doesn't contains the protocol, the host and the port.
How can I know the original protocol, host and port?

Thank you.


-----Message d'origine-----
De : Paul Fremantle [mailto:pzfreo@gmail.com] 
Envoyé : vendredi 14 mars 2008 19:13
À : user@synapse.apache.org
Objet : Re: Generic Proxy


Laurent

The other option is that Synapse acts as a HTTP Proxy. If you have Synapse
running on 8080 and you set that as the proxy for your HTTP client, the
message will be passed to the main mediation with the correct endpoint
automatically. No rewriting necessary, because the correct endpoint is
specified by the client.

Paul

2008/2/20 Laurent CHARTIER <ex...@agora.msa.fr>:
> Hi all,
>  I'm interested in a generic proxy.
>  My needs are to mediate the message (in order to log some 
> informations) and  then to route to another server.  It seems that I 
> must declare one proxy for each service in the synapse  configuration.
>  Is there a way to declare just one proxy to only switch the host and not
the
>  path?
>
>  Thanks,
>  Laurent CHARTIER
>  MiddleWare - Pôle Gestion des flux
>  AGORA Montauban - Tél. :05.63.68.46.24
>  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.
>
>
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com




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.



Re: Generic Proxy

Posted by Paul Fremantle <pz...@gmail.com>.
Laurent

The other option is that Synapse acts as a HTTP Proxy. If you have
Synapse running on 8080 and you set that as the proxy for your HTTP
client, the message will be passed to the main mediation with the
correct endpoint automatically. No rewriting necessary, because the
correct endpoint is specified by the client.

Paul

2008/2/20 Laurent CHARTIER <ex...@agora.msa.fr>:
> Hi all,
>  I'm interested in a generic proxy.
>  My needs are to mediate the message (in order to log some informations) and
>  then to route to another server.
>  It seems that I must declare one proxy for each service in the synapse
>  configuration.
>  Is there a way to declare just one proxy to only switch the host and not the
>  path?
>
>  Thanks,
>  Laurent CHARTIER
>  MiddleWare - Pôle Gestion des flux
>  AGORA Montauban - Tél. :05.63.68.46.24
>  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.
>
>
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com