You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@synapse.apache.org by Saminda Abeyruwan <sa...@gmail.com> on 2006/02/28 06:10:28 UTC

Re: get(String url) issues for getting external resources

On 2/27/06, Soumadeep <so...@infravio.com> wrote:
>
> Hi all,
>
> To fetch external resources using Axis2SynapseEnvironment's get(String
> url)
> wouldn't suffice I think. For secured resources we might have to send the
> 1)
> username/password http token or 2)WS Sec token or maybe 3) certificates or
> 4) we might also have to deal with enc/decryption.


+1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
uses HttpClient from commons-httpclient and it provides full support for
HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
to introduce authentication details we may need to insert  a bean into
SynapseEnvironment.get(String) and we may have to change the signature as
SynapseEnvironment.get(String url, Object authentication). This will allow
to get authentication details from run time.

More importantly, there might be a situation where the resource could be
> located in LDAP,Database or a file System.


Yes.  We need to figure this out. IMHO this is can be considered as multiple
issues.

How do we handle situations where a parameter could be required by the
> resource server apart from what I have mentioned above? (HTTP GET maybe
> the
> only way out) but then there should be a way to configure what type of
> resource server it is and what details are required.


REST like invocation is the most simple yet the powerful way of  getting
resources out a  repository.  So the  current implementation of
SynapseEnviroment.get(String) would defiantly do that. We can integrate a
very powerful lookup for this resources, if we uses Axis2's ServiceClient
(Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
this, we need to populate a Object and fill the right information.

IMHO, i guess commons-httpclient addresses most of  the problems  with
regular and ssl connection.

Thank you

Saminda

Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html


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

Re: get(String url) issues for getting external resources

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Agreed ... my mistake .... this is a change that  we all have already agreed
on _already_.

Will commit the code

Saminda

On 3/22/06, Eran Chinthaka <ch...@opensource.lk> wrote:
>
> Hi all,
>
> First may I know the reason behind Saminda sending a patch, rather than
> directly committing the code to the svn head ? Any specific reason ?
>
> Let me give you a hint on Apache style.
> Committers have earned their committership through meritocracy.  So why
> does a committer wait for the community to review his code ? The normal
> and the obvious way is that committers commit code directly and we
> expect the committer to be disciplined in doing so, and which has been
> the case in *all* the projects *all* the time in Apache.  He must be
> self disciplined to send code with comply with the discussion went on
> the community so far.
>
> If the community is not happy with what some one has committed, they can
> revert it.
>
> Going with the above rules, Saminda please go ahead and commit the code,
> since you have implemented something Synapse community has agreed. Then
> community can review it, if required.
>
> -- Chinthaka
>
>
> Soumadeep wrote:
> >
> > Saminda,
> >
> >
> >
> > Going forward please put all new code in the scratch area!! The
> > community needs to first see what the code is all about before we do
> > anything with it.
> >
> > Can you please put your code in the scratch are now, so that everyone
> > can check it.
> >
> >
> >
> > Thanks
> >
> > Soumadeep
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>

Re: get(String url) issues for getting external resources

Posted by Davanum Srinivas <da...@gmail.com>.
+1 that's what makes Apache strong, everyone voices their
opinion/views and we figure out a way to co-exist/cooperate :)

-- dims

On 3/22/06, Soumadeep <so...@infravio.com> wrote:
> I think you can at least give me a +1 for being an argumentative individual
> :)
>
> -----Original Message-----
> From: Sanjiva Weerawarana [mailto:sanjiva@opensource.lk]
> Sent: Wednesday, March 22, 2006 5:05 PM
> To: synapse-dev@ws.apache.org
> Cc: chinthaka@opensource.lk
> Subject: Re: get(String url) issues for getting external resources
>
> On Wed, 2006-03-22 at 17:21 +0600, Sanjiva Weerawarana wrote:
> > +1. Soumadeep, if a committer commits some code someone else doesn't
> > like, then its always possible to change the code. Usually that happens
> > after discussion however - that is, one doesn't go and revert someone
> > else's commit willy nilly (obviously).
> >
> > A good example- Dims
>
> Oops forgot to finish the sentence!
>
> Dims committed a change to Axis2 once (I forget the details .. it was
> the default value for an option) that I felt was the opposite of what it
> should be. I of course could've committed the reverse but instead we had
> a discussion on the mailing list. IIRC I didn't win the battle but you
> see how its spsed to work.
>
> The basic model is trust committers and argue hard if you disagree with
> something some other committer does. We know we can all argue
> hard ;-) .. if not we will never become good open source programmers!
>
> Sanjiva.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


--
Davanum Srinivas : http://wso2.com/blogs/

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


Re: get(String url) issues for getting external resources

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

Please go ahead and commit

Paul

On 3/22/06, Soumadeep <so...@infravio.com> wrote:
>
> I think you can at least give me a +1 for being an argumentative
> individual
> :)
>
> -----Original Message-----
> From: Sanjiva Weerawarana [mailto:sanjiva@opensource.lk]
> Sent: Wednesday, March 22, 2006 5:05 PM
> To: synapse-dev@ws.apache.org
> Cc: chinthaka@opensource.lk
> Subject: Re: get(String url) issues for getting external resources
>
> On Wed, 2006-03-22 at 17:21 +0600, Sanjiva Weerawarana wrote:
> > +1. Soumadeep, if a committer commits some code someone else doesn't
> > like, then its always possible to change the code. Usually that happens
> > after discussion however - that is, one doesn't go and revert someone
> > else's commit willy nilly (obviously).
> >
> > A good example- Dims
>
> Oops forgot to finish the sentence!
>
> Dims committed a change to Axis2 once (I forget the details .. it was
> the default value for an option) that I felt was the opposite of what it
> should be. I of course could've committed the reverse but instead we had
> a discussion on the mailing list. IIRC I didn't win the battle but you
> see how its spsed to work.
>
> The basic model is trust committers and argue hard if you disagree with
> something some other committer does. We know we can all argue
> hard ;-) .. if not we will never become good open source programmers!
>
> Sanjiva.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

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

RE: get(String url) issues for getting external resources

Posted by Soumadeep <so...@infravio.com>.
I think you can at least give me a +1 for being an argumentative individual
:)

-----Original Message-----
From: Sanjiva Weerawarana [mailto:sanjiva@opensource.lk]
Sent: Wednesday, March 22, 2006 5:05 PM
To: synapse-dev@ws.apache.org
Cc: chinthaka@opensource.lk
Subject: Re: get(String url) issues for getting external resources

On Wed, 2006-03-22 at 17:21 +0600, Sanjiva Weerawarana wrote:
> +1. Soumadeep, if a committer commits some code someone else doesn't
> like, then its always possible to change the code. Usually that happens
> after discussion however - that is, one doesn't go and revert someone
> else's commit willy nilly (obviously).
>
> A good example- Dims

Oops forgot to finish the sentence!

Dims committed a change to Axis2 once (I forget the details .. it was
the default value for an option) that I felt was the opposite of what it
should be. I of course could've committed the reverse but instead we had
a discussion on the mailing list. IIRC I didn't win the battle but you
see how its spsed to work.

The basic model is trust committers and argue hard if you disagree with
something some other committer does. We know we can all argue
hard ;-) .. if not we will never become good open source programmers!

Sanjiva.


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



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


Re: get(String url) issues for getting external resources

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Wed, 2006-03-22 at 17:21 +0600, Sanjiva Weerawarana wrote:
> +1. Soumadeep, if a committer commits some code someone else doesn't
> like, then its always possible to change the code. Usually that happens
> after discussion however - that is, one doesn't go and revert someone
> else's commit willy nilly (obviously).
> 
> A good example- Dims 

Oops forgot to finish the sentence!

Dims committed a change to Axis2 once (I forget the details .. it was
the default value for an option) that I felt was the opposite of what it
should be. I of course could've committed the reverse but instead we had
a discussion on the mailing list. IIRC I didn't win the battle but you
see how its spsed to work.

The basic model is trust committers and argue hard if you disagree with
something some other committer does. We know we can all argue
hard ;-) .. if not we will never become good open source programmers!

Sanjiva.


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


Re: get(String url) issues for getting external resources

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
+1. Soumadeep, if a committer commits some code someone else doesn't
like, then its always possible to change the code. Usually that happens
after discussion however - that is, one doesn't go and revert someone
else's commit willy nilly (obviously).

A good example- Dims 

Sanjiva.

On Wed, 2006-03-22 at 16:42 +0600, Eran Chinthaka wrote:
> Hi all,
> 
> First may I know the reason behind Saminda sending a patch, rather than 
> directly committing the code to the svn head ? Any specific reason ?
> 
> Let me give you a hint on Apache style.
> Committers have earned their committership through meritocracy.  So why 
> does a committer wait for the community to review his code ? The normal 
> and the obvious way is that committers commit code directly and we 
> expect the committer to be disciplined in doing so, and which has been 
> the case in *all* the projects *all* the time in Apache.  He must be 
> self disciplined to send code with comply with the discussion went on 
> the community so far.
> 
> If the community is not happy with what some one has committed, they can 
> revert it.
> 
> Going with the above rules, Saminda please go ahead and commit the code, 
> since you have implemented something Synapse community has agreed. Then 
> community can review it, if required.
> 
> -- Chinthaka
> 
> 
> Soumadeep wrote:
> >
> > Saminda,
> >
> >  
> >
> > Going forward please put all new code in the scratch area!! The 
> > community needs to first see what the code is all about before we do 
> > anything with it.
> >
> > Can you please put your code in the scratch are now, so that everyone 
> > can check it.
> >
> >  
> >
> > Thanks
> >
> > Soumadeep
> >
> >  
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
> 


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


Re: get(String url) issues for getting external resources

Posted by Eran Chinthaka <ch...@opensource.lk>.
Hi all,

First may I know the reason behind Saminda sending a patch, rather than 
directly committing the code to the svn head ? Any specific reason ?

Let me give you a hint on Apache style.
Committers have earned their committership through meritocracy.  So why 
does a committer wait for the community to review his code ? The normal 
and the obvious way is that committers commit code directly and we 
expect the committer to be disciplined in doing so, and which has been 
the case in *all* the projects *all* the time in Apache.  He must be 
self disciplined to send code with comply with the discussion went on 
the community so far.

If the community is not happy with what some one has committed, they can 
revert it.

Going with the above rules, Saminda please go ahead and commit the code, 
since you have implemented something Synapse community has agreed. Then 
community can review it, if required.

-- Chinthaka


Soumadeep wrote:
>
> Saminda,
>
>  
>
> Going forward please put all new code in the scratch area!! The 
> community needs to first see what the code is all about before we do 
> anything with it.
>
> Can you please put your code in the scratch are now, so that everyone 
> can check it.
>
>  
>
> Thanks
>
> Soumadeep
>
>  
>


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


RE: get(String url) issues for getting external resources

Posted by Soumadeep <so...@infravio.com>.
Saminda,

Going forward please put all new code in the scratch area!! The community
needs to first see what the code is all about before we do anything with it.
Can you please put your code in the scratch are now, so that everyone can
check it.

Thanks
Soumadeep

-----Original Message-----
From: Saminda Abeyruwan [mailto:samindaa@gmail.com]
Sent: Wednesday, March 22, 2006 3:47 PM
To: synapse-dev@ws.apache.org
Subject: Re: get(String url) issues for getting external resources

Apply the patch on your sandbox and try it out. Apply it to core.
On 3/22/06, Soumadeep < soumadeep@infravio.com
<ma...@infravio.com> > wrote:
Have you put it in the scratch area or are you sharing this code from your
dev box??

-----Original Message-----
From: Saminda Abeyruwan [mailto: samindaa@gmail.com
<ma...@gmail.com> ]
Sent: Wednesday, March 22, 2006 11:50 AM
To: synapse-dev@ws.apache.org <ma...@ws.apache.org>
Cc: pzfreo@gmail.com <ma...@gmail.com>
Subject: Re: get(String url) issues for getting external resources

Hello fellow developers,

I've tried to implement on resource handling framework that Paul has
proposed earlier. This framework will going to have a big  impact on
security and rm mediator setup. I have attached the patch herewith for your
review. Please try to play with it and let your concern on the list.

I have attached a test case and a sample ResourceHandler with the notion of
REST to demonstrate the code base.

Thank you

Saminda
On 3/2/06, Saminda Abeyruwan < samindaa@gmail.com
<ma...@gmail.com> > wrote:

On 3/1/06, Paul Fremantle < pzfreo@gmail.com <ma...@gmail.com> >
wrote:
Saminda

I don't understand the scenario. I would say that was a misconfig and I
would expect an exception to be thrown when registering the second RH with
the same URI root.

Paul

So there is a one-to-one mapping between RH and uri-root. So the
implementation is much more simpler. I got it. Thanks Paul.

Saminda

On 3/1/06, Saminda Abeyruwan < samindaa@gmail.com
<ma...@gmail.com> > wrote:

Hi Paul,

I just need to clarify the following small matter.

i hope following scenario is valid. :-)

Assume, we have following synapse.xml for an example
...
<resource type="o.a.s.resources.HttpResource" uri-root="
http://fremantle.org/resources/ <http://fremantle.org/resources/> ">
   <property name="http.username">paul</property>
   <property name="http.password">pass</property>
   <property name=" http.proxy">proxy:80</property>
</resource>
<resource type="o.a.s.resources.DatabaseResources" uri-root="
http://fremantle.org/resources/ <http://fremantle.org/resources/> ">
   <property/>[1..n]
</resource>
...
so a mediator can register two resources handlers with the same uri-root.
Mediator can nicely say,

