<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>AM78 blog</title>
	<atom:link href="http://am78.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://am78.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 11 Feb 2008 14:12:58 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='am78.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/33e43fe3d8c1867724565337bd167e03?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>AM78 blog</title>
		<link>http://am78.wordpress.com</link>
	</image>
			<item>
		<title>Java HTTP Proxy Authentifizierung</title>
		<link>http://am78.wordpress.com/2008/02/11/java-http-proxy-authentifizierung/</link>
		<comments>http://am78.wordpress.com/2008/02/11/java-http-proxy-authentifizierung/#comments</comments>
		<pubDate>Mon, 11 Feb 2008 14:12:58 +0000</pubDate>
		<dc:creator>am78</dc:creator>
				<category><![CDATA[authentication]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://am78.wordpress.com/2008/02/11/java-http-proxy-authentifizierung/</guid>
		<description><![CDATA[HTTP-Proxy-Authentifikation
Ggf. erfordert der HTTP-Proxy eine Authentifikation. Dabei ist für normale JAVA-Web Zugriffe Folgendes notwendig:
URL url = new URL(theUrl);
URLConnection conn = url.openConnection();
String encoded = getBas64EncodeCredentials(getProxyUser(), getProxyPasswd());
conn.setRequestProperty("Proxy-Authorization", "Basic " + encoded);
conn.connect();
Base64 codierte Credentials:
Liefert die Base64 codierten Credentials des Benutzers.
private String getBas64EncodeCredentials(String user, String passwd) {
	String userPasswd = user + ":" + passwd;
      [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=am78.wordpress.com&blog=2668745&post=6&subd=am78&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3>HTTP-Proxy-Authentifikation</h3>
<p>Ggf. erfordert der HTTP-Proxy eine Authentifikation. Dabei ist für normale JAVA-Web Zugriffe Folgendes notwendig:</p>
<pre>URL url = new URL(theUrl);
URLConnection conn = url.openConnection();
String encoded = getBas64EncodeCredentials(getProxyUser(), getProxyPasswd());
conn.setRequestProperty("Proxy-Authorization", "Basic " + encoded);
conn.connect();</pre>
<h3>Base64 codierte Credentials:</h3>
<p>Liefert die Base64 codierten Credentials des Benutzers.</p>
<pre>private String getBas64EncodeCredentials(String user, String passwd) {
	String userPasswd = user + ":" + passwd;
        String encoded = new String(Base64.encode(userPasswd.getBytes()));
        return encoded;
}</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/am78.wordpress.com/6/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/am78.wordpress.com/6/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/am78.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/am78.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/am78.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/am78.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/am78.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/am78.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/am78.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/am78.wordpress.com/6/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/am78.wordpress.com/6/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/am78.wordpress.com/6/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=am78.wordpress.com&blog=2668745&post=6&subd=am78&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://am78.wordpress.com/2008/02/11/java-http-proxy-authentifizierung/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/161a46d67e0d042e80241c044e8ead7d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">micha</media:title>
		</media:content>
	</item>
		<item>
		<title>Picasa Web Album JAVA API</title>
		<link>http://am78.wordpress.com/2008/02/06/picasa-web-album-java-api/</link>
		<comments>http://am78.wordpress.com/2008/02/06/picasa-web-album-java-api/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 11:27:56 +0000</pubDate>
		<dc:creator>am78</dc:creator>
				<category><![CDATA[Google DATA API]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[Picasa]]></category>
		<category><![CDATA[proxy]]></category>

		<guid isPermaLink="false">http://am78.wordpress.com/?p=3</guid>
		<description><![CDATA[Das Picasa Web Albums API ermöglicht das anzeigen und bearbeiten von Picasa Alben. Es ist Bestandteil des Google Data API. Das Developers Guide beschreibt die Benutzung des API.
Benutzung im Java Desktop Client
Laden der Alben eines Benutzers
PicasawebService picasa = new PicasawebService("exampleCo-exampleApp-1");
String url = "http://picasaweb.google.com/data/feed/api/user/&#60;username&#62;?kind=album";
URL albumsUrl = new URL(url);
// Send the request for the user's albums.
AlbumFeed albums [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=am78.wordpress.com&blog=2668745&post=3&subd=am78&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><div class="snap_preview">Das Picasa Web Albums API ermöglicht das anzeigen und bearbeiten von Picasa Alben. Es ist Bestandteil des <a href="http://code.google.com/apis/gdata/overview.html" target="_blank">Google Data API</a>. Das <a href="http://code.google.com/apis/picasaweb/gdata.html" target="_blank">Developers Guide</a> beschreibt die Benutzung des <a href="http://www.answers.com/topic/application-programming-interface?nafid=22" class="answerlink">API</a>.</p>
<h2>Benutzung im Java Desktop Client</h2>
<h3>Laden der Alben eines Benutzers</h3>
<pre>PicasawebService picasa = new PicasawebService("exampleCo-exampleApp-1");
String url = "http://picasaweb.google.com/data/feed/api/user/&lt;username&gt;?kind=album";
URL albumsUrl = new URL(url);
// Send the request for the user's albums.
AlbumFeed albums = picasa.getFeed(albumsUrl, AlbumFeed.class);
List&lt;AlbumEntry&gt; entries = albums.getEntries(AlbumEntry.class);
for (AlbumEntry album : entries) {
	//do something with the albums
}</pre>
<h3>Albumdetails Abrufen und Bilder eines Albums anzeigen</h3>
<pre>//URL for the AlbumFeed
String url = albumEntry.getFeedLink().getHref() + "?kind=photo";
//the albuFeed contains the album details
AlbumFeed feed = getService().getFeed(new URL(url), AlbumFeed.class);
//a photoEntry contains all photo infos including the urls to the thubnails and image data
List&lt;PhotoEntry&gt; photos = feed.getPhotoEntries();</pre>
<h3>Benutzung eines HTTP-Proxys</h3>
<p>In Java lässt sich die Benutzung eines HTTP-Proxys für http/https Zugriffe wie folgt vornehmen:</p>
<pre>Properties systemSettings = System.getProperties();
systemSettings.put("https.proxySet", "true");
systemSettings.put("http.proxyHost", proxyHost);
systemSettings.put("http.proxyPort", proxyPort);
systemSettings.put("proxySet", "true");
systemSettings.put("https.proxyHost", proxyHost);
systemSettings.put("https.proxyPort", proxyPort);
System.setProperties(systemSettings);</pre>
<p>Http- und https-Zugriffe sollten nun die Proxy-Einstellungen berücksichtigen.</p>
<h3>HTTP-Proxy-Authentifikation</h3>
<p>Ggf. erfordert der HTTP-Proxy eine Authentifikation. Dabei ist für normale JAVA-Web Zugriffe Folgendes notwendig:</p>
<pre>URL url = new URL(theUrl);
URLConnection conn = url.openConnection();
String encoded = getBas64EncodeCredentials(getProxyUser(), getProxyPasswd());
conn.setRequestProperty("Proxy-Authorization", "Basic " + encoded);
conn.connect();</pre>
<p>Googles API kann ebenfalls mit einer Authentifizierung an einem HTTP-Proxy umgehen; dazu ist Folgendes setzen:</p>
<pre>String base64encodedCredentials = "Basic " + getBas64EncodeCredentials(getProxyUser(), getProxyPasswd());
picasaService.getRequestFactory().setPrivateHeader("Proxy-Authorization", base64encodedCredentials);</pre>
<pre></pre>
</div>
<h3>Base64-codierte Credentials:</h3>
<pre>private String getBas64EncodeCredentials(String user, String passwd) {
	String userPasswd = user + ":" + passwd;
        String encoded = new String(Base64.encode(userPasswd.getBytes()));
        return encoded;
}</pre>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/am78.wordpress.com/3/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/am78.wordpress.com/3/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/am78.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/am78.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/am78.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/am78.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/am78.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/am78.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/am78.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/am78.wordpress.com/3/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/am78.wordpress.com/3/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/am78.wordpress.com/3/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=am78.wordpress.com&blog=2668745&post=3&subd=am78&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://am78.wordpress.com/2008/02/06/picasa-web-album-java-api/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/161a46d67e0d042e80241c044e8ead7d?s=96&#38;d=identicon" medium="image">
			<media:title type="html">micha</media:title>
		</media:content>
	</item>
	</channel>
</rss>