<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Apache CXF Tutorial &#8211; WS-Security with Spring</title>
	<atom:link href="http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/</link>
	<description>The software development weblog of Benjamin McCann.</description>
	<lastBuildDate>Sun, 21 Mar 2010 13:30:26 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bart Ottenkamp</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-20528</link>
		<dc:creator>Bart Ottenkamp</dc:creator>
		<pubDate>Tue, 09 Feb 2010 11:30:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-20528</guid>
		<description>Hi Ben..

great writing and I got almost everything working...
One thing though: if I set uo de thes ecurity like you explain, I get while calling the service:

com.company.auth.service.ServerPasswordCallback cannot be cast to java.lang.String

And I don&#039;t see what&#039;s happening...
Do you have a clue?</description>
		<content:encoded><![CDATA[<p>Hi Ben..</p>
<p>great writing and I got almost everything working&#8230;<br />
One thing though: if I set uo de thes ecurity like you explain, I get while calling the service:</p>
<p>com.company.auth.service.ServerPasswordCallback cannot be cast to java.lang.String</p>
<p>And I don&#8217;t see what&#8217;s happening&#8230;<br />
Do you have a clue?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stalin Mohapatra</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-20331</link>
		<dc:creator>Stalin Mohapatra</dc:creator>
		<pubDate>Fri, 05 Feb 2010 06:47:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-20331</guid>
		<description>Hi Ben...

This tutorial was of immense help. I did learn a few new things. Keep up the good work and help beginners like us.</description>
		<content:encoded><![CDATA[<p>Hi Ben&#8230;</p>
<p>This tutorial was of immense help. I did learn a few new things. Keep up the good work and help beginners like us.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jerome bulanadi</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-16954</link>
		<dc:creator>jerome bulanadi</dc:creator>
		<pubDate>Thu, 12 Nov 2009 21:30:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-16954</guid>
		<description>Hi Ben,

Thanks a lot for the previous tutorial, and this security tutorial. It got me up and running CXF on Tomcat in no time.

Hi Dipesh,

Thanks too, for your handling of wrong client password. It saved me a lot of time searching over CXF documentation.

You dudes rock!</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>Thanks a lot for the previous tutorial, and this security tutorial. It got me up and running CXF on Tomcat in no time.</p>
<p>Hi Dipesh,</p>
<p>Thanks too, for your handling of wrong client password. It saved me a lot of time searching over CXF documentation.</p>
<p>You dudes rock!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-16567</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Mon, 02 Nov 2009 16:36:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-16567</guid>
		<description>Hi David, I&#039;m sorry, but I don&#039;t have the code for this tutorial still.</description>
		<content:encoded><![CDATA[<p>Hi David, I&#8217;m sorry, but I don&#8217;t have the code for this tutorial still.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: david</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-16495</link>
		<dc:creator>david</dc:creator>
		<pubDate>Sun, 01 Nov 2009 01:44:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-16495</guid>
		<description>Hi Ben,
Is it possible to have the completed project in a zip file. I could not run the client with my limited spring background.
Also when I use the web services explorer, no matter what password I provide, I get the service executed.</description>
		<content:encoded><![CDATA[<p>Hi Ben,<br />
Is it possible to have the completed project in a zip file. I could not run the client with my limited spring background.<br />
Also when I use the web services explorer, no matter what password I provide, I get the service executed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ben</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-14786</link>
		<dc:creator>Ben</dc:creator>
		<pubDate>Tue, 22 Sep 2009 17:46:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-14786</guid>
		<description>Hi Manoj,
cxf-extension-soap.xml and cxf-servlet.xml come from the jar files.  You do not need to create them yourself</description>
		<content:encoded><![CDATA[<p>Hi Manoj,<br />
cxf-extension-soap.xml and cxf-servlet.xml come from the jar files.  You do not need to create them yourself</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Manoj</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-14771</link>
		<dc:creator>Manoj</dc:creator>
		<pubDate>Tue, 22 Sep 2009 08:38:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-14771</guid>
		<description>Hi Ben,

Can you tell me where from this &quot;cxf-extension-soap.xml&quot; and &#039;cxf-servlet.xml&quot; have come as you have not mentioned any where about these files.


  
  

What should i write in these files?

Manoj</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>Can you tell me where from this &#8220;cxf-extension-soap.xml&#8221; and &#8216;cxf-servlet.xml&#8221; have come as you have not mentioned any where about these files.</p>
<p>What should i write in these files?</p>
<p>Manoj</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DeKapx</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-9219</link>
		<dc:creator>DeKapx</dc:creator>
		<pubDate>Mon, 27 Apr 2009 05:38:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-9219</guid>
		<description>Hi Ben,

In addition to my previous comment, there is one scenario in our application. We have Metro based WS-Security enabled web service and its implementation is based on WS-Security using Symmetric Keys. I am trying to hit the service using Apache CXF client but its not working. Is there any compatibility issues with these technologies or is there any way out for this. 

DeKapx</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>In addition to my previous comment, there is one scenario in our application. We have Metro based WS-Security enabled web service and its implementation is based on WS-Security using Symmetric Keys. I am trying to hit the service using Apache CXF client but its not working. Is there any compatibility issues with these technologies or is there any way out for this. </p>
<p>DeKapx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DeKapx</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-9217</link>
		<dc:creator>DeKapx</dc:creator>
		<pubDate>Mon, 27 Apr 2009 05:24:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-9217</guid>
		<description>Hi Ben,

This is really a very good tutorial. Sometimes back I explore WS-Security using Metro - WSIT. There &#039;re multiple types of WS-Security can be created using Metro for example:
1. Message Security using Mutual Certificate
2. Message Security using Symmetric Keys.

and few more. Is there any possibility to create such types of WS-Security using Apache CXF. Any information on this will be a great help.

Thanks in advance.
DeKapx</description>
		<content:encoded><![CDATA[<p>Hi Ben,</p>
<p>This is really a very good tutorial. Sometimes back I explore WS-Security using Metro &#8211; WSIT. There &#8216;re multiple types of WS-Security can be created using Metro for example:<br />
1. Message Security using Mutual Certificate<br />
2. Message Security using Symmetric Keys.</p>
<p>and few more. Is there any possibility to create such types of WS-Security using Apache CXF. Any information on this will be a great help.</p>
<p>Thanks in advance.<br />
DeKapx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dipesh</title>
		<link>http://www.benmccann.com/dev-blog/apache-cxf-tutorial-ws-security-with-spring/comment-page-1/#comment-2881</link>
		<dc:creator>Dipesh</dc:creator>
		<pubDate>Thu, 04 Dec 2008 05:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.lumidant.com/blog/apache-cxf-tutorial-ws-security-with-spring/#comment-2881</guid>
		<description>Very good security tutorial, I was able to set it up quickly and test both swAuth and corporateAuth webservice endpoints. 

One thing which I did not realize and got confused is when &#039;passwordType&#039; is &#039;PasswordText&#039;, responsibility to validate password lies with the CallbackHandler. 

I was trying to send wrong password from client and expecting the call to be rejected by WebService. But it was not happening. 

After some google found information on CXF wiki page

http://cwiki.apache.org/CXF20DOC/ws-security.html

This note is present under &#039;Username Token Authentication&#039; section, &quot;Note that for the special case of a plain-text password (or any other yet unknown password type), the password validation is delegated to the callback class&quot;. 

After reading this I modified ServerPasswordCallback.handle () method, so that the code looks something like:  

&lt;pre&gt;&lt;code&gt;    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {

        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
        // Set the password on the callback. This will be compared to the
        //     password which was sent from the client.
        // We can call pc.getIdentifer() right here to check the username
        //     if we want each client to have it&#039;s own password.
        
        if (!pc.getPassword().equals(password)) {
			throw new SecurityException (&quot;Password is invalid&quot;);
		}
    }&lt;/code&gt;&lt;/pre&gt;

After this modification in ServerPasswordCallback, service started responding in correct way. Failed for wrong password and get valid response with correct password.</description>
		<content:encoded><![CDATA[<p>Very good security tutorial, I was able to set it up quickly and test both swAuth and corporateAuth webservice endpoints. </p>
<p>One thing which I did not realize and got confused is when &#8216;passwordType&#8217; is &#8216;PasswordText&#8217;, responsibility to validate password lies with the CallbackHandler. </p>
<p>I was trying to send wrong password from client and expecting the call to be rejected by WebService. But it was not happening. </p>
<p>After some google found information on CXF wiki page</p>
<p><a href="http://cwiki.apache.org/CXF20DOC/ws-security.html" rel="nofollow">http://cwiki.apache.org/CXF20DOC/ws-security.html</a></p>
<p>This note is present under &#8216;Username Token Authentication&#8217; section, &#8220;Note that for the special case of a plain-text password (or any other yet unknown password type), the password validation is delegated to the callback class&#8221;. </p>
<p>After reading this I modified ServerPasswordCallback.handle () method, so that the code looks something like:  </p>
<pre><code>    public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {

        WSPasswordCallback pc = (WSPasswordCallback) callbacks[0];
        // Set the password on the callback. This will be compared to the
        //     password which was sent from the client.
        // We can call pc.getIdentifer() right here to check the username
        //     if we want each client to have it's own password.

        if (!pc.getPassword().equals(password)) {
			throw new SecurityException ("Password is invalid");
		}
    }</code></pre>
<p>After this modification in ServerPasswordCallback, service started responding in correct way. Failed for wrong password and get valid response with correct password.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