OMElement ele = se.getResourceHelper().get(some uri); to get  resources.
But mediator has registered two resources helpers initially, and mediator
just need have database connection for this time. As i can see there is no
way mediator author can instruct this to ResourceHelper.

Please be kind enough to explain prior.

Thank you

Saminda

On 3/1/06, Paul Fremantle < pzfreo@gmail.com <ma...@gmail.com> >
wrote:
How about this implementation of what you are describing.

1) Lets indirect this out of SynEnv:

SynapseEnvironment {
    ResourceHelper getResourceHelper();
}

public interface ResourceHelper {
    OMElement get(String uri); // get a resource
    OMElement get(String uri, ResourceUpdateAware mediator); // get a
resource and be notified of changes
    void registerResourceHandler(ResourceHandler rh, String urlRoot);
         // register a handler for a given set of URLs (which share the same
root)
    void notifyUpdate(String uriRoot);
         // a resource handler uses this to notify that all resources with
that root have changed (Resource Push model)
}

public interface ResourceHandler {
    OMElement get(String uri);

    void setProperty(String name, String value);
    String getProperty(String name);
    String[] getPropertyNames();

    boolean isUpdated(String uriRoot); // used to poll if resource has
changed (Pull model)
}

<synapse.xml>

<resource type="o.a.s.resources.HttpResource" uri-root="
http://fremantle.org/resources/ <http://fremantle.org/resources/> ">
   <property name="http.username">paul</property>
   <property name="http.password">pass</property>
   <property name=" http.proxy">proxy:80</property>
</resource>

Paul



On 3/1/06, Soumadeep < soumadeep@infravio.com
<ma...@infravio.com> > wrote:
Paul is right, instead of passing an object we could have property files
which will have the connection related data. Further, we can generalize the
way the get method is implemented, what I mean is we can have an interface
like ResourceHandler so that others can implement it as required ...
something like LDAPResourceHandler implements ResourceHandler which will
have a get method and depending on what was configured the resource will be
fetched.

We can put the property values in Synapse.xml, so you might end up having
multiple resource endpoints with property sets required for making a
connection, though we need to think about whether to provide the flexibility
in terms of mediators being able to call different ResourceHandlers for a
session.

-Soumadeep
-----Original Message-----
From: Paul Fremantle [mailto: pzfreo@gmail.com <ma...@gmail.com> ]
Sent: Tuesday, February 28, 2006 5:59 PM
To: synapse-dev@ws.apache.org <ma...@ws.apache.org>
Subject: Re: get(String url) issues for getting external resources
I think we should try to separate out the connection properties associated
with a URI and the mediators knowledge. So in other words lets try to
configure the mediator with the URI and the SynapseEnv with the
certs/uids/proxies, etc.

Paul
On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com
<ma...@gmail.com> > wrote:
Hi Devs,

I have written a document on "how to configure mediators get resources via
SSL connection".  This will address how to acquire resources from Axis2
repository which is deployed on Tomcat.

Thank you

Saminda

On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com
<ma...@gmail.com> > wrote:
On 2/27/06, Soumadeep < soumadeep@infravio.com
<ma...@infravio.com> > wrote:
Hi all,

To fetch external resources using Axis2SynapseEnvironment's get(String url)
wouldn't suffice I think. For secured resources we might have to send the 1)
username/password http token or 2)WS Sec token or maybe 3) certificates or
4) we might also have to deal with enc/decryption.

+1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
uses HttpClient from commons-httpclient and it provides full support for
HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
to introduce authentication details we may need to insert  a bean into
SynapseEnvironment.get(String) and we may have to change the signature as
SynapseEnvironment.get(String url, Object authentication). This will allow
to get authentication details from run time.
More importantly, there might be a situation where the resource could be
located in LDAP,Database or a file System.

Yes.  We need to figure this out. IMHO this is can be considered as multiple
issues.

How do we handle situations where a parameter could be required by the
resource server apart from what I have mentioned above? (HTTP GET maybe the
only way out) but then there should be a way to configure what type of
resource server it is and what details are required.

