You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Srinath Perera <he...@gmail.com> on 2006/02/24 22:13:36 UTC

[Axis2]Q on Policy

Hi All;

Do we have a code that given a WSDL file/ WSDL discription create a
policy populated
Context Hierachy/AxisService? If yes .. please name the exact laocation

Thanks
Srinath

--
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Re: [Axis2]Q on Policy

Posted by Srinath Perera <he...@gmail.com>.
If AttachmentUtil is based on WOM and ServiceBuilder has nothing to do
with WOM, that means AttachmentUtil logic is replicated in
ServiceBuilder .. we should have AttachmentUtil marked for refactoring
Srinath

On 3/1/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> On Wed, 2006-03-01 at 16:06 -0500, Srinath Perera wrote:
> > > > then there is PolicyAttachmentUtil which is related
> > > Its already used by AxisServiceBuilder isn't it??
> > No, it is based on WOM, and used by code generation modules
> >
> > In my mail *it* means PolicyAttachmentUtil not AxisServiceBuilder.
>
> What's the problem with PolicyAttachmentUtil using WOM? That's purely an
> internal utility to implement WS-PolicyAttachment against WSDL.
>
> Sanjiva.
>
>


--
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Re: [Axis2]Q on Policy

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Wed, 2006-03-01 at 16:06 -0500, Srinath Perera wrote:
> > > then there is PolicyAttachmentUtil which is related
> > Its already used by AxisServiceBuilder isn't it??
> No, it is based on WOM, and used by code generation modules
> 
> In my mail *it* means PolicyAttachmentUtil not AxisServiceBuilder.

What's the problem with PolicyAttachmentUtil using WOM? That's purely an
internal utility to implement WS-PolicyAttachment against WSDL.

Sanjiva.


Re: [Axis2]Q on Policy

Posted by Srinath Perera <he...@gmail.com>.
> > then there is PolicyAttachmentUtil which is related
> Its already used by AxisServiceBuilder isn't it??
No, it is based on WOM, and used by code generation modules

In my mail *it* means PolicyAttachmentUtil not AxisServiceBuilder.

Will talk ti Sanka :)

Srinath



On 2/28/06, Deepal Jayasinghe <de...@opensource.lk> wrote:
> Hi Srinath;
>
> I dont think that AxisServiceBuilder uses WOM inside it and only two
> places that we use WOM is
>   1. Codegeneration
>   2. Java2WSDL generation
>
> Regarding policy , I think the best person in Sanka he is the one who
> did all the policy stuff :)
>
>
>
> Srinath Perera wrote:
>
> >On 2/27/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> >
> >
> >>On Mon, 2006-02-27 at 15:26 -0500, Srinath Perera wrote:
> >>
> >>
> >>>One more thing, I am get a feeling that code o create a AxisService
> >>>from WSDL and policy support are scattered
> >>>
> >>>1. AxisServiceBuilder (Based on WSDL4J .. with policy)
> >>>2. ClientUtils.creatAxisService(.......) (Based on WSDL4J . without policy)
> >>>
> >>>
> >>These two need to do exactly the function; that is- they both must
> >>respect the policy stuff and not just ignore it! I suggest merging these
> >>two into one method in AxisServiceBuilder.
> >>
> >>
> >>
> >>>3. WSDLBasedServiceConfigurationBuilder (Based on WOM) .. which is my doing
> >>>
> >>>
> >>I think what you need to do is write some logic in ServiceClient
> >>(ConfigContext, AxisService) to engage the right stuff based on policies
> >>in the AxisService. If AxisServiceBuilder does all the policy stuff
> >>beforehand then the policy work is already done! I don't see why you
> >>should be doing another approach based on WOM ..
> >>
> >>
> >+1
> >
> >
> >
> >
> >>>then there is PolicyAttachmentUtil which is related
> >>>
> >>>
> >>Its already used by AxisServiceBuilder isn't it??
> >>
> >>
> >No, it is based on WOM, and used by code generation modules
> >
> >my head spins, trying to figure how the policy is handled ;).
> >hopefully there are no more hidden suprises. I think we need sanka and
> >deepal to merge the heads togeter to sort this out
> >
> >Srinath
> >
> >--
> >============================
> >Srinath Perera:
> >   http://www.cs.indiana.edu/~hperera/
> >   http://www.bloglines.com/blog/hemapani
> >
> >
> >
> >
>
> --
> Thanks,
> Deepal
> ................................................................
> ~Future is Open~
>
>
>


--
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Re: [Axis2]Q on Policy

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Srinath;

