synapse-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ruwan Linton" <ruwan.lin...@gmail.com>
Subject Re: RE : RE : Generic Proxy
Date Mon, 17 Mar 2008 17:16:36 GMT
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 <pzfreo@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
> <ext_chartier.laurent@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 <ext_chartier.laurent@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"

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message