REST like invocation is the most simple yet the powerful way of  getting
resources out a  repository.  So the  current implementation of
SynapseEnviroment.get(String) would defiantly do that. We can integrate a
very powerful lookup for this resources, if we uses Axis2's ServiceClient
(Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
this, we need to populate a Object and fill the right information.

IMHO, i guess commons-httpclient addresses most of  the problems  with
regular and ssl connection.

Thank you

Saminda

Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html




---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
<ma...@ws.apache.org>
For additional commands, e-mail: synapse-dev-help@ws.apache.org
<ma...@ws.apache.org>



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
<ma...@ws.apache.org>
For additional commands, e-mail: synapse-dev-help@ws.apache.org
<ma...@ws.apache.org>






--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com <ma...@wso2.com>

"Oxygenating the Web Service Platform", www.wso2.com <http://www.wso2.com>



--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com <ma...@wso2.com>

"Oxygenating the Web Service Platform", www.wso2.com <http://www.wso2.com>





--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com <ma...@wso2.com>

"Oxygenating the Web Service Platform", www.wso2.com <http://www.wso2.com>




Re: get(String url) issues for getting external resources

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Apply the patch on your sandbox and try it out. Apply it to core.

On 3/22/06, Soumadeep <so...@infravio.com> wrote:
>
>  Have you put it in the scratch area or are you sharing this code from
> your dev box??
>
>
>
> -----Original Message-----
> *From:* Saminda Abeyruwan [mailto:samindaa@gmail.com]
> *Sent:* Wednesday, March 22, 2006 11:50 AM
> *To:* synapse-dev@ws.apache.org
> *Cc:* pzfreo@gmail.com
> *Subject:* Re: get(String url) issues for getting external resources
>
>
>
> Hello fellow developers,
>
> I've tried to implement on resource handling framework that Paul has
> proposed earlier. This framework will going to have a big  impact on
> security and rm mediator setup. I have attached the patch herewith for your
> review. Please try to play with it and let your concern on the list.
>
> I have attached a test case and a sample ResourceHandler with the notion
> of REST to demonstrate the code base.
>
> Thank you
>
> Saminda
>
> On 3/2/06, *Saminda Abeyruwan* <sa...@gmail.com> wrote:
>
>
>
> On 3/1/06, *Paul Fremantle* < pzfreo@gmail.com> wrote:
>
> Saminda
>
> I don't understand the scenario. I would say that was a misconfig and I
> would expect an exception to be thrown when registering the second RH with
> the same URI root.
>
>
> Paul
>
>
> So there is a one-to-one mapping between RH and uri-root. So the
> implementation is much more simpler. I got it. Thanks Paul.
>
>
> Saminda
>
>
>
> On 3/1/06, *Saminda Abeyruwan* <sa...@gmail.com> wrote:
>
>
> Hi Paul,
>
> I just need to clarify the following small matter.
>
> i hope following scenario is valid. :-)
>
> Assume, we have following synapse.xml for an example
> ...
> <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> ">
>    <property name="http.username">paul</property>
>    <property name="http.password">pass</property>
>    <property name=" http.proxy">proxy:80</property>
> </resource>
> <resource type="o.a.s.resources.DatabaseResources" uri-root="http://fremantle.org/resources/
> ">
>    <property/>[1..n]
> </resource>
> ...
> so a mediator can register two resources handlers with the same uri-root.
> Mediator can nicely say,
>
> OMElement ele = se.getResourceHelper().get(some uri); to get  resources.
> But mediator has registered two resources helpers initially, and mediator
> just need have database connection for this time. As i can see there is no
> way mediator author can instruct this to ResourceHelper.
>
> Please be kind enough to explain prior.
>
> Thank you
>
> Saminda
>
>
>
> On 3/1/06, *Paul Fremantle* <pz...@gmail.com> wrote:
>
> How about this implementation of what you are describing.
>
> 1) Lets indirect this out of SynEnv:
>
> SynapseEnvironment {
>     ResourceHelper getResourceHelper();
> }
>
> public interface ResourceHelper {
>     OMElement get(String uri); // get a resource
>     OMElement get(String uri, ResourceUpdateAware mediator); // get a
> resource and be notified of changes
>     void registerResourceHandler(ResourceHandler rh, String urlRoot);
>          // register a handler for a given set of URLs (which share the
> same root)
>     void notifyUpdate(String uriRoot);
>          // a resource handler uses this to notify that all resources with
> that root have changed (Resource Push model)
> }
>
> public interface ResourceHandler {
>     OMElement get(String uri);
>
>     void setProperty(String name, String value);
>     String getProperty(String name);
>     String[] getPropertyNames();
>
>     boolean isUpdated(String uriRoot); // used to poll if resource has
> changed (Pull model)
> }
>
> <synapse.xml>
>
> <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> ">
>    <property name="http.username">paul</property>
>    <property name="http.password">pass</property>
>    <property name=" http.proxy">proxy:80</property>
> </resource>
>
> Paul
>
>
>
>
>  On 3/1/06, *Soumadeep* < soumadeep@infravio.com> wrote:
>
> Paul is right, instead of passing an object we could have property files
> which will have the connection related data. Further, we can generalize the
> way the get method is implemented, what I mean is we can have an interface
> like ResourceHandler so that others can implement it as required ...
> something like LDAPResourceHandler implements ResourceHandler which will
> have a get method and depending on what was configured the resource will be
> fetched.
>
>
>
> We can put the property values in Synapse.xml, so you might end up having
> multiple resource endpoints with property sets required for making a
> connection, though we need to think about whether to provide the flexibility
> in terms of mediators being able to call different ResourceHandlers for a
> session.
>
>
>
> -Soumadeep
>
> -----Original Message-----
> *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> *Sent:* Tuesday, February 28, 2006 5:59 PM
> *To:* synapse-dev@ws.apache.org
> *Subject:* Re: get(String url) issues for getting external resources
>
> I think we should try to separate out the connection properties associated
> with a URI and the mediators knowledge. So in other words lets try to
> configure the mediator with the URI and the SynapseEnv with the
> certs/uids/proxies, etc.
>
> Paul
>
> On 2/28/06, *Saminda Abeyruwan* <sa...@gmail.com> wrote:
>
> Hi Devs,
>
> I have written a document on "how to configure mediators get resources via
> SSL connection".  This will address how to acquire resources from Axis2
> repository which is deployed on Tomcat.
>
> Thank you
>
> Saminda
>
>
>
> On 2/28/06, *Saminda Abeyruwan* < samindaa@gmail.com> wrote:
>
> On 2/27/06, *Soumadeep* <so...@infravio.com> wrote:
>
> Hi all,
>
> To fetch external resources using Axis2SynapseEnvironment's get(String
> url)
> wouldn't suffice I think. For secured resources we might have to send the
> 1)
> username/password http token or 2)WS Sec token or maybe 3) certificates or
>
> 4) we might also have to deal with enc/decryption.
>
>
> +1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
> uses HttpClient from commons-httpclient and it provides full support for
> HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
> to introduce authentication details we may need to insert  a bean into
> SynapseEnvironment.get(String) and we may have to change the signature as
> SynapseEnvironment.get(String url, Object authentication). This will allow
> to get authentication details from run time.
>
> More importantly, there might be a situation where the resource could be
> located in LDAP,Database or a file System.
>
>
> Yes.  We need to figure this out. IMHO this is can be considered as
> multiple issues.
>
>
>
> How do we handle situations where a parameter could be required by the
> resource server apart from what I have mentioned above? (HTTP GET maybe
> the
> only way out) but then there should be a way to configure what type of
> resource server it is and what details are required.
>
>
> REST like invocation is the most simple yet the powerful way of  getting
> resources out a  repository.  So the  current implementation of
> SynapseEnviroment.get(String) would defiantly do that. We can integrate a
> very powerful lookup for this resources, if we uses Axis2's ServiceClient
> (Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
> this, we need to populate a Object and fill the right information.
>
> IMHO, i guess commons-httpclient addresses most of  the problems  with
> regular and ssl connection.
>
> Thank you
>
> Saminda
>
> *Resources*: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
>
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
>
>
>
>
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
>
>
>

Re: get(String url) issues for getting external resources

Posted by Saminda Abeyruwan <sa...@gmail.com>.
On 3/22/06, Vikas <vi...@infravio.com> wrote:
>
> <Vikas>
>
> :-(
> Did a scratch update, couldn't find the code...
> Don't think its in the core either...
> The attached file has only snippets..
> Was keen to try it out.. Missing all the fun..
>
> Saminda can u share the complete code ???
>

It's a patch. Apply the patch to  your sandbox.

</Vikas>
>
> ----- Original Message -----
> *From:* Soumadeep <so...@infravio.com>
> *To:* synapse-dev@ws.apache.org
> *Cc:* pzfreo@gmail.com
> *Sent:* Wednesday, March 22, 2006 12:38 PM
> *Subject:* RE: get(String url) issues for getting external resources
>
>  Have you put it in the scratch area or are you sharing this code from
> your dev box??
>
>
>
> -----Original Message-----
> *From:* Saminda Abeyruwan [mailto:samindaa@gmail.com]
> *Sent:* Wednesday, March 22, 2006 11:50 AM
> *To:* synapse-dev@ws.apache.org
> *Cc:* pzfreo@gmail.com
> *Subject:* Re: get(String url) issues for getting external resources
>
>
>
> Hello fellow developers,
>
> I've tried to implement on resource handling framework that Paul has
> proposed earlier. This framework will going to have a big  impact on
> security and rm mediator setup. I have attached the patch herewith for your
> review. Please try to play with it and let your concern on the list.
>
> I have attached a test case and a sample ResourceHandler with the notion
> of REST to demonstrate the code base.
>
> Thank you
>
> Saminda
>
> On 3/2/06, *Saminda Abeyruwan* <sa...@gmail.com> wrote:
>
>
>
> On 3/1/06, *Paul Fremantle* < pzfreo@gmail.com> wrote:
>
> Saminda
>
> I don't understand the scenario. I would say that was a misconfig and I
> would expect an exception to be thrown when registering the second RH with
> the same URI root.
>
>
> Paul
>
>
> So there is a one-to-one mapping between RH and uri-root. So the
> implementation is much more simpler. I got it. Thanks Paul.
>
>
> Saminda
>
>
>
> On 3/1/06, *Saminda Abeyruwan* <sa...@gmail.com> wrote:
>
>
> Hi Paul,
>
> I just need to clarify the following small matter.
>
> i hope following scenario is valid. :-)
>
> Assume, we have following synapse.xml for an example
> ...
> <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> ">
>    <property name="http.username">paul</property>
>    <property name="http.password">pass</property>
>    <property name=" http.proxy">proxy:80</property>
> </resource>
> <resource type="o.a.s.resources.DatabaseResources" uri-root="http://fremantle.org/resources/
> ">
>    <property/>[1..n]
> </resource>
> ...
> so a mediator can register two resources handlers with the same uri-root.
> Mediator can nicely say,
>
> OMElement ele = se.getResourceHelper().get(some uri); to get  resources.
> But mediator has registered two resources helpers initially, and mediator
> just need have database connection for this time. As i can see there is no
> way mediator author can instruct this to ResourceHelper.
>
> Please be kind enough to explain prior.
>
> Thank you
>
> Saminda
>
>
>
> On 3/1/06, *Paul Fremantle* <pz...@gmail.com> wrote:
>
> How about this implementation of what you are describing.
>
> 1) Lets indirect this out of SynEnv:
>
> SynapseEnvironment {
>     ResourceHelper getResourceHelper();
> }
>
> public interface ResourceHelper {
>     OMElement get(String uri); // get a resource
>     OMElement get(String uri, ResourceUpdateAware mediator); // get a
> resource and be notified of changes
>     void registerResourceHandler(ResourceHandler rh, String urlRoot);
>          // register a handler for a given set of URLs (which share the
> same root)
>     void notifyUpdate(String uriRoot);
>          // a resource handler uses this to notify that all resources with
> that root have changed (Resource Push model)
> }
>
> public interface ResourceHandler {
>     OMElement get(String uri);
>
>     void setProperty(String name, String value);
>     String getProperty(String name);
>     String[] getPropertyNames();
>
>     boolean isUpdated(String uriRoot); // used to poll if resource has
> changed (Pull model)
> }
>
> <synapse.xml>
>
> <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> ">
>    <property name="http.username">paul</property>
>    <property name="http.password">pass</property>
>    <property name=" http.proxy">proxy:80</property>
> </resource>
>
> Paul
>
>
>
>
> On 3/1/06, *Soumadeep* < soumadeep@infravio.com> wrote:
>
> Paul is right, instead of passing an object we could have property files
> which will have the connection related data. Further, we can generalize the
> way the get method is implemented, what I mean is we can have an interface
> like ResourceHandler so that others can implement it as required ...
> something like LDAPResourceHandler implements ResourceHandler which will
> have a get method and depending on what was configured the resource will be
> fetched.
>
>
>
> We can put the property values in Synapse.xml, so you might end up having
> multiple resource endpoints with property sets required for making a
> connection, though we need to think about whether to provide the flexibility
> in terms of mediators being able to call different ResourceHandlers for a
> session.
>
>
>
> -Soumadeep
>
> -----Original Message-----
> *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> *Sent:* Tuesday, February 28, 2006 5:59 PM
> *To:* synapse-dev@ws.apache.org
> *Subject:* Re: get(String url) issues for getting external resources
>
> I think we should try to separate out the connection properties associated
> with a URI and the mediators knowledge. So in other words lets try to
> configure the mediator with the URI and the SynapseEnv with the
> certs/uids/proxies, etc.
>
> Paul
>
> On 2/28/06, *Saminda Abeyruwan* <sa...@gmail.com> wrote:
>
> Hi Devs,
>
> I have written a document on "how to configure mediators get resources via
> SSL connection".  This will address how to acquire resources from Axis2
> repository which is deployed on Tomcat.
>
> Thank you
>
> Saminda
>
>
>
> On 2/28/06, *Saminda Abeyruwan* < samindaa@gmail.com> wrote:
>
> On 2/27/06, *Soumadeep* <so...@infravio.com> wrote:
>
> Hi all,
>
> To fetch external resources using Axis2SynapseEnvironment's get(String
> url)
> wouldn't suffice I think. For secured resources we might have to send the
> 1)
> username/password http token or 2)WS Sec token or maybe 3) certificates or
>
> 4) we might also have to deal with enc/decryption.
>
>
> +1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
> uses HttpClient from commons-httpclient and it provides full support for
> HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
> to introduce authentication details we may need to insert  a bean into
> SynapseEnvironment.get(String) and we may have to change the signature as
> SynapseEnvironment.get(String url, Object authentication). This will allow
> to get authentication details from run time.
>
> More importantly, there might be a situation where the resource could be
> located in LDAP,Database or a file System.
>
>
> Yes.  We need to figure this out. IMHO this is can be considered as
> multiple issues.
>
>
>
> How do we handle situations where a parameter could be required by the
> resource server apart from what I have mentioned above? (HTTP GET maybe
> the
> only way out) but then there should be a way to configure what type of
> resource server it is and what details are required.
>
>
> REST like invocation is the most simple yet the powerful way of  getting
> resources out a  repository.  So the  current implementation of
> SynapseEnviroment.get(String) would defiantly do that. We can integrate a
> very powerful lookup for this resources, if we uses Axis2's ServiceClient
> (Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
> this, we need to populate a Object and fill the right information.
>
> IMHO, i guess commons-httpclient addresses most of  the problems  with
> regular and ssl connection.
>
> Thank you
>
> Saminda
>
> *Resources*: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
>
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
>
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
>
>
>
>
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>
>
>
>

Re: get(String url) issues for getting external resources

Posted by Vikas <vi...@infravio.com>.
<Vikas>

:-(
Did a scratch update, couldn't find the code...
Don't think its in the core either...
The attached file has only snippets..
Was keen to try it out.. Missing all the fun..

Saminda can u share the complete code ???

</Vikas>
  ----- Original Message ----- 
  From: Soumadeep 
  To: synapse-dev@ws.apache.org 
  Cc: pzfreo@gmail.com 
  Sent: Wednesday, March 22, 2006 12:38 PM
  Subject: RE: get(String url) issues for getting external resources


  Have you put it in the scratch area or are you sharing this code from your dev box?? 

   

  -----Original Message-----
  From: Saminda Abeyruwan [mailto:samindaa@gmail.com]
  Sent: Wednesday, March 22, 2006 11:50 AM
  To: synapse-dev@ws.apache.org
  Cc: pzfreo@gmail.com
  Subject: Re: get(String url) issues for getting external resources

   

  Hello fellow developers,

  I've tried to implement on resource handling framework that Paul has proposed earlier. This framework will going to have a big  impact on security and rm mediator setup. I have attached the patch herewith for your review. Please try to play with it and let your concern on the list. 

  I have attached a test case and a sample ResourceHandler with the notion of REST to demonstrate the code base.

  Thank you

  Saminda 

  On 3/2/06, Saminda Abeyruwan <sa...@gmail.com> wrote:

   

  On 3/1/06, Paul Fremantle < pzfreo@gmail.com> wrote:

  Saminda

  I don't understand the scenario. I would say that was a misconfig and I would expect an exception to be thrown when registering the second RH with the same URI root. 


  Paul


  So there is a one-to-one mapping between RH and uri-root. So the implementation is much more simpler. I got it. Thanks Paul. 


  Saminda 

   

  On 3/1/06, Saminda Abeyruwan <sa...@gmail.com> wrote:


  Hi Paul,

  I just need to clarify the following small matter. 

  i hope following scenario is valid. :-) 

  Assume, we have following synapse.xml for an example
  ...
  <resource type="o.a.s.resources.HttpResource" uri-root=" http://fremantle.org/resources/">
     <property name="http.username">paul</property>
     <property name="http.password">pass</property>
     <property name=" http.proxy">proxy:80</property>
  </resource>
  <resource type="o.a.s.resources.DatabaseResources" uri-root=" http://fremantle.org/resources/">
     <property/>[1..n]  
  </resource>
  ...
  so a mediator can register two resources handlers with the same uri-root. Mediator can nicely say, 

  OMElement ele = se.getResourceHelper().get(some uri); to get  resources.  But mediator has registered two resources helpers initially, and mediator just need have database connection for this time. As i can see there is no way mediator author can instruct this to ResourceHelper. 

  Please be kind enough to explain prior.

  Thank you

  Saminda 



   

  On 3/1/06, Paul Fremantle <pz...@gmail.com> wrote:

  How about this implementation of what you are describing.

  1) Lets indirect this out of SynEnv:

  SynapseEnvironment {
      ResourceHelper getResourceHelper();
  }

  public interface ResourceHelper { 
      OMElement get(String uri); // get a resource
      OMElement get(String uri, ResourceUpdateAware mediator); // get a resource and be notified of changes
      void registerResourceHandler(ResourceHandler rh, String urlRoot); 
           // register a handler for a given set of URLs (which share the same root)
      void notifyUpdate(String uriRoot);
           // a resource handler uses this to notify that all resources with that root have changed (Resource Push model) 
  }

  public interface ResourceHandler {
      OMElement get(String uri);

      void setProperty(String name, String value);
      String getProperty(String name);
      String[] getPropertyNames();

      boolean isUpdated(String uriRoot); // used to poll if resource has changed (Pull model)
  }

  <synapse.xml>

  <resource type="o.a.s.resources.HttpResource" uri-root=" http://fremantle.org/resources/">
     <property name="http.username">paul</property>
     <property name="http.password">pass</property>
     <property name=" http.proxy">proxy:80</property>
  </resource>

  Paul






  On 3/1/06, Soumadeep < soumadeep@infravio.com> wrote:

  Paul is right, instead of passing an object we could have property files which will have the connection related data. Further, we can generalize the way the get method is implemented, what I mean is we can have an interface like ResourceHandler so that others can implement it as required ... something like LDAPResourceHandler implements ResourceHandler which will have a get method and depending on what was configured the resource will be fetched.

   

  We can put the property values in Synapse.xml, so you might end up having multiple resource endpoints with property sets required for making a connection, though we need to think about whether to provide the flexibility in terms of mediators being able to call different ResourceHandlers for a session.

   

  -Soumadeep

  -----Original Message-----
  From: Paul Fremantle [mailto:pzfreo@gmail.com]
  Sent: Tuesday, February 28, 2006 5:59 PM
  To: synapse-dev@ws.apache.org
  Subject: Re: get(String url) issues for getting external resources

  I think we should try to separate out the connection properties associated with a URI and the mediators knowledge. So in other words lets try to configure the mediator with the URI and the SynapseEnv with the certs/uids/proxies, etc. 

  Paul

  On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote: 

  Hi Devs,

  I have written a document on "how to configure mediators get resources via SSL connection".  This will address how to acquire resources from Axis2 repository which is deployed on Tomcat. 

  Thank you 

  Saminda 

   

  On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote: 

  On 2/27/06, Soumadeep <so...@infravio.com> wrote: 

  Hi all,

  To fetch external resources using Axis2SynapseEnvironment's get(String url)
  wouldn't suffice I think. For secured resources we might have to send the 1)
  username/password http token or 2)WS Sec token or maybe 3) certificates or 
  4) we might also have to deal with enc/decryption.


  +1.  The  underline  transport mechanism for SynapesEnvironment.get(String) uses HttpClient from commons-httpclient and it provides full support for HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But to introduce authentication details we may need to insert  a bean into SynapseEnvironment.get(String) and we may have to change the signature as SynapseEnvironment.get(String url, Object authentication). This will allow to get authentication details from run time.

  More importantly, there might be a situation where the resource could be 
  located in LDAP,Database or a file System. 


  Yes.  We need to figure this out. IMHO this is can be considered as multiple issues. 

   

  How do we handle situations where a parameter could be required by the 
  resource server apart from what I have mentioned above? (HTTP GET maybe the 
  only way out) but then there should be a way to configure what type of
  resource server it is and what details are required.


  REST like invocation is the most simple yet the powerful way of  getting resources out a  repository.  So the  current implementation of SynapseEnviroment.get(String) would defiantly do that. We can integrate a very powerful lookup for this resources, if we uses Axis2's ServiceClient (Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate this, we need to populate a Object and fill the right information. 

  IMHO, i guess commons-httpclient addresses most of  the problems  with regular and ssl connection. 

  Thank you

  Saminda

  Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html 

   




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

   

   


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







  -- 
  Paul Fremantle
  VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

  http://bloglines.com/blog/paulfremantle 
  paul@wso2.com

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




  -- 
  Paul Fremantle
  VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

  http://bloglines.com/blog/paulfremantle 
  paul@wso2.com

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

   

   




  -- 
  Paul Fremantle
  VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

  http://bloglines.com/blog/paulfremantle
  paul@wso2.com

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

   

   

RE: get(String url) issues for getting external resources

Posted by Soumadeep <so...@infravio.com>.
Have you put it in the scratch area or are you sharing this code from your
dev box??

-----Original Message-----
From: Saminda Abeyruwan [mailto:samindaa@gmail.com]
Sent: Wednesday, March 22, 2006 11:50 AM
To: synapse-dev@ws.apache.org
Cc: pzfreo@gmail.com
Subject: Re: get(String url) issues for getting external resources

Hello fellow developers,

