<?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: HTTP Basic Authentication with Apache CXF Revisited</title>
	<atom:link href="http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/feed/" rel="self" type="application/rss+xml" />
	<link>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/</link>
	<description>Writing simple, clear and readable code.</description>
	<lastBuildDate>Mon, 30 Aug 2010 12:22:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Scott</title>
		<link>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/comment-page-1/#comment-316</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Wed, 01 Apr 2009 14:38:04 +0000</pubDate>
		<guid isPermaLink="false">http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/#comment-316</guid>
		<description>What is the context of the following code?

BindingProvider port = service.getPort(clas)
port.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, “user”);
port.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, “password”);

I haven&#039;t been able to find where to put this.
What is &quot;service&quot; and what is &quot;clas&quot;?

Thanks!</description>
		<content:encoded><![CDATA[<p>What is the context of the following code?</p>
<p>BindingProvider port = service.getPort(clas)<br />
port.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, “user”);<br />
port.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, “password”);</p>
<p>I haven&#8217;t been able to find where to put this.<br />
What is &#8220;service&#8221; and what is &#8220;clas&#8221;?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nuno</title>
		<link>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/comment-page-1/#comment-297</link>
		<dc:creator>Nuno</dc:creator>
		<pubDate>Wed, 18 Mar 2009 17:42:41 +0000</pubDate>
		<guid isPermaLink="false">http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/#comment-297</guid>
		<description>There is a minor bug in this code, you should replace &quot;Content-Length&quot; with &quot;Content-length&quot;, otherwise you will get the error above reported by Uri.</description>
		<content:encoded><![CDATA[<p>There is a minor bug in this code, you should replace &#8220;Content-Length&#8221; with &#8220;Content-length&#8221;, otherwise you will get the error above reported by Uri.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis Vredeveld</title>
		<link>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/comment-page-1/#comment-296</link>
		<dc:creator>Dennis Vredeveld</dc:creator>
		<pubDate>Wed, 18 Mar 2009 15:35:35 +0000</pubDate>
		<guid isPermaLink="false">http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/#comment-296</guid>
		<description>Could it be that the exception above is being caused by the client that tries to parse the response as an SOAP response. Clearly, an &quot;HTTP/1.1 401 Unauthorized...&quot; will not be parsed as XML.</description>
		<content:encoded><![CDATA[<p>Could it be that the exception above is being caused by the client that tries to parse the response as an SOAP response. Clearly, an &#8220;HTTP/1.1 401 Unauthorized&#8230;&#8221; will not be parsed as XML.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt Mendrala</title>
		<link>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/comment-page-1/#comment-279</link>
		<dc:creator>Matt Mendrala</dc:creator>
		<pubDate>Fri, 27 Feb 2009 04:55:02 +0000</pubDate>
		<guid isPermaLink="false">http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/#comment-279</guid>
		<description>You will get an exception if the credentials are not base64 encoded as well. I wonder if that&#039;s what you are seeing.</description>
		<content:encoded><![CDATA[<p>You will get an exception if the credentials are not base64 encoded as well. I wonder if that&#8217;s what you are seeing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Uri</title>
		<link>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/comment-page-1/#comment-268</link>
		<dc:creator>Uri</dc:creator>
		<pubDate>Sun, 08 Feb 2009 10:16:19 +0000</pubDate>
		<guid isPermaLink="false">http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/#comment-268</guid>
		<description>Hello,

Everything works OK, if the supplied username/password are correct. But when they are incorrect, I get 
&lt;code&gt;
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
.....
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog                                                                       
 at [row,col {unknown-source}]: [1,0]                                                                                                        
        at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:686)                                                          
        at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)                                                          
        at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)                                                     
        at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)                                                               
        at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)                                                            
        at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>Everything works OK, if the supplied username/password are correct. But when they are incorrect, I get<br />
<code><br />
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.<br />
.....<br />
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog<br />
 at [row,col {unknown-source}]: [1,0]<br />
        at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:686)<br />
        at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)<br />
        at com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)<br />
        at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)<br />
        at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)<br />
        at org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chris</title>
		<link>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/comment-page-1/#comment-156</link>
		<dc:creator>chris</dc:creator>
		<pubDate>Mon, 20 Oct 2008 12:20:28 +0000</pubDate>
		<guid isPermaLink="false">http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/#comment-156</guid>
		<description>I do not actually call this service using CXF. Another application consumes this web service. I do make use of it in unit tests though. Here is a snippet of what you need to do basic authentication with CXF on the client side:

BindingProvider port = service.getPort(clas)
port.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, &quot;user&quot;)
port.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, &quot;password&quot;)</description>
		<content:encoded><![CDATA[<p>I do not actually call this service using CXF. Another application consumes this web service. I do make use of it in unit tests though. Here is a snippet of what you need to do basic authentication with CXF on the client side:</p>
<p>BindingProvider port = service.getPort(clas)<br />
port.getRequestContext().put(BindingProvider.USERNAME_PROPERTY, &#8220;user&#8221;)<br />
port.getRequestContext().put(BindingProvider.PASSWORD_PROPERTY, &#8220;password&#8221;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anand</title>
		<link>http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/comment-page-1/#comment-155</link>
		<dc:creator>anand</dc:creator>
		<pubDate>Mon, 20 Oct 2008 12:08:55 +0000</pubDate>
		<guid isPermaLink="false">http://chrisdail.com/2008/08/13/http-basic-authentication-with-apache-cxf-revisited/#comment-155</guid>
		<description>Hello Chris, 
The interceptor works like a breeze. 
Thanks for that..
I was wondering if you had a sample client code to share that calls the web service interceptor with the required parameters..?

Thanks,</description>
		<content:encoded><![CDATA[<p>Hello Chris,<br />
The interceptor works like a breeze.<br />
Thanks for that..<br />
I was wondering if you had a sample client code to share that calls the web service interceptor with the required parameters..?</p>
<p>Thanks,</p>
]]></content:encoded>
	</item>
</channel>
</rss>