I dont think that AxisServiceBuilder uses WOM inside it and only two
places that we use WOM is
  1. Codegeneration
  2. Java2WSDL generation

Regarding policy , I think the best person in Sanka he is the one who
did all the policy stuff :)



Srinath Perera wrote:

>On 2/27/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
>  
>
>>On Mon, 2006-02-27 at 15:26 -0500, Srinath Perera wrote:
>>    
>>
>>>One more thing, I am get a feeling that code o create a AxisService
>>>from WSDL and policy support are scattered
>>>
>>>1. AxisServiceBuilder (Based on WSDL4J .. with policy)
>>>2. ClientUtils.creatAxisService(.......) (Based on WSDL4J . without policy)
>>>      
>>>
>>These two need to do exactly the function; that is- they both must
>>respect the policy stuff and not just ignore it! I suggest merging these
>>two into one method in AxisServiceBuilder.
>>
>>    
>>
>>>3. WSDLBasedServiceConfigurationBuilder (Based on WOM) .. which is my doing
>>>      
>>>
>>I think what you need to do is write some logic in ServiceClient
>>(ConfigContext, AxisService) to engage the right stuff based on policies
>>in the AxisService. If AxisServiceBuilder does all the policy stuff
>>beforehand then the policy work is already done! I don't see why you
>>should be doing another approach based on WOM ..
>>    
>>
>+1
>
>
>  
>
>>>then there is PolicyAttachmentUtil which is related
>>>      
>>>
>>Its already used by AxisServiceBuilder isn't it??
>>    
>>
>No, it is based on WOM, and used by code generation modules
>
>my head spins, trying to figure how the policy is handled ;).
>hopefully there are no more hidden suprises. I think we need sanka and
>deepal to merge the heads togeter to sort this out
>
>Srinath
>
>--
>============================
>Srinath Perera:
>   http://www.cs.indiana.edu/~hperera/
>   http://www.bloglines.com/blog/hemapani
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



Re: [Axis2]Q on Policy

Posted by Srinath Perera <he...@gmail.com>.
On 2/27/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> On Mon, 2006-02-27 at 15:26 -0500, Srinath Perera wrote:
> > One more thing, I am get a feeling that code o create a AxisService
> > from WSDL and policy support are scattered
> >
> > 1. AxisServiceBuilder (Based on WSDL4J .. with policy)
> > 2. ClientUtils.creatAxisService(.......) (Based on WSDL4J . without policy)
>
> These two need to do exactly the function; that is- they both must
> respect the policy stuff and not just ignore it! I suggest merging these
> two into one method in AxisServiceBuilder.
>
> > 3. WSDLBasedServiceConfigurationBuilder (Based on WOM) .. which is my doing
>
> I think what you need to do is write some logic in ServiceClient
> (ConfigContext, AxisService) to engage the right stuff based on policies
> in the AxisService. If AxisServiceBuilder does all the policy stuff
> beforehand then the policy work is already done! I don't see why you
> should be doing another approach based on WOM ..
+1


> > then there is PolicyAttachmentUtil which is related
>
> Its already used by AxisServiceBuilder isn't it??
No, it is based on WOM, and used by code generation modules

my head spins, trying to figure how the policy is handled ;).
hopefully there are no more hidden suprises. I think we need sanka and
deepal to merge the heads togeter to sort this out

Srinath

--
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Re: [Axis2]Q on Policy

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Wed, 2006-03-01 at 16:10 -0500, Srinath Perera wrote:
> > The logic is already there in the stubs which we generate given  a WSDL
> > with policy attachment. We need to move that to ServiceClient.
> Can you point me to the code that implement the logic? (That is the Q
> I want answer for when I start this thread :) ). Does that code work
> on WOM or AxisService? If it work on WOM we have to rewrite it

If you take a WSDL with policy stuff and codegen from it you should see
how it works. The generated code doesn't have WOM directly; it uses code
that has WOM but that does not have to be rewritten (per my earlier
email).

Thanks for your persistence in discovering the details .. we clearly
have to find a way to get this stuff written down ..

Sanjiva.



Re: [Axis2]Q on Policy

Posted by Srinath Perera <he...@gmail.com>.
Hi Sanka;
> > I think what you need to do is write some logic in ServiceClient
> > (ConfigContext, AxisService) to engage the right stuff based on policies
> > in the AxisService.
> +1
>
> The logic is already there in the stubs which we generate given  a WSDL
> with policy attachment. We need to move that to ServiceClient.
Can you point me to the code that implement the logic? (That is the Q
I want answer for when I start this thread :) ). Does that code work
on WOM or AxisService? If it work on WOM we have to rewrite it