I've tried to implement on resource handling framework that Paul has
proposed earlier. This framework will going to have a big  impact on
security and rm mediator setup. I have attached the patch herewith for your
review. Please try to play with it and let your concern on the list.

I have attached a test case and a sample ResourceHandler with the notion of
REST to demonstrate the code base.

Thank you

Saminda
On 3/2/06, Saminda Abeyruwan < samindaa@gmail.com
<ma...@gmail.com> > wrote:

On 3/1/06, Paul Fremantle < pzfreo@gmail.com <ma...@gmail.com> >
wrote:
Saminda

I don't understand the scenario. I would say that was a misconfig and I
would expect an exception to be thrown when registering the second RH with
the same URI root.

Paul

So there is a one-to-one mapping between RH and uri-root. So the
implementation is much more simpler. I got it. Thanks Paul.

Saminda

On 3/1/06, Saminda Abeyruwan < samindaa@gmail.com
<ma...@gmail.com> > wrote:

Hi Paul,

I just need to clarify the following small matter.

i hope following scenario is valid. :-)

Assume, we have following synapse.xml for an example
...
<resource type="o.a.s.resources.HttpResource" uri-root="
http://fremantle.org/resources/ <http://fremantle.org/resources/> ">
   <property name="http.username">paul</property>
   <property name="http.password">pass</property>
   <property name=" http.proxy">proxy:80</property>
</resource>
<resource type="o.a.s.resources.DatabaseResources" uri-root="
http://fremantle.org/resources/ <http://fremantle.org/resources/> ">
   <property/>[1..n]
</resource>
...
so a mediator can register two resources handlers with the same uri-root.
Mediator can nicely say,

OMElement ele = se.getResourceHelper().get(some uri); to get  resources.
But mediator has registered two resources helpers initially, and mediator
just need have database connection for this time. As i can see there is no
way mediator author can instruct this to ResourceHelper.

Please be kind enough to explain prior.

Thank you

Saminda



On 3/1/06, Paul Fremantle < pzfreo@gmail.com <ma...@gmail.com> >
wrote:
How about this implementation of what you are describing.

1) Lets indirect this out of SynEnv:

SynapseEnvironment {
    ResourceHelper getResourceHelper();
}

public interface ResourceHelper {
    OMElement get(String uri); // get a resource
    OMElement get(String uri, ResourceUpdateAware mediator); // get a
resource and be notified of changes
    void registerResourceHandler(ResourceHandler rh, String urlRoot);
         // register a handler for a given set of URLs (which share the same
root)
    void notifyUpdate(String uriRoot);
         // a resource handler uses this to notify that all resources with
that root have changed (Resource Push model)
}

public interface ResourceHandler {
    OMElement get(String uri);

    void setProperty(String name, String value);
    String getProperty(String name);
    String[] getPropertyNames();

    boolean isUpdated(String uriRoot); // used to poll if resource has
changed (Pull model)
}

<synapse.xml>

<resource type="o.a.s.resources.HttpResource" uri-root="
http://fremantle.org/resources/ <http://fremantle.org/resources/> ">
   <property name="http.username">paul</property>
   <property name="http.password">pass</property>
   <property name=" http.proxy">proxy:80</property>
</resource>

Paul




On 3/1/06, Soumadeep < soumadeep@infravio.com
<ma...@infravio.com> > wrote:
Paul is right, instead of passing an object we could have property files
which will have the connection related data. Further, we can generalize the
way the get method is implemented, what I mean is we can have an interface
like ResourceHandler so that others can implement it as required ...
something like LDAPResourceHandler implements ResourceHandler which will
have a get method and depending on what was configured the resource will be
fetched.

We can put the property values in Synapse.xml, so you might end up having
multiple resource endpoints with property sets required for making a
connection, though we need to think about whether to provide the flexibility
in terms of mediators being able to call different ResourceHandlers for a
session.

-Soumadeep
-----Original Message-----
From: Paul Fremantle [mailto: pzfreo@gmail.com <ma...@gmail.com> ]
Sent: Tuesday, February 28, 2006 5:59 PM
To: synapse-dev@ws.apache.org <ma...@ws.apache.org>
Subject: Re: get(String url) issues for getting external resources
I think we should try to separate out the connection properties associated
with a URI and the mediators knowledge. So in other words lets try to
configure the mediator with the URI and the SynapseEnv with the
certs/uids/proxies, etc.

Paul
On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com
<ma...@gmail.com> > wrote:
Hi Devs,

I have written a document on "how to configure mediators get resources via
SSL connection".  This will address how to acquire resources from Axis2
repository which is deployed on Tomcat.

Thank you

Saminda

On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com
<ma...@gmail.com> > wrote:
On 2/27/06, Soumadeep < soumadeep@infravio.com
<ma...@infravio.com> > wrote:
Hi all,

To fetch external resources using Axis2SynapseEnvironment's get(String url)
wouldn't suffice I think. For secured resources we might have to send the 1)
username/password http token or 2)WS Sec token or maybe 3) certificates or
4) we might also have to deal with enc/decryption.

+1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
uses HttpClient from commons-httpclient and it provides full support for
HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
to introduce authentication details we may need to insert  a bean into
SynapseEnvironment.get(String) and we may have to change the signature as
SynapseEnvironment.get(String url, Object authentication). This will allow
to get authentication details from run time.
More importantly, there might be a situation where the resource could be
located in LDAP,Database or a file System.

Yes.  We need to figure this out. IMHO this is can be considered as multiple
issues.

How do we handle situations where a parameter could be required by the
resource server apart from what I have mentioned above? (HTTP GET maybe the
only way out) but then there should be a way to configure what type of
resource server it is and what details are required.

REST like invocation is the most simple yet the powerful way of  getting
resources out a  repository.  So the  current implementation of
SynapseEnviroment.get(String) would defiantly do that. We can integrate a
very powerful lookup for this resources, if we uses Axis2's ServiceClient
(Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
this, we need to populate a Object and fill the right information.

IMHO, i guess commons-httpclient addresses most of  the problems  with
regular and ssl connection.

Thank you

Saminda

Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html




---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
<ma...@ws.apache.org>
For additional commands, e-mail: synapse-dev-help@ws.apache.org
<ma...@ws.apache.org>



---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
<ma...@ws.apache.org>
For additional commands, e-mail: synapse-dev-help@ws.apache.org
<ma...@ws.apache.org>






--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com <ma...@wso2.com>

"Oxygenating the Web Service Platform", www.wso2.com <http://www.wso2.com>



--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com <ma...@wso2.com>

"Oxygenating the Web Service Platform", www.wso2.com <http://www.wso2.com>





--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com <ma...@wso2.com>

"Oxygenating the Web Service Platform", www.wso2.com <http://www.wso2.com>



Re: get(String url) issues for getting external resources

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Hello fellow developers,

I've tried to implement on resource handling framework that Paul has
proposed earlier. This framework will going to have a big  impact on
security and rm mediator setup. I have attached the patch herewith for your
review. Please try to play with it and let your concern on the list.

I have attached a test case and a sample ResourceHandler with the notion of
REST to demonstrate the code base.

Thank you

Saminda

On 3/2/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
>
>
>
> On 3/1/06, Paul Fremantle <pz...@gmail.com> wrote:
>
> > Saminda
> >
> > I don't understand the scenario. I would say that was a misconfig and I
> > would expect an exception to be thrown when registering the second RH with
> > the same URI root.
> >
> > Paul
> >
>
> So there is a one-to-one mapping between RH and uri-root. So the
> implementation is much more simpler. I got it. Thanks Paul.
>
> Saminda
>
> On 3/1/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> > >
> > >
> > > Hi Paul,
> > >
> > > I just need to clarify the following small matter.
> > >
> > > i hope following scenario is valid. :-)
> > >
> > > Assume, we have following synapse.xml for an example
> > > ...
> > > <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> > > ">
> > >    <property name="http.username">paul</property>
> > >    <property name="http.password">pass</property>
> > >    <property name=" http.proxy">proxy:80</property>
> > > </resource>
> > > <resource type="o.a.s.resources.DatabaseResources" uri-root="http://fremantle.org/resources/
> > > ">
> > >    <property/>[1..n]
> > > </resource>
> > > ...
> > > so a mediator can register two resources handlers with the same
> > > uri-root. Mediator can nicely say,
> > >
> > > OMElement ele = se.getResourceHelper().get(some uri); to get
> > > resources.  But mediator has registered two resources helpers initially, and
> > > mediator just need have database connection for this time. As i can see
> > > there is no way mediator author can instruct this to ResourceHelper.
> > >
> > > Please be kind enough to explain prior.
> > >
> > > Thank you
> > >
> > > Saminda
> > >
> > >
> > >
> > > On 3/1/06, Paul Fremantle <pz...@gmail.com> wrote:
> > > > >
> > > > > How about this implementation of what you are describing.
> > > > >
> > > > > 1) Lets indirect this out of SynEnv:
> > > > >
> > > > > SynapseEnvironment {
> > > > >     ResourceHelper getResourceHelper();
> > > > > }
> > > > >
> > > > > public interface ResourceHelper {
> > > > >     OMElement get(String uri); // get a resource
> > > > >     OMElement get(String uri, ResourceUpdateAware mediator); //
> > > > > get a resource and be notified of changes
> > > > >     void registerResourceHandler(ResourceHandler rh, String
> > > > > urlRoot);
> > > > >          // register a handler for a given set of URLs (which
> > > > > share the same root)
> > > > >     void notifyUpdate(String uriRoot);
> > > > >          // a resource handler uses this to notify that all
> > > > > resources with that root have changed (Resource Push model)
> > > > > }
> > > > >
> > > > > public interface ResourceHandler {
> > > > >     OMElement get(String uri);
> > > > >
> > > > >     void setProperty(String name, String value);
> > > > >     String getProperty(String name);
> > > > >     String[] getPropertyNames();
> > > > >
> > > > >     boolean isUpdated(String uriRoot); // used to poll if resource
> > > > > has changed (Pull model)
> > > > > }
> > > > >
> > > > > <synapse.xml>
> > > > >
> > > > > <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> > > > > ">
> > > > >    <property name="http.username">paul</property>
> > > > >    <property name="http.password">pass</property>
> > > > >    <property name=" http.proxy">proxy:80</property>
> > > > > </resource>
> > > > >
> > > > > Paul
> > > > >
> > > > >
> > > > >
> > > > > On 3/1/06, Soumadeep < soumadeep@infravio.com> wrote:
> > > > > >
> > > > > > Paul is right, instead of passing an object we could have
> > > > > > property files which will have the connection related data. Further, we can
> > > > > > generalize the way the get method is implemented, what I mean is we can have
> > > > > > an interface like ResourceHandler so that others can implement it as
> > > > > > required ... something like LDAPResourceHandler implements ResourceHandler
> > > > > > which will have a get method and depending on what was configured the
> > > > > > resource will be fetched.
> > > > > >
> > > > > > We can put the property values in Synapse.xml, so you might end
> > > > > > up having multiple resource endpoints with property sets required for making
> > > > > > a connection, though we need to think about whether to provide the
> > > > > > flexibility in terms of mediators being able to call different
> > > > > > ResourceHandlers for a session.
> > > > > >
> > > > > > -Soumadeep
> > > > > >
> > > > > > -----Original Message-----
> > > > > > *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> > > > > > *Sent:* Tuesday, February 28, 2006 5:59 PM
> > > > > > *To:* synapse-dev@ws.apache.org
> > > > > > *Subject:* Re: get(String url) issues for getting external
> > > > > > resources
> > > > > >
> > > > > > I think we should try to separate out the connection properties
> > > > > > associated with a URI and the mediators knowledge. So in other words lets
> > > > > > try to configure the mediator with the URI and the SynapseEnv with the
> > > > > > certs/uids/proxies, etc.
> > > > > >
> > > > > > Paul
> > > > > >
> > > > > > On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> > > > > > >
> > > > > > > Hi Devs,
> > > > > > >
> > > > > > > I have written a document on "how to configure mediators get
> > > > > > > resources via SSL connection".  This will address how to acquire resources
> > > > > > > from Axis2 repository which is deployed on Tomcat.
> > > > > > >
> > > > > > > Thank you
> > > > > > >
> > > > > > > Saminda
> > > > > > >
> > > > > > > On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
> > > > > > > >
> > > > > > > > On 2/27/06, Soumadeep <so...@infravio.com> wrote:
> > > > > > > > >
> > > > > > > > > Hi all,
> > > > > > > > >
> > > > > > > > > To fetch external resources using
> > > > > > > > > Axis2SynapseEnvironment's get(String url)
> > > > > > > > > wouldn't suffice I think. For secured resources we might
> > > > > > > > > have to send the 1)
> > > > > > > > > username/password http token or 2)WS Sec token or maybe 3)
> > > > > > > > > certificates or
> > > > > > > > > 4) we might also have to deal with enc/decryption.
> > > > > > > >
> > > > > > > >
> > > > > > > > +1.  The  underline  transport mechanism for
> > > > > > > > SynapesEnvironment.get(String) uses HttpClient from
> > > > > > > > commons-httpclient and it provides full support for HTTP over SSL [1]. Thus,
> > > > > > > > with minimum effort we can integrate it here. But to introduce
> > > > > > > > authentication details we may need to insert  a bean into
> > > > > > > > SynapseEnvironment.get(String) and we may have to change the
> > > > > > > > signature as SynapseEnvironment.get(String url, Object
> > > > > > > > authentication). This will allow to get authentication details from run
> > > > > > > > time.
> > > > > > > >
> > > > > > > > More importantly, there might be a situation where the
> > > > > > > > > resource could be
> > > > > > > > > located in LDAP,Database or a file System.
> > > > > > > >
> > > > > > > >
> > > > > > > > Yes.  We need to figure this out. IMHO this is can be
> > > > > > > > considered as multiple issues.
> > > > > > > >
> > > > > > > > How do we handle situations where a parameter could be
> > > > > > > > > required by the
> > > > > > > > > resource server apart from what I have mentioned above?
> > > > > > > > > (HTTP GET maybe the
> > > > > > > > > only way out) but then there should be a way to configure
> > > > > > > > > what type of
> > > > > > > > > resource server it is and what details are required.
> > > > > > > >
> > > > > > > >
> > > > > > > > REST like invocation is the most simple yet the powerful way
> > > > > > > > of  getting resources out a  repository.  So the  current implementation of
> > > > > > > > SynapseEnviroment.get(String) would defiantly do that. We
> > > > > > > > can integrate a very powerful lookup for this resources, if we uses Axis2's
> > > > > > > > ServiceClient (Once Axis2-0.95 releases) REST invocation
> > > > > > > > mechanism. But to  integrate this, we need to populate a Object and fill the
> > > > > > > > right information.
> > > > > > > >
> > > > > > > > IMHO, i guess commons-httpclient addresses most of  the
> > > > > > > > problems  with regular and ssl connection.
> > > > > > > >
> > > > > > > > Thank you
> > > > > > > >
> > > > > > > > Saminda
> > > > > > > >
> > > > > > > > Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ---------------------------------------------------------------------
> > > > > > > > >
> > > > > > > > > To unsubscribe, e-mail:
> > > > > > > > > synapse-dev-unsubscribe@ws.apache.org
> > > > > > > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail:
> > > > > > > synapse-dev-help@ws.apache.org
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Paul Fremantle
> > > > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > > > >
> > > > > > http://bloglines.com/blog/paulfremantle
> > > > > > paul@wso2.com
> > > > > >
> > > > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Paul Fremantle
> > > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > > >
> > > > > http://bloglines.com/blog/paulfremantle
> > > > > paul@wso2.com
> > > > >
> > > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > > >
> > > >
> > > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> >
> > http://bloglines.com/blog/paulfremantle
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
>
>

