You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by nprabakaran <pr...@cognizant.com> on 2010/07/02 08:44:12 UTC

securing webservice using ws-policy or ws-securitypolicy

Hi

I want to secure a webservice using ws-policy (security policy) using CXF. 
Can you please share releavant documentation or code ?

Thanks
Prabakaran.N

-- 
View this message in context: http://old.nabble.com/securing-webservice-using-ws-policy-or-ws-securitypolicy-tp29052676p29052676.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: securing webservice using ws-policy or ws-securitypolicy

Posted by Glen Mazza <gl...@gmail.com>.
Link #8 here: http://www.jroller.com/gmazza/entry/blog_article_index
CXF docs: http://cxf.apache.org/docs/ws-securitypolicy.html

HTH,
Glen


nprabakaran wrote:
> 
> Hi
> 
> I want to secure a webservice using ws-policy (security policy) using CXF. 
> Can you please share releavant documentation or code ?
> 
> Thanks
> Prabakaran.N
> 
> 

-- 
View this message in context: http://old.nabble.com/securing-webservice-using-ws-policy-or-ws-securitypolicy-tp29052676p29062024.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: securing webservice using ws-policy or ws-securitypolicy

Posted by Juan Pablo Pizarro <ju...@gmail.com>.
Thanks!, I will see it tonight!



2010/10/21 Dennis Sosnoski <dm...@sosnoski.com>

> Hi Juan,
>
> You can take a look over my article and sample code for basic security
> handling in CXF at:
> http://www.ibm.com/developerworks/java/library/j-jws13.html
>
>  - Dennis
>
> Dennis M. Sosnoski
> XML and Web Services in Java
> Training and Consulting
> http://www.sosnoski.com - http://www.sosnoski.co.nz
> Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117
>
>
> On 10/22/2010 08:08 AM, Juan Pablo Pizarro wrote:
> > Hello Denis, I'm a newbie on web services. I'm trying to use CXF to
> generate
> > a secured client and it throws a exception. I suppose that is the
> > certificate configuration or something like that. Could you please give
> me a
> > url or a tutorial to learn how can i make my secured client?
> >
> > Thanks,
> >
> > JP
> >
> >
> >
> >
> >
> > 2010/10/21 siuyab <ba...@es.aau.dk>
> >
> >
> >> Hi Denis,
> >>
> >> Thank you for your response. Indeed it was the key to solve my problem.
> >> Although I had to face other problems, but finally it works :)
> >>
> >> -bayu-
> >> --
> >> View this message in context:
> >>
> http://cxf.547215.n5.nabble.com/securing-webservice-using-ws-policy-or-ws-securitypolicy-tp568195p3230909.html
> >> Sent from the cxf-user mailing list archive at Nabble.com.
> >>
> >>
> >
>

Re: securing webservice using ws-policy or ws-securitypolicy

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Hi Juan,

You can take a look over my article and sample code for basic security
handling in CXF at:
http://www.ibm.com/developerworks/java/library/j-jws13.html

  - Dennis

Dennis M. Sosnoski
XML and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117


On 10/22/2010 08:08 AM, Juan Pablo Pizarro wrote:
> Hello Denis, I'm a newbie on web services. I'm trying to use CXF to generate
> a secured client and it throws a exception. I suppose that is the
> certificate configuration or something like that. Could you please give me a
> url or a tutorial to learn how can i make my secured client?
>
> Thanks,
>
> JP
>
>
>
>
>
> 2010/10/21 siuyab <ba...@es.aau.dk>
>
>   
>> Hi Denis,
>>
>> Thank you for your response. Indeed it was the key to solve my problem.
>> Although I had to face other problems, but finally it works :)
>>
>> -bayu-
>> --
>> View this message in context:
>> http://cxf.547215.n5.nabble.com/securing-webservice-using-ws-policy-or-ws-securitypolicy-tp568195p3230909.html
>> Sent from the cxf-user mailing list archive at Nabble.com.
>>
>>     
>   

Re: securing webservice using ws-policy or ws-securitypolicy