Srinath

Re: [Axis2]Q on Policy

Posted by Sanka Samaranayke <ss...@gmail.com>.
Hi Guys,

-- sorry for the late reply


Sanjiva Weerawarana wrote:
> On Mon, 2006-02-27 at 15:26 -0500, Srinath Perera wrote:
>   
>> One more thing, I am get a feeling that code o create a AxisService
>> from WSDL and policy support are scattered
>>
>> 1. AxisServiceBuilder (Based on WSDL4J .. with policy)
>> 2. ClientUtils.creatAxisService(.......) (Based on WSDL4J . without policy)
>>     
>
> These two need to do exactly the function; that is- they both must
> respect the policy stuff and not just ignore it! I suggest merging these
> two into one method in AxisServiceBuilder.
>   
+1

I'll fix it.
>   
>> 3. WSDLBasedServiceConfigurationBuilder (Based on WOM) .. which is my doing
>>     
>
> I think what you need to do is write some logic in ServiceClient
> (ConfigContext, AxisService) to engage the right stuff based on policies
> in the AxisService.
+1

The logic is already there in the stubs which we generate given  a WSDL
with policy attachment. We need to move that to ServiceClient.

>  If AxisServiceBuilder does all the policy stuff
> beforehand then the policy work is already done! I don't see why you
> should be doing another approach based on WOM .. 
>   
+1 !!
>   
>> then there is PolicyAttachmentUtil which is related
>>     
>
> Its already used by AxisServiceBuilder isn't it??
>
>   
>> may be we need to refactor them (as much as possible)
>>     
>
> +1 .. I think merging (1) & (2) is definitely in order.
>   
+ 1!!

 I'll look into it soon.

Sanka
> Sanjiva.
>
>
>   


Re: [Axis2]Q on Policy

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Mon, 2006-02-27 at 15:26 -0500, Srinath Perera wrote:
> One more thing, I am get a feeling that code o create a AxisService
> from WSDL and policy support are scattered
> 
> 1. AxisServiceBuilder (Based on WSDL4J .. with policy)
> 2. ClientUtils.creatAxisService(.......) (Based on WSDL4J . without policy)

These two need to do exactly the function; that is- they both must
respect the policy stuff and not just ignore it! I suggest merging these
two into one method in AxisServiceBuilder.

> 3. WSDLBasedServiceConfigurationBuilder (Based on WOM) .. which is my doing

I think what you need to do is write some logic in ServiceClient
(ConfigContext, AxisService) to engage the right stuff based on policies
in the AxisService. If AxisServiceBuilder does all the policy stuff
beforehand then the policy work is already done! I don't see why you
should be doing another approach based on WOM .. 

> then there is PolicyAttachmentUtil which is related

Its already used by AxisServiceBuilder isn't it??

> may be we need to refactor them (as much as possible)

+1 .. I think merging (1) & (2) is definitely in order.

Sanjiva.


Re: [Axis2]Q on Policy

Posted by Srinath Perera <he...@gmail.com>.
One more thing, I am get a feeling that code o create a AxisService
from WSDL and policy support are scattered

1. AxisServiceBuilder (Based on WSDL4J .. with policy)
2. ClientUtils.creatAxisService(.......) (Based on WSDL4J . without policy)
3. WSDLBasedServiceConfigurationBuilder (Based on WOM) .. which is my doing

then there is PolicyAttachmentUtil which is related

may be we need to refactor them (as much as possible)

Srinath




On 2/27/06, Srinath Perera <he...@gmail.com> wrote:
> It seems AxisServiceBuilder create a policy popuated AxisService given a WSDL.
> If so I can use that for the ServiceClient level policy support.
>
> Srinath
>
>
> On 2/26/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> > On Sat, 2006-02-25 at 20:06 -0600, Deepal Jayasinghe wrote:
> > > Hi Srinath;
> > >
> > > What I said was there is a class called AxisServiceBuilder and if you
> > > are given a WSDL which has policy in it then that guy will populate
> > > AxisService for that given policy, the missing part is using that policy
> > > some one has to engage modules.
> > >
> > > I think Ajith and Sanaka has done some coding in the client side to do
> > > so , if we can borrow those code create an AxisService using given wsld
> > > then I think we have wt we want.
> > >
> > > comments  ......
> >
> > This needs to be done in ServiceClient right? Because until then the
> > config context isn't there and the config context is what has the info
> > about available modules etc..
> >
> > Sanjiva.
> >
> >
>
>
> --
> ============================
> Srinath Perera:
>    http://www.cs.indiana.edu/~hperera/
>    http://www.bloglines.com/blog/hemapani
>