Re: get(String url) issues for getting external resources

Posted by Saminda Abeyruwan <sa...@gmail.com>.
On 3/1/06, Paul Fremantle <pz...@gmail.com> wrote:
>
> Saminda
>
> I don't understand the scenario. I would say that was a misconfig and I
> would expect an exception to be thrown when registering the second RH with
> the same URI root.
>
> Paul
>

So there is a one-to-one mapping between RH and uri-root. So the
implementation is much more simpler. I got it. Thanks Paul.

Saminda

On 3/1/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> >
> >
> > Hi Paul,
> >
> > I just need to clarify the following small matter.
> >
> > i hope following scenario is valid. :-)
> >
> > Assume, we have following synapse.xml for an example
> > ...
> > <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> > ">
> >    <property name="http.username">paul</property>
> >    <property name="http.password">pass</property>
> >    <property name=" http.proxy">proxy:80</property>
> > </resource>
> > <resource type="o.a.s.resources.DatabaseResources" uri-root="http://fremantle.org/resources/
> > ">
> >    <property/>[1..n]
> > </resource>
> > ...
> > so a mediator can register two resources handlers with the same
> > uri-root. Mediator can nicely say,
> >
> > OMElement ele = se.getResourceHelper().get(some uri); to get
> > resources.  But mediator has registered two resources helpers initially, and
> > mediator just need have database connection for this time. As i can see
> > there is no way mediator author can instruct this to ResourceHelper.
> >
> > Please be kind enough to explain prior.
> >
> > Thank you
> >
> > Saminda
> >
> >
> >
> > On 3/1/06, Paul Fremantle <pz...@gmail.com> wrote:
> > > >
> > > > How about this implementation of what you are describing.
> > > >
> > > > 1) Lets indirect this out of SynEnv:
> > > >
> > > > SynapseEnvironment {
> > > >     ResourceHelper getResourceHelper();
> > > > }
> > > >
> > > > public interface ResourceHelper {
> > > >     OMElement get(String uri); // get a resource
> > > >     OMElement get(String uri, ResourceUpdateAware mediator); // get
> > > > a resource and be notified of changes
> > > >     void registerResourceHandler(ResourceHandler rh, String
> > > > urlRoot);
> > > >          // register a handler for a given set of URLs (which share
> > > > the same root)
> > > >     void notifyUpdate(String uriRoot);
> > > >          // a resource handler uses this to notify that all
> > > > resources with that root have changed (Resource Push model)
> > > > }
> > > >
> > > > public interface ResourceHandler {
> > > >     OMElement get(String uri);
> > > >
> > > >     void setProperty(String name, String value);
> > > >     String getProperty(String name);
> > > >     String[] getPropertyNames();
> > > >
> > > >     boolean isUpdated(String uriRoot); // used to poll if resource
> > > > has changed (Pull model)
> > > > }
> > > >
> > > > <synapse.xml>
> > > >
> > > > <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> > > > ">
> > > >    <property name="http.username">paul</property>
> > > >    <property name="http.password">pass</property>
> > > >    <property name=" http.proxy">proxy:80</property>
> > > > </resource>
> > > >
> > > > Paul
> > > >
> > > >
> > > >
> > > > On 3/1/06, Soumadeep < soumadeep@infravio.com> wrote:
> > > > >
> > > > > Paul is right, instead of passing an object we could have property
> > > > > files which will have the connection related data. Further, we can
> > > > > generalize the way the get method is implemented, what I mean is we can have
> > > > > an interface like ResourceHandler so that others can implement it as
> > > > > required ... something like LDAPResourceHandler implements ResourceHandler
> > > > > which will have a get method and depending on what was configured the
> > > > > resource will be fetched.
> > > > >
> > > > > We can put the property values in Synapse.xml, so you might end up
> > > > > having multiple resource endpoints with property sets required for making a
> > > > > connection, though we need to think about whether to provide the flexibility
> > > > > in terms of mediators being able to call different ResourceHandlers for a
> > > > > session.
> > > > >
> > > > > -Soumadeep
> > > > >
> > > > > -----Original Message-----
> > > > > *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> > > > > *Sent:* Tuesday, February 28, 2006 5:59 PM
> > > > > *To:* synapse-dev@ws.apache.org
> > > > > *Subject:* Re: get(String url) issues for getting external
> > > > > resources
> > > > >
> > > > > I think we should try to separate out the connection properties
> > > > > associated with a URI and the mediators knowledge. So in other words lets
> > > > > try to configure the mediator with the URI and the SynapseEnv with the
> > > > > certs/uids/proxies, etc.
> > > > >
> > > > > Paul
> > > > >
> > > > > On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> > > > > >
> > > > > > Hi Devs,
> > > > > >
> > > > > > I have written a document on "how to configure mediators get
> > > > > > resources via SSL connection".  This will address how to acquire resources
> > > > > > from Axis2 repository which is deployed on Tomcat.
> > > > > >
> > > > > > Thank you
> > > > > >
> > > > > > Saminda
> > > > > >
> > > > > > On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
> > > > > > >
> > > > > > > On 2/27/06, Soumadeep <so...@infravio.com> wrote:
> > > > > > > >
> > > > > > > > Hi all,
> > > > > > > >
> > > > > > > > To fetch external resources using Axis2SynapseEnvironment's
> > > > > > > > get(String url)
> > > > > > > > wouldn't suffice I think. For secured resources we might
> > > > > > > > have to send the 1)
> > > > > > > > username/password http token or 2)WS Sec token or maybe 3)
> > > > > > > > certificates or
> > > > > > > > 4) we might also have to deal with enc/decryption.
> > > > > > >
> > > > > > >
> > > > > > > +1.  The  underline  transport mechanism for
> > > > > > > SynapesEnvironment.get(String) uses HttpClient from
> > > > > > > commons-httpclient and it provides full support for HTTP over SSL [1]. Thus,
> > > > > > > with minimum effort we can integrate it here. But to introduce
> > > > > > > authentication details we may need to insert  a bean into
> > > > > > > SynapseEnvironment.get(String) and we may have to change the
> > > > > > > signature as SynapseEnvironment.get(String url, Object
> > > > > > > authentication). This will allow to get authentication details from run
> > > > > > > time.
> > > > > > >
> > > > > > > More importantly, there might be a situation where the
> > > > > > > > resource could be
> > > > > > > > located in LDAP,Database or a file System.
> > > > > > >
> > > > > > >
> > > > > > > Yes.  We need to figure this out. IMHO this is can be
> > > > > > > considered as multiple issues.
> > > > > > >
> > > > > > > How do we handle situations where a parameter could be
> > > > > > > > required by the
> > > > > > > > resource server apart from what I have mentioned above?
> > > > > > > > (HTTP GET maybe the
> > > > > > > > only way out) but then there should be a way to configure
> > > > > > > > what type of
> > > > > > > > resource server it is and what details are required.
> > > > > > >
> > > > > > >
> > > > > > > REST like invocation is the most simple yet the powerful way
> > > > > > > of  getting resources out a  repository.  So the  current implementation of
> > > > > > > SynapseEnviroment.get(String) would defiantly do that. We can
> > > > > > > integrate a very powerful lookup for this resources, if we uses Axis2's
> > > > > > > ServiceClient (Once Axis2-0.95 releases) REST invocation
> > > > > > > mechanism. But to  integrate this, we need to populate a Object and fill the
> > > > > > > right information.
> > > > > > >
> > > > > > > IMHO, i guess commons-httpclient addresses most of  the
> > > > > > > problems  with regular and ssl connection.
> > > > > > >
> > > > > > > Thank you
> > > > > > >
> > > > > > > Saminda
> > > > > > >
> > > > > > > Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > ---------------------------------------------------------------------
> > > > > > > >
> > > > > > > > To unsubscribe, e-mail:
> > > > > > > > synapse-dev-unsubscribe@ws.apache.org
> > > > > > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > Paul Fremantle
> > > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > > >
> > > > > http://bloglines.com/blog/paulfremantle
> > > > > paul@wso2.com
> > > > >
> > > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Paul Fremantle
> > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > >
> > > > http://bloglines.com/blog/paulfremantle
> > > > paul@wso2.com
> > > >
> > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > >
> > >
> > >
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>

Re: get(String url) issues for getting external resources

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

I don't understand the scenario. I would say that was a misconfig and I
would expect an exception to be thrown when registering the second RH with
the same URI root.

Paul