Posted by Juan Pablo Pizarro <ju...@gmail.com>.
Hello Denis, I'm a newbie on web services. I'm trying to use CXF to generate
a secured client and it throws a exception. I suppose that is the
certificate configuration or something like that. Could you please give me a
url or a tutorial to learn how can i make my secured client?

Thanks,

JP





2010/10/21 siuyab <ba...@es.aau.dk>

>
> Hi Denis,
>
> Thank you for your response. Indeed it was the key to solve my problem.
> Although I had to face other problems, but finally it works :)
>
> -bayu-
> --
> View this message in context:
> http://cxf.547215.n5.nabble.com/securing-webservice-using-ws-policy-or-ws-securitypolicy-tp568195p3230909.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>

Re: securing webservice using ws-policy or ws-securitypolicy

Posted by siuyab <ba...@es.aau.dk>.
Hi Denis,

Thank you for your response. Indeed it was the key to solve my problem.
Although I had to face other problems, but finally it works :)

-bayu-
-- 
View this message in context: http://cxf.547215.n5.nabble.com/securing-webservice-using-ws-policy-or-ws-securitypolicy-tp568195p3230909.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: securing webservice using ws-policy or ws-securitypolicy

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
Hi Bayu,

I suspect at least part of your problem may be the need for a WSDL
document with policy information to properly configure the client. The
JaxWsProxyFactoryBean class has a wsdlURL property - have you tried
using that to pass the URL of the WSDL (or you can try wsdlLocation,
which might be a file path - since the documentation doesn't say)?

  - Dennis

Dennis M. Sosnoski
XML and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117


On 10/21/2010 10:45 PM, siuyab wrote:
> Hi Dennis,
>
> I am very new to web service and thus the ws-securitypolicy. I have a task
> in a project where I have to implement authentication in an ongoing work
> which is based on web service. I tried to re-create a project based on your
> example codes (username & password tokens) and everything works fine. But
> when I tried to implement the same thing in my project, the callback-handler
> class which I created was never called although I have used the same
> libraries, do all procedure to modify the wsdl file and cxf-servlet.xml at
> server side, adding username and password in client side, and create
> callback-handler class at server side. The only difference is that I use
> "JaxWsProxyFactoryBean" at the client side to create stub.. 
>
> Do you or any body has else any clue what I might miss in this case? Any
> help is really appreciated. Thank you in advance.
>
> /bayu
>   

Re: securing webservice using ws-policy or ws-securitypolicy

Posted by siuyab <ba...@es.aau.dk>.
Hi Dennis,

I am very new to web service and thus the ws-securitypolicy. I have a task
in a project where I have to implement authentication in an ongoing work
which is based on web service. I tried to re-create a project based on your
example codes (username & password tokens) and everything works fine. But
when I tried to implement the same thing in my project, the callback-handler
class which I created was never called although I have used the same
libraries, do all procedure to modify the wsdl file and cxf-servlet.xml at
server side, adding username and password in client side, and create
callback-handler class at server side. The only difference is that I use
"JaxWsProxyFactoryBean" at the client side to create stub.. 

Do you or any body has else any clue what I might miss in this case? Any
help is really appreciated. Thank you in advance.

/bayu
-- 
View this message in context: http://cxf.547215.n5.nabble.com/securing-webservice-using-ws-policy-or-ws-securitypolicy-tp568195p3230167.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: securing webservice using ws-policy or ws-securitypolicy

Posted by Dennis Sosnoski <dm...@sosnoski.com>.
The article http://www.ibm.com/developerworks/java/library/j-jws13.html 
shows how to secure web services with WS-Policy/WS-SecurityPolicy using 
CXF, with the sample code available for download. Other articles in the 
series cover CXF security performance compared to Axis2 and Metro, and 
WS-SecureConversation in CXF, along with other topics.

  - Dennis

Dennis M. Sosnoski
XML and Web Services in Java
Training and Consulting
http://www.sosnoski.com - http://www.sosnoski.co.nz
Seattle, WA +1-425-939-0576 - Wellington, NZ +64-4-298-6117



nprabakaran wrote:
> Hi
>
> I want to secure a webservice using ws-policy (security policy) using CXF. 
> Can you please share releavant documentation or code ?
>
> Thanks
> Prabakaran.N
>
>