--
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Re: [Axis2]Q on Policy

Posted by Srinath Perera <he...@gmail.com>.
It seems AxisServiceBuilder create a policy popuated AxisService given a WSDL.
If so I can use that for the ServiceClient level policy support.

Srinath


On 2/26/06, Sanjiva Weerawarana <sa...@opensource.lk> wrote:
> On Sat, 2006-02-25 at 20:06 -0600, Deepal Jayasinghe wrote:
> > Hi Srinath;
> >
> > What I said was there is a class called AxisServiceBuilder and if you
> > are given a WSDL which has policy in it then that guy will populate
> > AxisService for that given policy, the missing part is using that policy
> > some one has to engage modules.
> >
> > I think Ajith and Sanaka has done some coding in the client side to do
> > so , if we can borrow those code create an AxisService using given wsld
> > then I think we have wt we want.
> >
> > comments  ......
>
> This needs to be done in ServiceClient right? Because until then the
> config context isn't there and the config context is what has the info
> about available modules etc..
>
> Sanjiva.
>
>


--
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Re: [Axis2]Q on Policy

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sat, 2006-02-25 at 20:06 -0600, Deepal Jayasinghe wrote:
> Hi Srinath;
> 
> What I said was there is a class called AxisServiceBuilder and if you
> are given a WSDL which has policy in it then that guy will populate
> AxisService for that given policy, the missing part is using that policy
> some one has to engage modules.
> 
> I think Ajith and Sanaka has done some coding in the client side to do
> so , if we can borrow those code create an AxisService using given wsld
> then I think we have wt we want.
> 
> comments  ......

This needs to be done in ServiceClient right? Because until then the
config context isn't there and the config context is what has the info
about available modules etc..

Sanjiva.


Re: [Axis2]Q on Policy

Posted by Deepal Jayasinghe <de...@opensource.lk>.
Hi Srinath;

What I said was there is a class called AxisServiceBuilder and if you
are given a WSDL which has policy in it then that guy will populate
AxisService for that given policy, the missing part is using that policy
some one has to engage modules.

I think Ajith and Sanaka has done some coding in the client side to do
so , if we can borrow those code create an AxisService using given wsld
then I think we have wt we want.

comments  ......

Srinath Perera wrote:

>>Context hierarchy? That doesn't make sense.
>>    
>>
>+1
>
>  
>
>>AxisService - yes .. I thought that's what you were writing!!!! Code
>>that takes a WSDL and populates an AxisService with the right stuff in
>>it. I had it viewed as part of ServiceClient(WSDL) constructor (which
>>IIRC you were working on to support policy properly!).
>>    
>>
>
>Oh :) .. will do that .. from what deepal said I get a impression that
>code is already there  and thought should not repeat the code.
>Thanks
>Srinath
>
>--
>============================
>Srinath Perera:
>   http://www.cs.indiana.edu/~hperera/
>   http://www.bloglines.com/blog/hemapani
>
>
>  
>

-- 
Thanks,
Deepal
................................................................
~Future is Open~ 



Re: [Axis2]Q on Policy

Posted by Srinath Perera <he...@gmail.com>.
> Context hierarchy? That doesn't make sense.
+1

> AxisService - yes .. I thought that's what you were writing!!!! Code
> that takes a WSDL and populates an AxisService with the right stuff in
> it. I had it viewed as part of ServiceClient(WSDL) constructor (which
> IIRC you were working on to support policy properly!).

Oh :) .. will do that .. from what deepal said I get a impression that
code is already there  and thought should not repeat the code.
Thanks
Srinath

--
============================
Srinath Perera:
   http://www.cs.indiana.edu/~hperera/
   http://www.bloglines.com/blog/hemapani

Re: [Axis2]Q on Policy

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Fri, 2006-02-24 at 16:13 -0500, Srinath Perera wrote:
> Hi All;
> 
> Do we have a code that given a WSDL file/ WSDL discription create a
> policy populated
> Context Hierachy/AxisService? If yes .. please name the exact laocation

Context hierarchy? That doesn't make sense.

AxisService - yes .. I thought that's what you were writing!!!! Code
that takes a WSDL and populates an AxisService with the right stuff in
it. I had it viewed as part of ServiceClient(WSDL) constructor (which
IIRC you were working on to support policy properly!).

Sanjiva.