On 3/1/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
>
>
> Hi Paul,
>
> I just need to clarify the following small matter.
>
> i hope following scenario is valid. :-)
>
> Assume, we have following synapse.xml for an example
> ...
> <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> ">
>    <property name="http.username">paul</property>
>    <property name="http.password">pass</property>
>    <property name=" http.proxy">proxy:80</property>
> </resource>
> <resource type="o.a.s.resources.DatabaseResources" uri-root="http://fremantle.org/resources/
> ">
>    <property/>[1..n]
> </resource>
> ...
> so a mediator can register two resources handlers with the same uri-root.
> Mediator can nicely say,
>
> OMElement ele = se.getResourceHelper().get(some uri); to get  resources.
> But mediator has registered two resources helpers initially, and mediator
> just need have database connection for this time. As i can see there is no
> way mediator author can instruct this to ResourceHelper.
>
> Please be kind enough to explain prior.
>
> Thank you
>
> Saminda
>
>
>
> On 3/1/06, Paul Fremantle <pz...@gmail.com> wrote:
> > >
> > > How about this implementation of what you are describing.
> > >
> > > 1) Lets indirect this out of SynEnv:
> > >
> > > SynapseEnvironment {
> > >     ResourceHelper getResourceHelper();
> > > }
> > >
> > > public interface ResourceHelper {
> > >     OMElement get(String uri); // get a resource
> > >     OMElement get(String uri, ResourceUpdateAware mediator); // get a
> > > resource and be notified of changes
> > >     void registerResourceHandler(ResourceHandler rh, String urlRoot);
> > >          // register a handler for a given set of URLs (which share
> > > the same root)
> > >     void notifyUpdate(String uriRoot);
> > >          // a resource handler uses this to notify that all resources
> > > with that root have changed (Resource Push model)
> > > }
> > >
> > > public interface ResourceHandler {
> > >     OMElement get(String uri);
> > >
> > >     void setProperty(String name, String value);
> > >     String getProperty(String name);
> > >     String[] getPropertyNames();
> > >
> > >     boolean isUpdated(String uriRoot); // used to poll if resource has
> > > changed (Pull model)
> > > }
> > >
> > > <synapse.xml>
> > >
> > > <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> > > ">
> > >    <property name="http.username">paul</property>
> > >    <property name="http.password">pass</property>
> > >    <property name=" http.proxy">proxy:80</property>
> > > </resource>
> > >
> > > Paul
> > >
> > >
> > >
> > > On 3/1/06, Soumadeep < soumadeep@infravio.com> wrote:
> > > >
> > > > Paul is right, instead of passing an object we could have property
> > > > files which will have the connection related data. Further, we can
> > > > generalize the way the get method is implemented, what I mean is we can have
> > > > an interface like ResourceHandler so that others can implement it as
> > > > required ... something like LDAPResourceHandler implements ResourceHandler
> > > > which will have a get method and depending on what was configured the
> > > > resource will be fetched.
> > > >
> > > > We can put the property values in Synapse.xml, so you might end up
> > > > having multiple resource endpoints with property sets required for making a
> > > > connection, though we need to think about whether to provide the flexibility
> > > > in terms of mediators being able to call different ResourceHandlers for a
> > > > session.
> > > >
> > > > -Soumadeep
> > > >
> > > > -----Original Message-----
> > > > *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> > > > *Sent:* Tuesday, February 28, 2006 5:59 PM
> > > > *To:* synapse-dev@ws.apache.org
> > > > *Subject:* Re: get(String url) issues for getting external resources
> > > >
> > > > I think we should try to separate out the connection properties
> > > > associated with a URI and the mediators knowledge. So in other words lets
> > > > try to configure the mediator with the URI and the SynapseEnv with the
> > > > certs/uids/proxies, etc.
> > > >
> > > > Paul
> > > >
> > > > On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> > > > >
> > > > > Hi Devs,
> > > > >
> > > > > I have written a document on "how to configure mediators get
> > > > > resources via SSL connection".  This will address how to acquire resources
> > > > > from Axis2 repository which is deployed on Tomcat.
> > > > >
> > > > > Thank you
> > > > >
> > > > > Saminda
> > > > >
> > > > > On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
> > > > > >
> > > > > > On 2/27/06, Soumadeep <so...@infravio.com> wrote:
> > > > > > >
> > > > > > > Hi all,
> > > > > > >
> > > > > > > To fetch external resources using Axis2SynapseEnvironment's
> > > > > > > get(String url)
> > > > > > > wouldn't suffice I think. For secured resources we might have
> > > > > > > to send the 1)
> > > > > > > username/password http token or 2)WS Sec token or maybe 3)
> > > > > > > certificates or
> > > > > > > 4) we might also have to deal with enc/decryption.
> > > > > >
> > > > > >
> > > > > > +1.  The  underline  transport mechanism for
> > > > > > SynapesEnvironment.get(String) uses HttpClient from
> > > > > > commons-httpclient and it provides full support for HTTP over SSL [1]. Thus,
> > > > > > with minimum effort we can integrate it here. But to introduce
> > > > > > authentication details we may need to insert  a bean into
> > > > > > SynapseEnvironment.get(String) and we may have to change the
> > > > > > signature as SynapseEnvironment.get(String url, Object
> > > > > > authentication). This will allow to get authentication details from run
> > > > > > time.
> > > > > >
> > > > > > More importantly, there might be a situation where the resource
> > > > > > > could be
> > > > > > > located in LDAP,Database or a file System.
> > > > > >
> > > > > >
> > > > > > Yes.  We need to figure this out. IMHO this is can be considered
> > > > > > as multiple issues.
> > > > > >
> > > > > > How do we handle situations where a parameter could be required
> > > > > > > by the
> > > > > > > resource server apart from what I have mentioned above? (HTTP
> > > > > > > GET maybe the
> > > > > > > only way out) but then there should be a way to configure what
> > > > > > > type of
> > > > > > > resource server it is and what details are required.
> > > > > >
> > > > > >
> > > > > > REST like invocation is the most simple yet the powerful way of
> > > > > > getting resources out a  repository.  So the  current implementation of
> > > > > > SynapseEnviroment.get(String) would defiantly do that. We can
> > > > > > integrate a very powerful lookup for this resources, if we uses Axis2's
> > > > > > ServiceClient (Once Axis2-0.95 releases) REST invocation
> > > > > > mechanism. But to  integrate this, we need to populate a Object and fill the
> > > > > > right information.
> > > > > >
> > > > > > IMHO, i guess commons-httpclient addresses most of  the
> > > > > > problems  with regular and ssl connection.
> > > > > >
> > > > > > Thank you
> > > > > >
> > > > > > Saminda
> > > > > >
> > > > > > Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
> > > > > >
> > > > > >
> > > > > >
> > > > > > >
> > > > > > >
> > > > > > > ---------------------------------------------------------------------
> > > > > > >
> > > > > > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > > > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > Paul Fremantle
> > > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > > >
> > > > http://bloglines.com/blog/paulfremantle
> > > > paul@wso2.com
> > > >
> > > > "Oxygenating the Web Service Platform", www.wso2.com
> > > >
> > > >
> > >
> > >
> > > --
> > > Paul Fremantle
> > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > >
> > > http://bloglines.com/blog/paulfremantle
> > > paul@wso2.com
> > >
> > > "Oxygenating the Web Service Platform", www.wso2.com
> > >
> >
> >
>


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

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

Re: get(String url) issues for getting external resources

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Hi Paul,

I just need to clarify the following small matter.

i hope following scenario is valid. :-)

Assume, we have following synapse.xml for an example
...
<resource type="o.a.s.resources.HttpResource"
uri-root="http://fremantle.org/resources/
">
   <property name="http.username">paul</property>
   <property name="http.password">pass</property>
   <property name=" http.proxy">proxy:80</property>
</resource>
<resource type="o.a.s.resources.DatabaseResources"
uri-root="http://fremantle.org/resources/
">
   <property/>[1..n]
</resource>
...
so a mediator can register two resources handlers with the same uri-root.
Mediator can nicely say,

OMElement ele = se.getResourceHelper().get(some uri); to get  resources.
But mediator has registered two resources helpers initially, and mediator
just need have database connection for this time. As i can see there is no
way mediator author can instruct this to ResourceHelper.

Please be kind enough to explain prior.

Thank you

Saminda



On 3/1/06, Paul Fremantle <pz...@gmail.com> wrote:
> >
> > How about this implementation of what you are describing.
> >
> > 1) Lets indirect this out of SynEnv:
> >
> > SynapseEnvironment {
> >     ResourceHelper getResourceHelper();
> > }
> >
> > public interface ResourceHelper {
> >     OMElement get(String uri); // get a resource
> >     OMElement get(String uri, ResourceUpdateAware mediator); // get a
> > resource and be notified of changes
> >     void registerResourceHandler(ResourceHandler rh, String urlRoot);
> >          // register a handler for a given set of URLs (which share the
> > same root)
> >     void notifyUpdate(String uriRoot);
> >          // a resource handler uses this to notify that all resources
> > with that root have changed (Resource Push model)
> > }
> >
> > public interface ResourceHandler {
> >     OMElement get(String uri);
> >
> >     void setProperty(String name, String value);
> >     String getProperty(String name);
> >     String[] getPropertyNames();
> >
> >     boolean isUpdated(String uriRoot); // used to poll if resource has
> > changed (Pull model)
> > }
> >
> > <synapse.xml>
> >
> > <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> > ">
> >    <property name="http.username">paul</property>
> >    <property name="http.password">pass</property>
> >    <property name=" http.proxy">proxy:80</property>
> > </resource>
> >
> > Paul
> >
> >
> >
> > On 3/1/06, Soumadeep < soumadeep@infravio.com> wrote:
> > >
> > > Paul is right, instead of passing an object we could have property
> > > files which will have the connection related data. Further, we can
> > > generalize the way the get method is implemented, what I mean is we can have
> > > an interface like ResourceHandler so that others can implement it as
> > > required ... something like LDAPResourceHandler implements ResourceHandler
> > > which will have a get method and depending on what was configured the
> > > resource will be fetched.
> > >
> > > We can put the property values in Synapse.xml, so you might end up
> > > having multiple resource endpoints with property sets required for making a
> > > connection, though we need to think about whether to provide the flexibility
> > > in terms of mediators being able to call different ResourceHandlers for a
> > > session.
> > >
> > > -Soumadeep
> > >
> > > -----Original Message-----
> > > *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> > > *Sent:* Tuesday, February 28, 2006 5:59 PM
> > > *To:* synapse-dev@ws.apache.org
> > > *Subject:* Re: get(String url) issues for getting external resources
> > >
> > > I think we should try to separate out the connection properties
> > > associated with a URI and the mediators knowledge. So in other words lets
> > > try to configure the mediator with the URI and the SynapseEnv with the
> > > certs/uids/proxies, etc.
> > >
> > > Paul
> > >
> > > On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> > > >
> > > > Hi Devs,
> > > >
> > > > I have written a document on "how to configure mediators get
> > > > resources via SSL connection".  This will address how to acquire resources
> > > > from Axis2 repository which is deployed on Tomcat.
> > > >
> > > > Thank you
> > > >
> > > > Saminda
> > > >
> > > > On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
> > > > >
> > > > > On 2/27/06, Soumadeep <so...@infravio.com> wrote:
> > > > > >
> > > > > > Hi all,
> > > > > >
> > > > > > To fetch external resources using Axis2SynapseEnvironment's
> > > > > > get(String url)
> > > > > > wouldn't suffice I think. For secured resources we might have to
> > > > > > send the 1)
> > > > > > username/password http token or 2)WS Sec token or maybe 3)
> > > > > > certificates or
> > > > > > 4) we might also have to deal with enc/decryption.
> > > > >
> > > > >
> > > > > +1.  The  underline  transport mechanism for
> > > > > SynapesEnvironment.get(String) uses HttpClient from
> > > > > commons-httpclient and it provides full support for HTTP over SSL [1]. Thus,
> > > > > with minimum effort we can integrate it here. But to introduce
> > > > > authentication details we may need to insert  a bean into
> > > > > SynapseEnvironment.get(String) and we may have to change the
> > > > > signature as SynapseEnvironment.get(String url, Object
> > > > > authentication). This will allow to get authentication details from run
> > > > > time.
> > > > >
> > > > > More importantly, there might be a situation where the resource
> > > > > > could be
> > > > > > located in LDAP,Database or a file System.
> > > > >
> > > > >
> > > > > Yes.  We need to figure this out. IMHO this is can be considered
> > > > > as multiple issues.
> > > > >
> > > > > How do we handle situations where a parameter could be required by
> > > > > > the
> > > > > > resource server apart from what I have mentioned above? (HTTP
> > > > > > GET maybe the
> > > > > > only way out) but then there should be a way to configure what
> > > > > > type of
> > > > > > resource server it is and what details are required.
> > > > >
> > > > >
> > > > > REST like invocation is the most simple yet the powerful way of
> > > > > getting resources out a  repository.  So the  current implementation of
> > > > > SynapseEnviroment.get(String) would defiantly do that. We can
> > > > > integrate a very powerful lookup for this resources, if we uses Axis2's
> > > > > ServiceClient (Once Axis2-0.95 releases) REST invocation
> > > > > mechanism. But to  integrate this, we need to populate a Object and fill the
> > > > > right information.
> > > > >
> > > > > IMHO, i guess commons-httpclient addresses most of  the problems
> > > > > with regular and ssl connection.
> > > > >
> > > > > Thank you
> > > > >
> > > > > Saminda
> > > > >
> > > > > Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
> > > > >
> > > > >
> > > > >
> > > > > >
> > > > > >
> > > > > > ---------------------------------------------------------------------
> > > > > >
> > > > > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > > >
> > > > > >
> > > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > >
> > > >
> > > >
> > >
> > >
> > > --
> > > Paul Fremantle
> > > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> > >
> > > http://bloglines.com/blog/paulfremantle
> > > paul@wso2.com
> > >
> > > "Oxygenating the Web Service Platform", www.wso2.com
> > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> >
> > http://bloglines.com/blog/paulfremantle
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
>
>

Re: get(String url) issues for getting external resources

Posted by Saminda Abeyruwan <sa...@gmail.com>.
+1

On 3/1/06, Paul Fremantle <pz...@gmail.com> wrote:
>
> How about this implementation of what you are describing.
>
> 1) Lets indirect this out of SynEnv:
>
> SynapseEnvironment {
>     ResourceHelper getResourceHelper();
> }
>
> public interface ResourceHelper {
>     OMElement get(String uri); // get a resource
>     OMElement get(String uri, ResourceUpdateAware mediator); // get a
> resource and be notified of changes
>     void registerResourceHandler(ResourceHandler rh, String urlRoot);
>          // register a handler for a given set of URLs (which share the
> same root)
>     void notifyUpdate(String uriRoot);
>          // a resource handler uses this to notify that all resources with
> that root have changed (Resource Push model)
> }
>
> public interface ResourceHandler {
>     OMElement get(String uri);
>
>     void setProperty(String name, String value);
>     String getProperty(String name);
>     String[] getPropertyNames();
>
>     boolean isUpdated(String uriRoot); // used to poll if resource has
> changed (Pull model)
> }
>
> <synapse.xml>
>
> <resource type="o.a.s.resources.HttpResource" uri-root="http://fremantle.org/resources/
> ">
>    <property name="http.username">paul</property>
>    <property name="http.password">pass</property>
>    <property name=" http.proxy">proxy:80</property>
> </resource>
>
> Paul
>
>
>
> On 3/1/06, Soumadeep < soumadeep@infravio.com> wrote:
> >
> > Paul is right, instead of passing an object we could have property files
> > which will have the connection related data. Further, we can generalize the
> > way the get method is implemented, what I mean is we can have an interface
> > like ResourceHandler so that others can implement it as required ...
> > something like LDAPResourceHandler implements ResourceHandler which will
> > have a get method and depending on what was configured the resource will be
> > fetched.
> >
> > We can put the property values in Synapse.xml, so you might end up
> > having multiple resource endpoints with property sets required for making a
> > connection, though we need to think about whether to provide the flexibility
> > in terms of mediators being able to call different ResourceHandlers for a
> > session.
> >
> > -Soumadeep
> >
> > -----Original Message-----
> > *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> > *Sent:* Tuesday, February 28, 2006 5:59 PM
> > *To:* synapse-dev@ws.apache.org
> > *Subject:* Re: get(String url) issues for getting external resources
> >
> > I think we should try to separate out the connection properties
> > associated with a URI and the mediators knowledge. So in other words lets
> > try to configure the mediator with the URI and the SynapseEnv with the
> > certs/uids/proxies, etc.
> >
> > Paul
> >
> > On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> > >
> > > Hi Devs,
> > >
> > > I have written a document on "how to configure mediators get resources
> > > via SSL connection".  This will address how to acquire resources from Axis2
> > > repository which is deployed on Tomcat.
> > >
> > > Thank you
> > >
> > > Saminda
> > >
> > > On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
> > > >
> > > > On 2/27/06, Soumadeep <so...@infravio.com> wrote:
> > > > >
> > > > > Hi all,
> > > > >
> > > > > To fetch external resources using Axis2SynapseEnvironment's
> > > > > get(String url)
> > > > > wouldn't suffice I think. For secured resources we might have to
> > > > > send the 1)
> > > > > username/password http token or 2)WS Sec token or maybe 3)
> > > > > certificates or
> > > > > 4) we might also have to deal with enc/decryption.
> > > >
> > > >
> > > > +1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
> > > > uses HttpClient from commons-httpclient and it provides full support for
> > > > HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
> > > > to introduce authentication details we may need to insert  a bean into
> > > > SynapseEnvironment.get(String) and we may have to change the
> > > > signature as SynapseEnvironment.get(String url, Object
> > > > authentication). This will allow to get authentication details from run
> > > > time.
> > > >
> > > > More importantly, there might be a situation where the resource
> > > > > could be
> > > > > located in LDAP,Database or a file System.
> > > >
> > > >
> > > > Yes.  We need to figure this out. IMHO this is can be considered as
> > > > multiple issues.
> > > >
> > > > How do we handle situations where a parameter could be required by
> > > > > the
> > > > > resource server apart from what I have mentioned above? (HTTP GET
> > > > > maybe the
> > > > > only way out) but then there should be a way to configure what
> > > > > type of
> > > > > resource server it is and what details are required.
> > > >
> > > >
> > > > REST like invocation is the most simple yet the powerful way of
> > > > getting resources out a  repository.  So the  current implementation of
> > > > SynapseEnviroment.get(String) would defiantly do that. We can
> > > > integrate a very powerful lookup for this resources, if we uses Axis2's
> > > > ServiceClient (Once Axis2-0.95 releases) REST invocation mechanism.
> > > > But to  integrate this, we need to populate a Object and fill the right
> > > > information.
> > > >
> > > > IMHO, i guess commons-httpclient addresses most of  the problems
> > > > with regular and ssl connection.
> > > >
> > > > Thank you
> > > >
> > > > Saminda
> > > >
> > > > Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
> > > >
> > > >
> > > >
> > > > >
> > > > >
> > > > > ---------------------------------------------------------------------
> > > > >
> > > > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > > >
> > > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > >
> > >
> > >
> >
> >
> > --
> > Paul Fremantle
> > VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> >
> > http://bloglines.com/blog/paulfremantle
> > paul@wso2.com
> >
> > "Oxygenating the Web Service Platform", www.wso2.com
> >
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>

RE: get(String url) issues for getting external resources

Posted by Soumadeep <so...@infravio.com>.
Thanks Paul... I think this should suffice... +1
  -----Original Message-----
  From: Paul Fremantle [mailto:pzfreo@gmail.com]
  Sent: Wednesday, March 01, 2006 4:15 PM
  To: synapse-dev@ws.apache.org
  Subject: Re: get(String url) issues for getting external resources


  How about this implementation of what you are describing.

  1) Lets indirect this out of SynEnv:

  SynapseEnvironment {
      ResourceHelper getResourceHelper();
  }

  public interface ResourceHelper {
      OMElement get(String uri); // get a resource
      OMElement get(String uri, ResourceUpdateAware mediator); // get a
resource and be notified of changes
      void registerResourceHandler(ResourceHandler rh, String urlRoot);
           // register a handler for a given set of URLs (which share the
same root)
      void notifyUpdate(String uriRoot);
           // a resource handler uses this to notify that all resources with
that root have changed (Resource Push model)
  }

  public interface ResourceHandler {
      OMElement get(String uri);

      void setProperty(String name, String value);
      String getProperty(String name);
      String[] getPropertyNames();

      boolean isUpdated(String uriRoot); // used to poll if resource has
changed (Pull model)
  }

  <synapse.xml>

  <resource type="o.a.s.resources.HttpResource" uri-root="
http://fremantle.org/resources/">
     <property name="http.username">paul</property>
     <property name="http.password">pass</property>
     <property name=" http.proxy">proxy:80</property>
  </resource>

  Paul




  On 3/1/06, Soumadeep < soumadeep@infravio.com> wrote:
    Paul is right, instead of passing an object we could have property files
which will have the connection related data. Further, we can generalize the
way the get method is implemented, what I mean is we can have an interface
like ResourceHandler so that others can implement it as required ...
something like LDAPResourceHandler implements ResourceHandler which will
have a get method and depending on what was configured the resource will be
fetched.

    We can put the property values in Synapse.xml, so you might end up
having multiple resource endpoints with property sets required for making a
connection, though we need to think about whether to provide the flexibility
in terms of mediators being able to call different ResourceHandlers for a
session.

    -Soumadeep
      -----Original Message-----
      From: Paul Fremantle [mailto:pzfreo@gmail.com]
      Sent: Tuesday, February 28, 2006 5:59 PM
      To: synapse-dev@ws.apache.org
      Subject: Re: get(String url) issues for getting external resources


      I think we should try to separate out the connection properties
associated with a URI and the mediators knowledge. So in other words lets
try to configure the mediator with the URI and the SynapseEnv with the
certs/uids/proxies, etc.

      Paul


      On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
        Hi Devs,

        I have written a document on "how to configure mediators get
resources via SSL connection".  This will address how to acquire resources
from Axis2 repository which is deployed on Tomcat.

        Thank you

        Saminda



        On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
          On 2/27/06, Soumadeep <so...@infravio.com> wrote:
            Hi all,

            To fetch external resources using Axis2SynapseEnvironment's
get(String url)
            wouldn't suffice I think. For secured resources we might have to
send the 1)
            username/password http token or 2)WS Sec token or maybe 3)
certificates or
            4) we might also have to deal with enc/decryption.

          +1.  The  underline  transport mechanism for
SynapesEnvironment.get(String) uses HttpClient from commons-httpclient and
it provides full support for HTTP over SSL [1]. Thus, with minimum effort we
can integrate it here. But to introduce authentication details we may need
to insert  a bean into SynapseEnvironment.get(String) and we may have to
change the signature as SynapseEnvironment.get(String url, Object
authentication). This will allow to get authentication details from run
time.


            More importantly, there might be a situation where the resource
could be
            located in LDAP,Database or a file System.

          Yes.  We need to figure this out. IMHO this is can be considered
as multiple issues.



            How do we handle situations where a parameter could be required
by the
            resource server apart from what I have mentioned above? (HTTP
GET maybe the
            only way out) but then there should be a way to configure what
type of
            resource server it is and what details are required.

          REST like invocation is the most simple yet the powerful way of
getting resources out a  repository.  So the  current implementation of
SynapseEnviroment.get(String) would defiantly do that. We can integrate a
very powerful lookup for this resources, if we uses Axis2's ServiceClient
(Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
this, we need to populate a Object and fill the right information.

          IMHO, i guess commons-httpclient addresses most of  the problems
with regular and ssl connection.

          Thank you

          Saminda

          Resources: [1].
http://jakarta.apache.org/commons/httpclient/sslguide.html






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







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






      --
      Paul Fremantle
      VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

      http://bloglines.com/blog/paulfremantle
      paul@wso2.com

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




  --
  Paul Fremantle
  VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

  http://bloglines.com/blog/paulfremantle
  paul@wso2.com

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

Re: get(String url) issues for getting external resources

Posted by Paul Fremantle <pz...@gmail.com>.
How about this implementation of what you are describing.

1) Lets indirect this out of SynEnv:

SynapseEnvironment {
    ResourceHelper getResourceHelper();
}

public interface ResourceHelper {
    OMElement get(String uri); // get a resource
    OMElement get(String uri, ResourceUpdateAware mediator); // get a
resource and be notified of changes
    void registerResourceHandler(ResourceHandler rh, String urlRoot);
         // register a handler for a given set of URLs (which share the same
root)
    void notifyUpdate(String uriRoot);
         // a resource handler uses this to notify that all resources with
that root have changed (Resource Push model)
}

public interface ResourceHandler {
    OMElement get(String uri);

    void setProperty(String name, String value);
    String getProperty(String name);
    String[] getPropertyNames();

    boolean isUpdated(String uriRoot); // used to poll if resource has
changed (Pull model)
}

<synapse.xml>

<resource type="o.a.s.resources.HttpResource" uri-root="
http://fremantle.org/resources/">
   <property name="http.username">paul</property>
   <property name="http.password">pass</property>
   <property name="http.proxy">proxy:80</property>
</resource>

Paul



On 3/1/06, Soumadeep <so...@infravio.com> wrote:
>
> Paul is right, instead of passing an object we could have property files
> which will have the connection related data. Further, we can generalize the
> way the get method is implemented, what I mean is we can have an interface
> like ResourceHandler so that others can implement it as required ...
> something like LDAPResourceHandler implements ResourceHandler which will
> have a get method and depending on what was configured the resource will be
> fetched.
>
> We can put the property values in Synapse.xml, so you might end up having
> multiple resource endpoints with property sets required for making a
> connection, though we need to think about whether to provide the flexibility
> in terms of mediators being able to call different ResourceHandlers for a
> session.
>
> -Soumadeep
>
> -----Original Message-----
> *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> *Sent:* Tuesday, February 28, 2006 5:59 PM
> *To:* synapse-dev@ws.apache.org
> *Subject:* Re: get(String url) issues for getting external resources
>
> I think we should try to separate out the connection properties associated
> with a URI and the mediators knowledge. So in other words lets try to
> configure the mediator with the URI and the SynapseEnv with the
> certs/uids/proxies, etc.
>
> Paul
>
> On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> >
> > Hi Devs,
> >
> > I have written a document on "how to configure mediators get resources
> > via SSL connection".  This will address how to acquire resources from Axis2
> > repository which is deployed on Tomcat.
> >
> > Thank you
> >
> > Saminda
> >
> > On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
> > >
> > > On 2/27/06, Soumadeep <so...@infravio.com> wrote:
> > > >
> > > > Hi all,
> > > >
> > > > To fetch external resources using Axis2SynapseEnvironment's
> > > > get(String url)
> > > > wouldn't suffice I think. For secured resources we might have to
> > > > send the 1)
> > > > username/password http token or 2)WS Sec token or maybe 3)
> > > > certificates or
> > > > 4) we might also have to deal with enc/decryption.
> > >
> > >
> > > +1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
> > > uses HttpClient from commons-httpclient and it provides full support for
> > > HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
> > > to introduce authentication details we may need to insert  a bean into
> > > SynapseEnvironment.get(String) and we may have to change the signature
> > > as SynapseEnvironment.get(String url, Object authentication). This
> > > will allow to get authentication details from run time.
> > >
> > > More importantly, there might be a situation where the resource could
> > > > be
> > > > located in LDAP,Database or a file System.
> > >
> > >
> > > Yes.  We need to figure this out. IMHO this is can be considered as
> > > multiple issues.
> > >
> > > How do we handle situations where a parameter could be required by the
> > > >
> > > > resource server apart from what I have mentioned above? (HTTP GET
> > > > maybe the
> > > > only way out) but then there should be a way to configure what type
> > > > of
> > > > resource server it is and what details are required.
> > >
> > >
> > > REST like invocation is the most simple yet the powerful way of
> > > getting resources out a  repository.  So the  current implementation of
> > > SynapseEnviroment.get(String) would defiantly do that. We can
> > > integrate a very powerful lookup for this resources, if we uses Axis2's
> > > ServiceClient (Once Axis2-0.95 releases) REST invocation mechanism.
> > > But to  integrate this, we need to populate a Object and fill the right
> > > information.
> > >
> > > IMHO, i guess commons-httpclient addresses most of  the problems  with
> > > regular and ssl connection.
> > >
> > > Thank you
> > >
> > > Saminda
> > >
> > > Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
> > >
> > >
> > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > >
> > > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

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

RE: get(String url) issues for getting external resources

Posted by Soumadeep <so...@infravio.com>.
+1
  -----Original Message-----
  From: Paul Fremantle [mailto:pzfreo@gmail.com]
  Sent: Wednesday, March 01, 2006 3:35 PM
  To: synapse-dev@ws.apache.org
  Subject: Re: get(String url) issues for getting external resources


  How about this implementation of what you are describing.

  1) Lets indirect this out of SynEnv:

  public interface ResourceHelper {
      OMElement get(String uri);




  On 3/1/06, Soumadeep <so...@infravio.com> wrote:
    Paul is right, instead of passing an object we could have property files
which will have the connection related data. Further, we can generalize the
way the get method is implemented, what I mean is we can have an interface
like ResourceHandler so that others can implement it as required ...
something like LDAPResourceHandler implements ResourceHandler which will
have a get method and depending on what was configured the resource will be
fetched.

    We can put the property values in Synapse.xml, so you might end up
having multiple resource endpoints with property sets required for making a
connection, though we need to think about whether to provide the flexibility
in terms of mediators being able to call different ResourceHandlers for a
session.

    -Soumadeep
      -----Original Message-----
      From: Paul Fremantle [mailto:pzfreo@gmail.com]
      Sent: Tuesday, February 28, 2006 5:59 PM
      To: synapse-dev@ws.apache.org
      Subject: Re: get(String url) issues for getting external resources


      I think we should try to separate out the connection properties
associated with a URI and the mediators knowledge. So in other words lets
try to configure the mediator with the URI and the SynapseEnv with the
certs/uids/proxies, etc.

      Paul


      On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
        Hi Devs,

        I have written a document on "how to configure mediators get
resources via SSL connection".  This will address how to acquire resources
from Axis2 repository which is deployed on Tomcat.

        Thank you

        Saminda



        On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
          On 2/27/06, Soumadeep <so...@infravio.com> wrote:
            Hi all,

            To fetch external resources using Axis2SynapseEnvironment's
get(String url)
            wouldn't suffice I think. For secured resources we might have to
send the 1)
            username/password http token or 2)WS Sec token or maybe 3)
certificates or
            4) we might also have to deal with enc/decryption.

          +1.  The  underline  transport mechanism for
SynapesEnvironment.get(String) uses HttpClient from commons-httpclient and
it provides full support for HTTP over SSL [1]. Thus, with minimum effort we
can integrate it here. But to introduce authentication details we may need
to insert  a bean into SynapseEnvironment.get(String) and we may have to
change the signature as SynapseEnvironment.get(String url, Object
authentication). This will allow to get authentication details from run
time.


            More importantly, there might be a situation where the resource
could be
            located in LDAP,Database or a file System.

          Yes.  We need to figure this out. IMHO this is can be considered
as multiple issues.



            How do we handle situations where a parameter could be required
by the
            resource server apart from what I have mentioned above? (HTTP
GET maybe the
            only way out) but then there should be a way to configure what
type of
            resource server it is and what details are required.

          REST like invocation is the most simple yet the powerful way of
getting resources out a  repository.  So the  current implementation of
SynapseEnviroment.get(String) would defiantly do that. We can integrate a
very powerful lookup for this resources, if we uses Axis2's ServiceClient
(Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
this, we need to populate a Object and fill the right information.

          IMHO, i guess commons-httpclient addresses most of  the problems
with regular and ssl connection.

          Thank you

          Saminda

          Resources: [1].
http://jakarta.apache.org/commons/httpclient/sslguide.html






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







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






      --
      Paul Fremantle
      VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

      http://bloglines.com/blog/paulfremantle
      paul@wso2.com

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




  --
  Paul Fremantle
  VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

  http://bloglines.com/blog/paulfremantle
  paul@wso2.com

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

Re: get(String url) issues for getting external resources

Posted by Paul Fremantle <pz...@gmail.com>.
How about this implementation of what you are describing.

1) Lets indirect this out of SynEnv:

public interface ResourceHelper {
    OMElement get(String uri);



On 3/1/06, Soumadeep <so...@infravio.com> wrote:
>
> Paul is right, instead of passing an object we could have property files
> which will have the connection related data. Further, we can generalize the
> way the get method is implemented, what I mean is we can have an interface
> like ResourceHandler so that others can implement it as required ...
> something like LDAPResourceHandler implements ResourceHandler which will
> have a get method and depending on what was configured the resource will be
> fetched.
>
> We can put the property values in Synapse.xml, so you might end up having
> multiple resource endpoints with property sets required for making a
> connection, though we need to think about whether to provide the flexibility
> in terms of mediators being able to call different ResourceHandlers for a
> session.
>
> -Soumadeep
>
> -----Original Message-----
> *From:* Paul Fremantle [mailto:pzfreo@gmail.com]
> *Sent:* Tuesday, February 28, 2006 5:59 PM
> *To:* synapse-dev@ws.apache.org
> *Subject:* Re: get(String url) issues for getting external resources
>
> I think we should try to separate out the connection properties associated
> with a URI and the mediators knowledge. So in other words lets try to
> configure the mediator with the URI and the SynapseEnv with the
> certs/uids/proxies, etc.
>
> Paul
>
> On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> >
> > Hi Devs,
> >
> > I have written a document on "how to configure mediators get resources
> > via SSL connection".  This will address how to acquire resources from Axis2
> > repository which is deployed on Tomcat.
> >
> > Thank you
> >
> > Saminda
> >
> > On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
> > >
> > > On 2/27/06, Soumadeep <so...@infravio.com> wrote:
> > > >
> > > > Hi all,
> > > >
> > > > To fetch external resources using Axis2SynapseEnvironment's
> > > > get(String url)
> > > > wouldn't suffice I think. For secured resources we might have to
> > > > send the 1)
> > > > username/password http token or 2)WS Sec token or maybe 3)
> > > > certificates or
> > > > 4) we might also have to deal with enc/decryption.
> > >
> > >
> > > +1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
> > > uses HttpClient from commons-httpclient and it provides full support for
> > > HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
> > > to introduce authentication details we may need to insert  a bean into
> > > SynapseEnvironment.get(String) and we may have to change the signature
> > > as SynapseEnvironment.get(String url, Object authentication). This
> > > will allow to get authentication details from run time.
> > >
> > > More importantly, there might be a situation where the resource could
> > > > be
> > > > located in LDAP,Database or a file System.
> > >
> > >
> > > Yes.  We need to figure this out. IMHO this is can be considered as
> > > multiple issues.
> > >
> > > How do we handle situations where a parameter could be required by the
> > > >
> > > > resource server apart from what I have mentioned above? (HTTP GET
> > > > maybe the
> > > > only way out) but then there should be a way to configure what type
> > > > of
> > > > resource server it is and what details are required.
> > >
> > >
> > > REST like invocation is the most simple yet the powerful way of
> > > getting resources out a  repository.  So the  current implementation of
> > > SynapseEnviroment.get(String) would defiantly do that. We can
> > > integrate a very powerful lookup for this resources, if we uses Axis2's
> > > ServiceClient (Once Axis2-0.95 releases) REST invocation mechanism.
> > > But to  integrate this, we need to populate a Object and fill the right
> > > information.
> > >
> > > IMHO, i guess commons-httpclient addresses most of  the problems  with
> > > regular and ssl connection.
> > >
> > > Thank you
> > >
> > > Saminda
> > >
> > > Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
> > >
> > >
> > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > >
> > > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > > >
> > > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
> >
>
>
> --
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
>
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
>
> "Oxygenating the Web Service Platform", www.wso2.com
>
>


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

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

RE: get(String url) issues for getting external resources

Posted by Soumadeep <so...@infravio.com>.
Paul is right, instead of passing an object we could have property files
which will have the connection related data. Further, we can generalize the
way the get method is implemented, what I mean is we can have an interface
like ResourceHandler so that others can implement it as required ...
something like LDAPResourceHandler implements ResourceHandler which will
have a get method and depending on what was configured the resource will be
fetched.

We can put the property values in Synapse.xml, so you might end up having
multiple resource endpoints with property sets required for making a
connection, though we need to think about whether to provide the flexibility
in terms of mediators being able to call different ResourceHandlers for a
session.

-Soumadeep
  -----Original Message-----
  From: Paul Fremantle [mailto:pzfreo@gmail.com]
  Sent: Tuesday, February 28, 2006 5:59 PM
  To: synapse-dev@ws.apache.org
  Subject: Re: get(String url) issues for getting external resources


  I think we should try to separate out the connection properties associated
with a URI and the mediators knowledge. So in other words lets try to
configure the mediator with the URI and the SynapseEnv with the
certs/uids/proxies, etc.

  Paul


  On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
    Hi Devs,

    I have written a document on "how to configure mediators get resources
via SSL connection".  This will address how to acquire resources from Axis2
repository which is deployed on Tomcat.

    Thank you

    Saminda



    On 2/28/06, Saminda Abeyruwan < samindaa@gmail.com> wrote:
      On 2/27/06, Soumadeep <so...@infravio.com> wrote:
        Hi all,

        To fetch external resources using Axis2SynapseEnvironment's
get(String url)
        wouldn't suffice I think. For secured resources we might have to
send the 1)
        username/password http token or 2)WS Sec token or maybe 3)
certificates or
        4) we might also have to deal with enc/decryption.

      +1.  The  underline  transport mechanism for
SynapesEnvironment.get(String) uses HttpClient from commons-httpclient and
it provides full support for HTTP over SSL [1]. Thus, with minimum effort we
can integrate it here. But to introduce authentication details we may need
to insert  a bean into SynapseEnvironment.get(String) and we may have to
change the signature as SynapseEnvironment.get(String url, Object
authentication). This will allow to get authentication details from run
time.


        More importantly, there might be a situation where the resource
could be
        located in LDAP,Database or a file System.

      Yes.  We need to figure this out. IMHO this is can be considered as
multiple issues.



        How do we handle situations where a parameter could be required by
the
        resource server apart from what I have mentioned above? (HTTP GET
maybe the
        only way out) but then there should be a way to configure what type
of
        resource server it is and what details are required.

      REST like invocation is the most simple yet the powerful way of
getting resources out a  repository.  So the  current implementation of
SynapseEnviroment.get(String) would defiantly do that. We can integrate a
very powerful lookup for this resources, if we uses Axis2's ServiceClient
(Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
this, we need to populate a Object and fill the right information.

      IMHO, i guess commons-httpclient addresses most of  the problems  with
regular and ssl connection.

      Thank you

      Saminda

      Resources: [1].
http://jakarta.apache.org/commons/httpclient/sslguide.html






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







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






  --
  Paul Fremantle
  VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

  http://bloglines.com/blog/paulfremantle
  paul@wso2.com

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

Re: get(String url) issues for getting external resources

Posted by Paul Fremantle <pz...@gmail.com>.
I think we should try to separate out the connection properties associated
with a URI and the mediators knowledge. So in other words lets try to
configure the mediator with the URI and the SynapseEnv with the
certs/uids/proxies, etc.

Paul

On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
>
> Hi Devs,
>
> I have written a document on "how to configure mediators get resources via
> SSL connection".  This will address how to acquire resources from Axis2
> repository which is deployed on Tomcat.
>
> Thank you
>
> Saminda
>
> On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
> >
> > On 2/27/06, Soumadeep <so...@infravio.com> wrote:
> > >
> > > Hi all,
> > >
> > > To fetch external resources using Axis2SynapseEnvironment's get(String
> > > url)
> > > wouldn't suffice I think. For secured resources we might have to send
> > > the 1)
> > > username/password http token or 2)WS Sec token or maybe 3)
> > > certificates or
> > > 4) we might also have to deal with enc/decryption.
> >
> >
> > +1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
> > uses HttpClient from commons-httpclient and it provides full support for
> > HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
> > to introduce authentication details we may need to insert  a bean into
> > SynapseEnvironment.get(String) and we may have to change the signature
> > as SynapseEnvironment.get(String url, Object authentication). This will
> > allow to get authentication details from run time.
> >
> > More importantly, there might be a situation where the resource could be
> > >
> > > located in LDAP,Database or a file System.
> >
> >
> > Yes.  We need to figure this out. IMHO this is can be considered as
> > multiple issues.
> >
> > How do we handle situations where a parameter could be required by the
> > > resource server apart from what I have mentioned above? (HTTP GET
> > > maybe the
> > > only way out) but then there should be a way to configure what type of
> > > resource server it is and what details are required.
> >
> >
> > REST like invocation is the most simple yet the powerful way of  getting
> > resources out a  repository.  So the  current implementation of
> > SynapseEnviroment.get(String) would defiantly do that. We can integrate
> > a very powerful lookup for this resources, if we uses Axis2's ServiceClient
> > (Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
> > this, we need to populate a Object and fill the right information.
> >
> > IMHO, i guess commons-httpclient addresses most of  the problems  with
> > regular and ssl connection.
> >
> > Thank you
> >
> > Saminda
> >
> > Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
> >
> >
> >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> > >
> > >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>
>


--
Paul Fremantle
VP/Technology, WSO2 and OASIS WS-RX TC Co-chair

http://bloglines.com/blog/paulfremantle
paul@wso2.com

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

Re: get(String url) issues for getting external resources

Posted by Saminda Abeyruwan <sa...@gmail.com>.
Hi Devs,

I have written a document on "how to configure mediators get resources via
SSL connection".  This will address how to acquire resources from Axis2
repository which is deployed on Tomcat.

Thank you

Saminda

On 2/28/06, Saminda Abeyruwan <sa...@gmail.com> wrote:
>
> On 2/27/06, Soumadeep <so...@infravio.com> wrote:
> >
> > Hi all,
> >
> > To fetch external resources using Axis2SynapseEnvironment's get(String
> > url)
> > wouldn't suffice I think. For secured resources we might have to send
> > the 1)
> > username/password http token or 2)WS Sec token or maybe 3) certificates
> > or
> > 4) we might also have to deal with enc/decryption.
>
>
> +1.  The  underline  transport mechanism for SynapesEnvironment.get(String)
> uses HttpClient from commons-httpclient and it provides full support for
> HTTP over SSL [1]. Thus, with minimum effort we can integrate it here. But
> to introduce authentication details we may need to insert  a bean into
> SynapseEnvironment.get(String) and we may have to change the signature as
> SynapseEnvironment.get(String url, Object authentication). This will allow
> to get authentication details from run time.
>
> More importantly, there might be a situation where the resource could be
> > located in LDAP,Database or a file System.
>
>
> Yes.  We need to figure this out. IMHO this is can be considered as
> multiple issues.
>
> How do we handle situations where a parameter could be required by the
> > resource server apart from what I have mentioned above? (HTTP GET maybe
> > the
> > only way out) but then there should be a way to configure what type of
> > resource server it is and what details are required.
>
>
> REST like invocation is the most simple yet the powerful way of  getting
> resources out a  repository.  So the  current implementation of
> SynapseEnviroment.get(String) would defiantly do that. We can integrate a
> very powerful lookup for this resources, if we uses Axis2's ServiceClient
> (Once Axis2-0.95 releases) REST invocation mechanism. But to  integrate
> this, we need to populate a Object and fill the right information.
>
> IMHO, i guess commons-httpclient addresses most of  the problems  with
> regular and ssl connection.
>
> Thank you
>
> Saminda
>
> Resources: [1]. http://jakarta.apache.org/commons/httpclient/sslguide.html
>
>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: synapse-dev-help@ws.apache.org
> >
> >
>