<?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/"
	>

<channel>
	<title>craigagreen.com</title>
	<atom:link href="http://craigagreen.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://craigagreen.com</link>
	<description></description>
	<lastBuildDate>Mon, 20 Feb 2012 05:09:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Sonos &amp; CBCMusic.ca</title>
		<link>http://craigagreen.com/sonos-cbcmusic-ca/</link>
		<comments>http://craigagreen.com/sonos-cbcmusic-ca/#comments</comments>
		<pubDate>Mon, 20 Feb 2012 05:09:38 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>
		<category><![CDATA[cbc]]></category>
		<category><![CDATA[sonos]]></category>

		<guid isPermaLink="false">http://craigagreen.com/?p=150</guid>
		<description><![CDATA[So CBC has launched this new music website. 40 channels of commercial free streaming radio. Fantastic! Except, they are not recognized by Sonos radio. The solution? Add the feeds yourself. If you are somewhat technical you should be able to ...]]></description>
			<content:encoded><![CDATA[<p>So CBC has launched this new music website. 40 channels of commercial free streaming radio. Fantastic! Except, they are not recognized by Sonos radio.</p>
<p>The solution? Add the feeds yourself.<br />
If you are somewhat technical you should be able to to this quite easily.  If you are not just let me know which channel you want and I can find the URL for you.</p>
<p>Go to cbcmusic.ca. Find a channel you like using, open your web development tool (Firebug if you use Firefox, I personally use Chrome) and start streaming your audio.  Look at the network requests.  You should see a request to streamtheworld.com, just copy that URL and manually add it to your list of radio stations in Sonos.</p>
<p>Happy Listening!</p>
<p>Here are a few to get you started:<br />
Canadian Songwriters: http://1521.live.streamtheworld.com/CBC_CANSON_H<br />
Indie Rock: http://3163.live.streamtheworld.com/CBC_INDIE1_H<br />
Adult Alternative: http://3163.live.streamtheworld.com/CBC_ADLTAL_H</p>
]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/sonos-cbcmusic-ca/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Android &#8211; Could not open Selected VM debug port (8700)</title>
		<link>http://craigagreen.com/android_could_not_open_selected_vm_debug_port_8700_/</link>
		<comments>http://craigagreen.com/android_could_not_open_selected_vm_debug_port_8700_/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 15:13:29 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">/android_could_not_open_selected_vm_debug_port_8700_/</guid>
		<description><![CDATA[<p>&#160;After having checked out the BB (which I'd like to revisit with OS6) as well as some iPhone development (<a mce_href="/ergLog" href="/ergLog">ergLog</a>) I'm turning my attention to Android. I'll document some of the troubles and hopefully solutions I've found along the way.</p><p>&#160;</p><p>&#160;Problem #1</p><p>After&#160;successfully&#160;installing Eclipse and AVD plugin I received the following error when restarting Eclipse:</p><p>"Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If&#160;it's being used by something else, choose a new port number in the preferences"</p><p>Every response to this issue was something along the lines of "well, see what's using that port and kill it/change the port". So let's check that just to make sure the port isn't in use. (NOTE: I'm using Windows)</p><p>&#160;From the cmd console:</p><p>&#62;telnet localhost 8700&#160;</p><p>Can't connect? Me either, so port 8700 isn't in use. Let's just be sure:</p><p>&#62;netstat -an</p><p>Can't see port 8700 in use? Me either. So it seems as though the error description is a bit misleading. Next have a peek at your hosts file (C:WindowsSystem32driverserchosts). Did you do the same thing as me? Several months ago I pointed localhost to another one of my machines while testing something out... and completely forgot about it!&#160;</p><p>I looks like AVD looks to localhost not 127.0.0.1 so just make sure that you remove any old mapping in your hosts file or go ahead and explicitly add it if makes you feel better.&#160;</p>]]></description>
			<content:encoded><![CDATA[<p>&#160;After having checked out the BB (which I'd like to revisit with OS6) as well as some iPhone development (<a mce_href="/ergLog" href="/ergLog">ergLog</a>) I'm turning my attention to Android. I'll document some of the troubles and hopefully solutions I've found along the way.</p><p>&#160;</p><p>&#160;Problem #1</p><p>After&#160;successfully&#160;installing Eclipse and AVD plugin I received the following error when restarting Eclipse:</p><p>"Could not open Selected VM debug port (8700). Make sure you do not have another instance of DDMS or of the eclipse plugin running. If&#160;it's being used by something else, choose a new port number in the preferences"</p><p>Every response to this issue was something along the lines of "well, see what's using that port and kill it/change the port". So let's check that just to make sure the port isn't in use. (NOTE: I'm using Windows)</p><p>&#160;From the cmd console:</p><p>&#62;telnet localhost 8700&#160;</p><p>Can't connect? Me either, so port 8700 isn't in use. Let's just be sure:</p><p>&#62;netstat -an</p><p>Can't see port 8700 in use? Me either. So it seems as though the error description is a bit misleading. Next have a peek at your hosts file (C:WindowsSystem32driverserchosts). Did you do the same thing as me? Several months ago I pointed localhost to another one of my machines while testing something out... and completely forgot about it!&#160;</p><p>I looks like AVD looks to localhost not 127.0.0.1 so just make sure that you remove any old mapping in your hosts file or go ahead and explicitly add it if makes you feel better.&#160;</p>]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/android_could_not_open_selected_vm_debug_port_8700_/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlackBerry and .NET WebService Tutorial (It Works!) &#8211; Part 3</title>
		<link>http://craigagreen.com/blackberry_and_net_webservice_tutorial_it_works_part_3_/</link>
		<comments>http://craigagreen.com/blackberry_and_net_webservice_tutorial_it_works_part_3_/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 02:28:01 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>

		<guid isPermaLink="false">/blackberry_and_net_webservice_tutorial_it_works_part_3_/</guid>
		<description><![CDATA[<p>Sorry for not keeping this up to date, but I haven't had much time to revisit this since my original post. Fortunately, Michael Soltys was able to figure it out and he was kind enough to share. So without further delay here is what Michael sent me:&#160; </p><p>&#160;</p><p>&#160;<span class="Apple-style-span" style="color: rgb(128, 0, 128); font-family: Tahoma; font-size: small; ">.NET web service</span></p><p>{codecitation class="brush: c#;" width="500px"}</p><p>&#160;[WebService(Namespace = "urn:tempuri")]</p><p>&#160;[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]</p><p>&#160;public class HelloWorldService : System.Web.Services.WebService</p><p>&#160;{</p><p><br /></p><p>&#160;&#160; &#160;[SoapRpcMethod(), WebMethod]</p><p>&#160;&#160; &#160;public Complex HelloServer2(string user, string pwd)&#160;</p><p>&#160;&#160; &#160;{</p><p>&#160;&#160; &#160; &#160; Complex myObj = new Complex();</p><p>&#160;&#160; &#160; &#160; myObj.name = string.Format("user:{0}, pwd:{1}", user, pwd);</p><p>&#160;&#160; &#160; &#160; myObj.value = 42;</p><p>&#160;&#160; &#160; &#160; return myObj;&#160;</p><p>&#160;&#160; &#160;}</p><p>&#160;</p><p><br /></p><p>&#160;&#160; &#160;public class Complex&#160;</p><p>&#160;&#160; &#160;{</p><p>&#160;&#160; &#160; &#160;public string name;&#160;</p><p>&#160;&#160; &#160; &#160;public int value;&#160;</p><p>&#160;&#160; &#160;}&#160;</p><p>&#160;}&#160;</p><p>{/codecitation}</p><p>&#160;</p><p><span class="Apple-style-span" style="color: rgb(128, 0, 128); font-family: Tahoma; font-size: small; ">In HelloWorld.java:</span>&#160;</p><p>{codecitation class="brush:java;" width="500px"}</p><p>String serviceUrl = "http://localhost/HPServices/HelloWorldService.asmx"; &#160; &#160; &#160; &#160;</p><p>String serviceNamespace ="urn:tempuri"; //saw a post saying "http://tempuri.org/" might cause a problem. &#160;Who knows?!</p><p>String soapAction = "urn:tempuri/HelloServer2";</p><p>&#160;&#160; &#160; &#160;&#160;</p><p>SoapObject rpc = new SoapObject(serviceNamespace, "HelloServer2");</p><p>rpc.addProperty("user", "testuser");</p><p>rpc.addProperty("pwd", "123password"); &#160; &#160; &#160; &#160;</p><p>SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);</p><p>envelope.encodingStyle = SoapSerializationEnvelope.ENC;</p><p>envelope.bodyOut = rpc;</p><p><br /></p><p>//envelope.dotNet = true;</p><p>&#160;&#160; &#160;&#160;</p><p>// Add the mapping so that the return value can be converted back to our Complex object. &#160;</p><p>envelope.addMapping("urn:tempuri/encodedTypes", "Complex", new Complex().getClass());&#160;</p><p>&#160;</p><p>{/codecitation}&#160;</p><p><br /></p><div>&#160;</div><div>Did you see that?!?!?!</div><div>{codecitation class="brush: java;" width="500px"}</div><p>&#160;<span>&#160;&#160;&#160;&#160;&#160;&#160; //envelope.dotNet = true;</span></p><div>{/codecitation} </div><div>Nice.</div><div>&#160;</div><div>Thanks Michael. <br /></div>]]></description>
			<content:encoded><![CDATA[<p>Sorry for not keeping this up to date, but I haven't had much time to revisit this since my original post. Fortunately, Michael Soltys was able to figure it out and he was kind enough to share. So without further delay here is what Michael sent me:&#160; </p><p>&#160;</p><p>&#160;<span class="Apple-style-span" style="color: rgb(128, 0, 128); font-family: Tahoma; font-size: small; ">.NET web service</span></p><p>{codecitation class="brush: c#;" width="500px"}</p><p>&#160;[WebService(Namespace = "urn:tempuri")]</p><p>&#160;[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]</p><p>&#160;public class HelloWorldService : System.Web.Services.WebService</p><p>&#160;{</p><p><br /></p><p>&#160;&#160; &#160;[SoapRpcMethod(), WebMethod]</p><p>&#160;&#160; &#160;public Complex HelloServer2(string user, string pwd)&#160;</p><p>&#160;&#160; &#160;{</p><p>&#160;&#160; &#160; &#160; Complex myObj = new Complex();</p><p>&#160;&#160; &#160; &#160; myObj.name = string.Format("user:{0}, pwd:{1}", user, pwd);</p><p>&#160;&#160; &#160; &#160; myObj.value = 42;</p><p>&#160;&#160; &#160; &#160; return myObj;&#160;</p><p>&#160;&#160; &#160;}</p><p>&#160;</p><p><br /></p><p>&#160;&#160; &#160;public class Complex&#160;</p><p>&#160;&#160; &#160;{</p><p>&#160;&#160; &#160; &#160;public string name;&#160;</p><p>&#160;&#160; &#160; &#160;public int value;&#160;</p><p>&#160;&#160; &#160;}&#160;</p><p>&#160;}&#160;</p><p>{/codecitation}</p><p>&#160;</p><p><span class="Apple-style-span" style="color: rgb(128, 0, 128); font-family: Tahoma; font-size: small; ">In HelloWorld.java:</span>&#160;</p><p>{codecitation class="brush:java;" width="500px"}</p><p>String serviceUrl = "http://localhost/HPServices/HelloWorldService.asmx"; &#160; &#160; &#160; &#160;</p><p>String serviceNamespace ="urn:tempuri"; //saw a post saying "http://tempuri.org/" might cause a problem. &#160;Who knows?!</p><p>String soapAction = "urn:tempuri/HelloServer2";</p><p>&#160;&#160; &#160; &#160;&#160;</p><p>SoapObject rpc = new SoapObject(serviceNamespace, "HelloServer2");</p><p>rpc.addProperty("user", "testuser");</p><p>rpc.addProperty("pwd", "123password"); &#160; &#160; &#160; &#160;</p><p>SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);</p><p>envelope.encodingStyle = SoapSerializationEnvelope.ENC;</p><p>envelope.bodyOut = rpc;</p><p><br /></p><p>//envelope.dotNet = true;</p><p>&#160;&#160; &#160;&#160;</p><p>// Add the mapping so that the return value can be converted back to our Complex object. &#160;</p><p>envelope.addMapping("urn:tempuri/encodedTypes", "Complex", new Complex().getClass());&#160;</p><p>&#160;</p><p>{/codecitation}&#160;</p><p><br /></p><div>&#160;</div><div>Did you see that?!?!?!</div><div>{codecitation class="brush: java;" width="500px"}</div><p>&#160;<span>&#160;&#160;&#160;&#160;&#160;&#160; //envelope.dotNet = true;</span></p><div>{/codecitation} </div><div>Nice.</div><div>&#160;</div><div>Thanks Michael. <br /></div>]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/blackberry_and_net_webservice_tutorial_it_works_part_3_/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stackoverflow DevDays &#8211; Toronto</title>
		<link>http://craigagreen.com/stackoverflow_devdays_toronto/</link>
		<comments>http://craigagreen.com/stackoverflow_devdays_toronto/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 03:20:20 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>

		<guid isPermaLink="false">/stackoverflow_devdays_toronto/</guid>
		<description><![CDATA[<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 18px; border-collapse: collapse; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; ">I had great expectations for<a mce_href="http://stackoverflow.carsonified.com/events/toronto/" href="http://stackoverflow.carsonified.com/events/toronto/"> this day</a>. I didn't attend expecting that I would learn how to program in within a 50 minute presentation. I can do that on my own time from the comfort of my home. I came expecting to be inspired. I wanted to see things that I don't normally see in my day-to-day work. I wanted to leave all fired up and ready to make a difference in the world (ok, at least in MY world :) ). Did it deliver? Kind of.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; ">Joel's keynote hit the mark. It's something that all (most) developers should struggle with. How do we make something so incredibly difficult and complex appear effortless and intuitive? Elegant user interface design is something that is lacking far too many applications.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; ">From there things went downhill. Not that the presentations/presenters were bad or didn't know their stuff. I just wasn't inspired. For example, I felt that the JQuery talk could have demonstrated how jQuery can create the worlds most intuitive UI (as an aside, Joel's demo where he added sub tasks completely via the keyboard should be how every interface works. He mentioned that they tried to make it as simple as using notepad).</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; "><i>&#160;[Update:&#160;</i><a mce_href="http://craigagreen.com/downloads/ralphwhitbeck.mp3" href="http://craigagreen.com/downloads/ralphwhitbeck.mp3"><i>Ralph Whitbeck's jQuery talk can be found here</i></a><i>]</i></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; "><a mce_href="http://www.cs.toronto.edu/~gvwilson/" href="http://www.cs.toronto.edu/~gvwilson/">Greg Wilson</a>&#160;saved the day (<a mce_href="http://www.slideshare.net/gvwilson/bits-of-evidence-2338367" href="http://www.slideshare.net/gvwilson/bits-of-evidence-2338367">slides here</a>). His talk focused on bringing the science back to computer science. Very interesting stuff. He opened my eyes, challenged and inspired me. Thank you Greg.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; "><i>[Update:&#160;</i><a mce_href="http://craigagreen.com/downloads/gregwilson.mp3" href="http://craigagreen.com/downloads/gregwilson.mp3"><i>Greg Wilson's talk can be found here</i></a><i>]</i>&#160;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; "><a mce_href="http://reginald.braythwayt.com/" href="http://reginald.braythwayt.com/">Reg Braithwaite</a>&#160;also gave a great talk. I heard grumblings that there was little in the way of ruby. Which (in my opinion) was his point. Who cares about the language? Languages will come and languages will go. As developers we need to learn how to solve problems, programming languages are just a means to achieve that. If all you know how to use is a hammer then every problem will look like a nail. I wish I would have known a bit more about Reg before the talk. I've followed some of his projects (from a distance) in the past without realizing that he was involved. He is brilliant.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; ">In the end it was a great day. I'll be back next year and I'll be bringing the rest of my team with</p></span>]]></description>
			<content:encoded><![CDATA[<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Arial, Helvetica, sans-serif; font-size: 14px; line-height: 18px; border-collapse: collapse; "><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; ">I had great expectations for<a mce_href="http://stackoverflow.carsonified.com/events/toronto/" href="http://stackoverflow.carsonified.com/events/toronto/"> this day</a>. I didn't attend expecting that I would learn how to program in within a 50 minute presentation. I can do that on my own time from the comfort of my home. I came expecting to be inspired. I wanted to see things that I don't normally see in my day-to-day work. I wanted to leave all fired up and ready to make a difference in the world (ok, at least in MY world :) ). Did it deliver? Kind of.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; ">Joel's keynote hit the mark. It's something that all (most) developers should struggle with. How do we make something so incredibly difficult and complex appear effortless and intuitive? Elegant user interface design is something that is lacking far too many applications.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; ">From there things went downhill. Not that the presentations/presenters were bad or didn't know their stuff. I just wasn't inspired. For example, I felt that the JQuery talk could have demonstrated how jQuery can create the worlds most intuitive UI (as an aside, Joel's demo where he added sub tasks completely via the keyboard should be how every interface works. He mentioned that they tried to make it as simple as using notepad).</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; "><i>&#160;[Update:&#160;</i><a mce_href="http://craigagreen.com/downloads/ralphwhitbeck.mp3" href="http://craigagreen.com/downloads/ralphwhitbeck.mp3"><i>Ralph Whitbeck's jQuery talk can be found here</i></a><i>]</i></p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; "><a mce_href="http://www.cs.toronto.edu/~gvwilson/" href="http://www.cs.toronto.edu/~gvwilson/">Greg Wilson</a>&#160;saved the day (<a mce_href="http://www.slideshare.net/gvwilson/bits-of-evidence-2338367" href="http://www.slideshare.net/gvwilson/bits-of-evidence-2338367">slides here</a>). His talk focused on bringing the science back to computer science. Very interesting stuff. He opened my eyes, challenged and inspired me. Thank you Greg.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; "><i>[Update:&#160;</i><a mce_href="http://craigagreen.com/downloads/gregwilson.mp3" href="http://craigagreen.com/downloads/gregwilson.mp3"><i>Greg Wilson's talk can be found here</i></a><i>]</i>&#160;</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; "><a mce_href="http://reginald.braythwayt.com/" href="http://reginald.braythwayt.com/">Reg Braithwaite</a>&#160;also gave a great talk. I heard grumblings that there was little in the way of ruby. Which (in my opinion) was his point. Who cares about the language? Languages will come and languages will go. As developers we need to learn how to solve problems, programming languages are just a means to achieve that. If all you know how to use is a hammer then every problem will look like a nail. I wish I would have known a bit more about Reg before the talk. I've followed some of his projects (from a distance) in the past without realizing that he was involved. He is brilliant.</p><p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; clear: both; background-position: initial initial; background-repeat: initial initial; ">In the end it was a great day. I'll be back next year and I'll be bringing the rest of my team with</p></span>]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/stackoverflow_devdays_toronto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your invitation to preview Google Wave</title>
		<link>http://craigagreen.com/your_invitation_to_preview_google_wave/</link>
		<comments>http://craigagreen.com/your_invitation_to_preview_google_wave/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 19:26:03 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>

		<guid isPermaLink="false">/your_invitation_to_preview_google_wave/</guid>
		<description><![CDATA[<p>What a pleasant surprise this morning; I awoke to find an email with the subject of "Your invitation to preview Google Wave" waiting for me in my inbox. I haven't had much too much time to play with it yet, but from what I have seen it's a little&#160;flaky, but that's to be expected and can be forgiven (for now).</p><p>My wave account is&#160;<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal; font-size: small; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; ">cagreen@googlewave.com</span>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p>]]></description>
			<content:encoded><![CDATA[<p>What a pleasant surprise this morning; I awoke to find an email with the subject of "Your invitation to preview Google Wave" waiting for me in my inbox. I haven't had much too much time to play with it yet, but from what I have seen it's a little&#160;flaky, but that's to be expected and can be forgiven (for now).</p><p>My wave account is&#160;<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: arial, sans-serif; line-height: normal; font-size: small; -webkit-border-horizontal-spacing: 5px; -webkit-border-vertical-spacing: 5px; ">cagreen@googlewave.com</span>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p><p>&#160;</p>]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/your_invitation_to_preview_google_wave/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlackBerry and .NET WebService Tutorial &#8211; Part 2</title>
		<link>http://craigagreen.com/blackberry_and_net_webservice_tutorial_part_2/</link>
		<comments>http://craigagreen.com/blackberry_and_net_webservice_tutorial_part_2/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 04:30:06 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>

		<guid isPermaLink="false">/blackberry_and_net_webservice_tutorial_part_2/</guid>
		<description><![CDATA[<p>Depending on what you are trying to do it's quite easy to get a simple web service up andd running. Passing simple types back and forth is fairly trivial, complex types is not much more difficult. Where I've had trouble is in passing simple types as input parameters and returning complex types. We'll explore this later on. First lets look at the easiest case, passing simple types as parameters.</p>]]></description>
			<content:encoded><![CDATA[<p>First you will need to allow data access fro your BB Simulator. If you don&#8217;t do this you can expect to receive a network timeout exception.</p>
<p>Download, install and run the MDS Simulator. Go to&nbsp;<a href="https://www.blackberry.com/Downloads/entry.do?code=060AD92489947D410D897474079C1477" mce_href="https://www.blackberry.com/Downloads/entry.do?code=060AD92489947D410D897474079C1477">https://www.blackberry.com/Downloads/entry.do?code=060AD92489947D410D897474079C1477</a>. Select &#8216;BlackBerry Email and MDS Services Simulator Package&#8217;. Once installed run the &#8216;MDS&#8217; application.</p>
<p>Next we&#8217;ll set up the server portion of this tutorial.&nbsp;The service will contain a simple method that takes a String and returns a String. &nbsp;I won&#8217;t walk through the entire process of creating a .NET web service but here is the code:</p>
<p>{codecitation class=&#8221;brush: c#;&#8221; width=&#8221;500px&#8221;}</p>
<p>using System.Linq;</p>
<p>using System.Web;</p>
<p>using System.Web.Services;</p>
<p>using System.Web.Services.Protocols;</p>
<p></p>
<p>namespace HelloWorldService</p>
<p>{</p>
<p>&nbsp;&nbsp; &nbsp;[WebService(Namespace = "http://tempuri.org/")] &nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp;public class Service : System.Web.Services.WebService</p>
<p>&nbsp;&nbsp; &nbsp;{ &nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[WebMethod]</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public String HelloServer(String msg)</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return &#8220;Hello From Server-&#8221; + msg;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; }</p>
<p>}&nbsp;&nbsp;{/codecitation}</p>
<p>Now let&#8217;s revist the HelloWorldScreen class from Part 1.</p>
<p>{codecitation class=&#8221;brush: java;&#8221; width=&#8221;500px&#8221;}final class HelloWorldScreen extends MainScreen&nbsp;
<p>&nbsp;</p>
<p>{</p>
<p><span class="Apple-tab-span" style="white-space: pre;">	</span>private RichTextField textField;</p>
<p>&nbsp;&nbsp; &nbsp;public HelloWorldScreen()&nbsp;</p>
<p>&nbsp;&nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;super();</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;LabelField title = new LabelField(&#8220;HelloWorld Sample&#8221;, LabelField.ELLIPSIS | LabelField.USE_ALL_WIDTH);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;setTitle(title);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;textField = new RichTextField(&#8220;Hello World!&#8221;);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;add(textField);</p>
<p>&nbsp;&nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp;public void setScreenTest(String text)</p>
<p>&nbsp;&nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;">	</span>textField.setText(text);</p>
<p>&nbsp;&nbsp; &nbsp;}</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp;public boolean onClose()&nbsp;</p>
<p>&nbsp;&nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Dialog.alert(&#8220;Goodbye!&#8221;);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;System.exit(0);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;return true;</p>
<p>&nbsp;&nbsp; &nbsp;}</p>
<p>}{/codecitation}</p>
<p>Now the HelloWorld class needs a bit of tweaking:</p>
<p>{codecitation class=&#8221;brush: java;&#8221; width=&#8221;500px&#8221;}&nbsp;</p>
<p>&nbsp;public HelloWorld()&nbsp;</p>
<p>&nbsp;&nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;pushScreen(new HelloWorldScreen());&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String serviceUrl = &#8220;http:// &lt;SERVER&gt;/HelloWorldService/Service.asmx&#8221;; &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String serviceNamespace = &#8220;http://tempuri.org/&#8221;;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String soapAction = &#8220;http://tempuri.org/HelloServer&#8221;;</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SoapObject rpc = new SoapObject(serviceNamespace, &#8220;HelloServer&#8221;);</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;envelope.bodyOut = rpc;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;envelope.dotNet = true;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;envelope.encodingStyle = SoapSerializationEnvelope.XSD;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;rpc.addProperty(&#8220;msg&#8221;, (new Date()).toString());</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;HttpTransport ht = new HttpTransport(serviceUrl);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ht.debug = true;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String result;</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;try</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp;&nbsp;<span class="Apple-tab-span" style="white-space: pre;">	</span> &nbsp; &nbsp; &nbsp; &nbsp;ht.call(soapAction, envelope);</p>
<p><span class="Apple-tab-span" style="white-space: pre;">	</span>&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;result = (envelope.getResponse()).toString(); &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;} &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;catch(Exception ex)</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;">	</span>result = ex.toString();</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;((HelloWorldScreen)this.getActiveScreen()).setScreenTest(result); &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>}&nbsp;{/codecitation}Now run your code!</p>
<p>&nbsp;Ok, great. Now what about passing Complex types back from the server?&nbsp;</p>
<p>Again, lets tweak the server side code. Notice the HelloServer2 method. It will return an object named Complex. Also notice that the WebServiceBinding is now set to WsiProfiles.None</p>
<p>{codecitation class=&#8221;brush: c#;&#8221; width=&#8221;500px&#8221;}</p>
<p>namespace HelloWorldService</p>
<p>{</p>
<p>&nbsp;&nbsp; &nbsp;[WebServiceBinding(ConformsTo = WsiProfiles.None)]</p>
<p>&nbsp;&nbsp; &nbsp;[WebService(Namespace = "http://tempuri.org/")] &nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp;public class Service : System.Web.Services.WebService</p>
<p>&nbsp;&nbsp; &nbsp;{ &nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[WebMethod]</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public String HelloServer(String msg)</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return &#8220;Hello From Server-&#8221; + msg;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[SoapRpcMethod]</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;[WebMethod]</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;public Complex HelloServer2()</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Complex myObj = new Complex();</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;myObj.name = &#8220;foobar&#8221;;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;myObj.value = 42;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;return myObj;</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}</p>
<p>&nbsp;&nbsp; }</p>
<p></p>
<p>&nbsp;&nbsp; public class Complex</p>
<p>&nbsp;&nbsp; {</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; public String name;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; public int value;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; public Complex()</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; }</p>
<p>&nbsp;&nbsp; }</p>
<p>}&nbsp;</p>
<p>{/codecitation}&nbsp;Once again, a change to the client side:</p>
<p>&nbsp;{codecitation class=&#8221;brush: java;&#8221; width=&#8221;500px&#8221;}</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String soapAction2 = &#8220;http://tempuri.org/HelloServer2&#8243;;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SoapObject rpc2 = new SoapObject(serviceNamespace, &#8220;HelloServer2&#8243;);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SoapSerializationEnvelope envelope2 = new SoapSerializationEnvelope(SoapEnvelope.VER11);</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;envelope2.bodyOut = rpc2;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;envelope2.dotNet = true;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;envelope2.encodingStyle = SoapSerializationEnvelope.XSD;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;// Add the mapping so that the return value can be converted back to our Complex obejct.&nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &#038;n<br />
bsp; &nbsp;envelope2.addMapping(&#8220;http://tempuri.org/encodedTypes&#8221;, &#8220;Complex&#8221;, new Complex().getClass());</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;envelope2.setOutputSoapObject(rpc2);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;HttpTransport ht2 = new HttpTransport(serviceUrl);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ht2.setXmlVersionTag(&#8220;&lt;?xml version=&#8221;1.0&#8243; encoding=&#8221;UTF-8&#8243;?&gt;&#8221;);</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;ht2.debug = true;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String result2;</p>
<p></p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;try</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p><span class="Apple-tab-span" style="white-space: pre;">	</span> &nbsp; &nbsp; &nbsp; &nbsp;ht2.call(soapAction2, envelope2);<span class="Apple-tab-span" style="white-space: pre;">	</span> &nbsp; &nbsp; &nbsp;&nbsp;</p>
<p><span class="Apple-tab-span" style="white-space: pre;">	</span> &nbsp; &nbsp; &nbsp; &nbsp;Complex myObj = (Complex)envelope2.getResponse();</p>
<p><span class="Apple-tab-span" style="white-space: pre;">	</span> &nbsp; &nbsp; &nbsp; &nbsp;result2 = myObj.getClass().getName() + &#8220;, name=&#8221;+ myObj.name +&#8221;, value=&#8221;+myObj.value;<span class="Apple-tab-span" style="white-space: pre;">		</span> &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;} &nbsp; &nbsp; &nbsp; &nbsp;</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;catch(Exception ex)</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;{</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;">	</span>//if we get an exception we&#8217;ll just write the msg to the screen.</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;">	</span>result2 = ex.toString();</p>
<p>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;}&nbsp;</p>
<p>{/codecitation}&nbsp;</p>
<p>There you have it! Well&#8230; almost. There is one thing that I have not been able to get working properly; that is passing a string to a web service as a parameter and returning a complex type. If anyone can find the flaw in my code and can get this working I would appreciate hearing from you!</p>
<p>&nbsp;<b>UPDATE: Check out Part 3 of this series to see complex types in action!&nbsp; </b></p>
<p>&nbsp;</p>
<h1 style="font-family: Helvetica,Arial,sans-serif; font-size: 16px; font-weight: bold; color: rgb(102, 102, 102);">Resources:<span class="Apple-style-span" style="font-family: Tahoma; font-size: 12px;">&nbsp;</span></h1>
<ul>
<li><a href="index.php?/Blog/blackberry-and-net-webservice-tutorial-part-1.html" mce_href="index.php?/Blog/blackberry-and-net-webservice-tutorial-part-1.html">Part 1 of this tutorial</a></li>
<li><a href="downloads/ServerSample.rar" mce_href="downloads/ServerSample.rar">Server&nbsp;Source Code for this tutorial&nbsp;(C#)</a></li>
<li><a href="downloads/sampleworkspace-Part2.rar" mce_href="downloads/sampleworkspace-Part2.rar">Client Source Code for this tutorial (Java)</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/blackberry_and_net_webservice_tutorial_part_2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BlackBerry and .NET Web Service Tutorial &#8211; Part 1</title>
		<link>http://craigagreen.com/blackberry_and_net_web_service_tutorial_part_1/</link>
		<comments>http://craigagreen.com/blackberry_and_net_web_service_tutorial_part_1/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 17:24:32 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>

		<guid isPermaLink="false">/blackberry_and_net_web_service_tutorial_part_1/</guid>
		<description><![CDATA[<script type="text/javascript" src="jquery.js"></script><script type="text/javascript" src="main.js"></script><style>#preview{	position:absolute;	border:1px solid #ccc;	background:#333;	padding:5px;	display:none;	color:#fff;	}/*  */</style><p>I have recently been trying to write a BlackBerry application to consume a .NET web service. It wasn't as trivial as I had first thougt. It wasn't the code that was challenging, &#160;for me it was the environment setup. By cobbling together various bits and pieces from around the net(see references below) I was able to get my application running. I've documented my experience here. This tutorial will take you from a clean machine to a working BlackBerry app with .NET web service.</p>]]></description>
			<content:encoded><![CDATA[<p><span class="Apple-style-span" style="color: #666666; font-family: Helvetica; font-size: 16px; font-weight: bold;">Setting up Eclipse and Installing KSoap2 on the BlackBerry </span></p>
<p>First of all, do yourself a favour. Just download the Full JDE Plugin, it includes Eclipse. I started by installing a vanilla Eclipse and getting the plugins after, it wasn&#8217;t worth the hassle for me. I&#8217;m using version 1.0.0.67</p>
<p>Now fire it up and let&#8217;s start.</p>
<ol>
<li>Create a new workspace.<br />
<a class="preview" title="" href="/images/stories/bbwebservice/workspacelauncher.jpg"><img class="caption" title="Figure 1 - New Workspace" src="/images/stories/bbwebservice/thumb_workspacelauncher.jpg" alt="gallery thumbnail" /></a></li>
<li>Create a new BlackBerry Project. File &gt; New &gt; Project Select BlackBerry project named ?Sample?.(Figure 2)</li>
<li>Create another new BlackBerry Project named &#8216;KSoapLibrary&#8217; (Figure 3).<br />
<a class="preview" title="" href="/images/stories/bbwebservice/newsampleproject.jpg"><img class="caption" title="Figure 2 - New Project Named 'Sample'" src="/images/stories/bbwebservice/thumb_newsampleproject.jpg" alt="gallery thumbnail" /></a><a class="preview" title="Figure 3 - New Project Named 'KSoapLibrary'" href="/images/stories/bbwebservice/newksoapproject.jpg"><img class="caption" title="Figure 3 - New Project Named 'KSoapLibrary'" src="/images/stories/bbwebservice/thumb_newksoapproject.jpg" alt="gallery thumbnail" /></a></li>
<li> Open the Project Properties for KSoapLibrary. Go the &#8216;BlackBerry Project Properties&#8217; and click the &#8216;Application&#8217; tab. From the Project Type drop down select Library (Figure 4). Click OK.<br />
<a class="preview" title="Figure 4 - KSoapLibrary Project Type" href="/images/stories/bbwebservice/ksoapproperties.jpg"><img class="caption" title="Figure 4 - KSoapLibrary Project Type" src="/images/stories/bbwebservice/thumb_ksoapproperties.jpg" alt="gallery thumbnail" /></a></li>
<li> Now we need to add the KSoapLibrary as a project reference to the Sample project. Go to the Project Properties for Sample, click the Project References and select the KSoapLibrary checkbox (Figure 5).  Click OK.<br />
<a class="preview" title="Figure 5 - Add KSoapLibrary as a Project Reference" href="/images/stories/bbwebservice/sampleprojectreferences.jpg"><img class="caption" title="Figure 5 - Add KSoapLibrary as a Project Reference" src="/images/stories/bbwebservice/thumb_sampleprojectreferences.jpg" alt="gallery thumbnail" /></a></li>
<li> It&#8217;s time to create a class within our Sample project. Select New &gt; Class. Set the class and packages names (Figure 6). Click Finish.<br />
<a class="preview" title="Figure 6 - New HelloWorld Class" href="/images/stories/bbwebservice/newclass.jpg"><img class="caption" title="Figure 6 - New HelloWorld Class" src="/images/stories/bbwebservice/thumb_newclass.jpg" alt="gallery thumbnail" /></a></li>
<li>Add the contents of the HelloWorld.java file found in the Resources section at the bottom of this page to your new class.</li>
<li>Eclipse will now give you a number of errors in the file (Figure 7).  This is because Eclipse does not have the KSoap files within the build classpath. Let&#8217;s fix that.<br />
<a class="preview" title="Figure 7 - Errors" href="/images/stories/bbwebservice/errors.jpg"><img class="caption" title="Figure 7 - Errors" src="/images/stories/bbwebservice/thumb_errors.jpg" alt="gallery thumbnail" /></a></li>
<ul>
<li>Create a folder within the KSoapLibrary project named ?lib? and add the ksoap2-j2me-core-prev-2.1.2.jar file to the new folder. The pre-verified ksoap file is VERY important. You can either preverify it yourself or<a href="/downloads/ksoap2-j2me-core-prev-2.1.2.jar">download ksoap2-j2me-core-prev-2.1.2.jar now</a>.</li>
<li>In the Sample project properties. Click on the ?Java Build Path? item, then the ?Libraries? tab. Finally, click ?Add Jars??. Select the KSoap jar, then click OK. Now click on the ?Order and Export? tab and select the KSoap jar and click OK (Figure 8).<br />
<a class="preview" title="Figure 8 - Add KSoap Jar" href="/images/stories/bbwebservice/jarselection.jpg"><img class="caption" title="Figure 8 - Add KSoap Jar" src="/images/stories/bbwebservice/thumb_jarselection.jpg" alt="gallery thumbnail" /></a></li>
<li>Now your Eclipse Package Explorer should like the screen shot below, and the error will have disappeared (Figure 9).<br />
<a class="preview" title="Figure 9 - Eclipse Package Explorer" href="/images/stories/bbwebservice/packageexplorer.jpg"><img class="caption" title="Figure 8 - Add KSoap Jar" src="/images/stories/bbwebservice/thumb_packageexplorer.jpg" alt="gallery thumbnail" /></a></li>
</ul>
<li>Finally, create another folder under your Samples project named ?images? and add an icon to it. Now go to your project properties then ?BlackBerry Project Properties? and add some information to the ?General? tab and add your icon from the ?Resources? tab (Figure 10).<br />
<a class="preview" title="Figure 10 - General Tab" href="/images/stories/bbwebservice/generaltab.jpg"><img class="caption" title="Figure 8 - Add KSoap Jar" src="/images/stories/bbwebservice/thumb_generaltab.jpg" alt="gallery thumbnail" /></a></li>
<li>Done! Now Run it!<br />
<a class="preview" title="Figure 11 - HelloWorld!" href="images/stories/bbwebservice/helloworld.jpg"><img class="caption" title="Figure 11 - HelloWorld!" src="images/stories/bbwebservice/thumb_helloworld.jpg" alt="gallery thumbnail" /></a></li>
</ol>
<h1>Didn&#8217;t work?</h1>
<p>Common problems may include ?Error Starting Sample: Module ?ksoap2-j2me-core-prev-2.1.2? not found.? I struggled with this for some time. Go back and retrace your steps, you?ve skipped over something. Even though it compiles fine within Eclipse the ksoap jar has not been deployed to the device along with the rest of your code. I have noticed an annoyance where the KSoap jar will be removed from the Properties &gt; Java Build Path ?Libraries? and ?Order and Export? tabs if you make any further changes to the ?BlackBerry Project Properties?. You?ll have to go back in and re-add the jar.<br />
<a class="preview" title="I hated this error!" href="/images/stories/bbwebservice/helloworlderror.jpg"><img class="caption" title="I hated this error!" src="/images/stories/bbwebservice/thumb_helloworlderror.jpg" alt="gallery thumbnail" /></a></p>
<p>The next example will build off of this and demonstrate how to connect to a .NET web service.</p>
<h1>Resources:<span class="Apple-style-span" style="font-family: Tahoma; font-size: 12px;"> </span></h1>
<ul>
<li><a onclick="javascript: pageTracker._trackPageview('/downloads/sampleworkspace.rar'); " href="/downloads/sampleworkspace.rar">Source Code for this tutorial</a></li>
<li>BacklBerry JDE Eclipse Full Plugin: <a href="http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp">http://na.blackberry.com/eng/developers/javaappdev/javaeclipseplug.jsp</a></li>
<li><span class="Apple-style-span" style="font-family: 'Segoe UI'; font-size: 13px; line-height: normal;">BlackBerry Development Tools &#8211; Eclipse Plugin (in beta): <span class="Apple-style-span" style="font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 12px; line-height: 15px;"><a href="http://developerlife.com/tutorials/?p=427">http://developerlife.com/tutorials/?p=427</a> </span></span></li>
<li>BlackBerry JDE and kSoap and noobs: <a href="http://www.blackberryforums.com/developer-forum/140930-blackberry-jde-ksoap-noobs.html">http://www.blackberryforums.com/developer-forum/140930-blackberry-jde-ksoap-noobs.html</a></li>
<li>**** BlackBerry and Ksoap2 Tutorial *****: <a href="http://www.blackberryforums.com/developer-forum/155972-blackberry-ksoap2-tutorial.htm&lt;br /&gt;<br />
l">http://www.blackberryforums.com/developer-forum/155972-blackberry-ksoap2-tutorial.html</a></li>
<li><a href="http://craigagreen.com/index.php?/Blog/blackberry-and-net-web-service-tutorial-part-2.html">Part 2 of this tutorial</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/blackberry_and_net_web_service_tutorial_part_1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Agile Presentation</title>
		<link>http://craigagreen.com/agile_presentation/</link>
		<comments>http://craigagreen.com/agile_presentation/#comments</comments>
		<pubDate>Wed, 03 Jun 2009 01:37:33 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>

		<guid isPermaLink="false">/agile_presentation/</guid>
		<description><![CDATA[<p>I recently gave a high level presentation on Agile and Scrum. Below is a sanitized version for reuse.&#160;If you do resuse&#160;any of it all I ask is that you drop me a line to let me know that you found it useful.</p><iframe frameborder="0" width="555" height="451" mce_src="http://docs.google.com/EmbedSlideshow?id=ajdtj5j5qrr3_165cgh59tdg&#38;size=m" src="http://docs.google.com/EmbedSlideshow?id=ajdtj5j5qrr3_165cgh59tdg&#38;size=m"></iframe>]]></description>
			<content:encoded><![CDATA[<p>I recently gave a high level presentation on Agile and Scrum. Below is a sanitized version for reuse.&#160;If you do resuse&#160;any of it all I ask is that you drop me a line to let me know that you found it useful.</p><iframe frameborder="0" width="555" height="451" mce_src="http://docs.google.com/EmbedSlideshow?id=ajdtj5j5qrr3_165cgh59tdg&#38;size=m" src="http://docs.google.com/EmbedSlideshow?id=ajdtj5j5qrr3_165cgh59tdg&#38;size=m"></iframe>]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/agile_presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Application Personality</title>
		<link>http://craigagreen.com/application_personality/</link>
		<comments>http://craigagreen.com/application_personality/#comments</comments>
		<pubDate>Mon, 25 May 2009 12:09:28 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>

		<guid isPermaLink="false">/application_personality/</guid>
		<description><![CDATA[<p>What is your application's personality?</p><p>We are currently updating our error page ... this got me thinking about our what the error page says about our web application. &#160;Is it serious, cool and business-like, does it "work hard, play harder", or is it light harted. Further more, is it consistent throughout the application or does it suffer from Multiple Personality Disorder?</p><p>As a user, how do you feel when a Windows error dialog comes up accompanied with the 'Critical Stop' &#160;sound? Do you feel the same way when you see Twitter's&#160;<a mce_href="http://www.failwhale.com" href="http://www.failwhale.com">Fail Whale</a>? What about&#160;<a mce_href="http://www.google.com/chrome" href="http://www.google.com/chrome">Google Chrome</a>'s&#160;<a mce_href="http://www.tipsfor.us/2008/09/24/when-chrome-crashes-aw-snap-screenshot/" href="http://www.tipsfor.us/2008/09/24/when-chrome-crashes-aw-snap-screenshot/">"Aw, Snap" error</a>? </p><p>&#160;<img alt="Google Chrome's Error Page" title="Aw, Snap!" class="caption" src="images/stories/awsnap.jpg"></p><p>Chances are you are more forgiving of the latter two than you are of Windows. Why? Same reason you are more likely to forgive people. You like them better, and that starts with personality.</p><p>In Marcus Buckingham and Curt Coffman's book, "<a mce_href="http://www.amazon.com/First-Break-All-Rules-Differently/dp/0684852861" href="http://www.amazon.com/First-Break-All-Rules-Differently/dp/0684852861">First, Break All the Rules: What the World's Greatest Managers Do Differently</a>", they explore what makes a great nurse. They found that it wasn't the technique used when giving an injection, it was what they said before the injection. It was their&#160;personality. Nurses that showed empathy and told their patients that the injection would hurt a little were see as&#160;superior&#160;nurses.</p><p>A software application should do the same. Even a line of business (LOB) application should say "I know you are forced to use me from 9 to 5 to do your job and you would much rather be on Facebook, but let me help to make your work a little less painful and maybe even enjoyable". For non-LOB applications a strong personality and sense of identity is a must.</p>]]></description>
			<content:encoded><![CDATA[<p>What is your application's personality?</p><p>We are currently updating our error page ... this got me thinking about our what the error page says about our web application. &#160;Is it serious, cool and business-like, does it "work hard, play harder", or is it light harted. Further more, is it consistent throughout the application or does it suffer from Multiple Personality Disorder?</p><p>As a user, how do you feel when a Windows error dialog comes up accompanied with the 'Critical Stop' &#160;sound? Do you feel the same way when you see Twitter's&#160;<a mce_href="http://www.failwhale.com" href="http://www.failwhale.com">Fail Whale</a>? What about&#160;<a mce_href="http://www.google.com/chrome" href="http://www.google.com/chrome">Google Chrome</a>'s&#160;<a mce_href="http://www.tipsfor.us/2008/09/24/when-chrome-crashes-aw-snap-screenshot/" href="http://www.tipsfor.us/2008/09/24/when-chrome-crashes-aw-snap-screenshot/">"Aw, Snap" error</a>? </p><p>&#160;<img alt="Google Chrome's Error Page" title="Aw, Snap!" class="caption" src="images/stories/awsnap.jpg"></p><p>Chances are you are more forgiving of the latter two than you are of Windows. Why? Same reason you are more likely to forgive people. You like them better, and that starts with personality.</p><p>In Marcus Buckingham and Curt Coffman's book, "<a mce_href="http://www.amazon.com/First-Break-All-Rules-Differently/dp/0684852861" href="http://www.amazon.com/First-Break-All-Rules-Differently/dp/0684852861">First, Break All the Rules: What the World's Greatest Managers Do Differently</a>", they explore what makes a great nurse. They found that it wasn't the technique used when giving an injection, it was what they said before the injection. It was their&#160;personality. Nurses that showed empathy and told their patients that the injection would hurt a little were see as&#160;superior&#160;nurses.</p><p>A software application should do the same. Even a line of business (LOB) application should say "I know you are forced to use me from 9 to 5 to do your job and you would much rather be on Facebook, but let me help to make your work a little less painful and maybe even enjoyable". For non-LOB applications a strong personality and sense of identity is a must.</p>]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/application_personality/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When Scrum Smells Funny</title>
		<link>http://craigagreen.com/when_scrum_smells_funny-2/</link>
		<comments>http://craigagreen.com/when_scrum_smells_funny-2/#comments</comments>
		<pubDate>Sun, 17 May 2009 00:00:00 +0000</pubDate>
		<dc:creator>Craig</dc:creator>
				<category><![CDATA[stuff]]></category>

		<guid isPermaLink="false">/when_scrum_smells_funny-2/</guid>
		<description><![CDATA[<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; line-height: normal; "><div style="font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 76%; background-color: rgb(255, 255, 255); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; line-height: 1.3em; color: rgb(51, 51, 51); background-position: initial initial; "><p>The great thing about Scrum is that when you do it right it lets you know when you are doing it wrong. At&#160;<a mce_href="ztr.com" target="_blank" style="color: rgb(27, 87, 177); text-decoration: none; font-weight: normal; " href="ztr.com">ZTR</a>&#160;we have been practising&#160;Scrum&#160;for a while now, but lately it hasn't felt right. Maybe it's because we've fallen back to the Waterfall mentality of "code now and let QA find the bug later" or perhaps it's becuase the team if feeling less empowered as some decision making is removed. Whatever the reason, something doesn't smell right, and as long as you are&#160;<i><b>truthful</b><span class="Apple-style-span" style="font-style: normal; ">&#160;with yourself, your team and your process Scrum has wonderful mechanisms to let you know when you've become a ScrumBut ("Oh yeah, we do Scrum, BUT... &#60;insert shoot yourself in the foot shortcut here&#62;).&#160;</span></i></p></div></span>]]></description>
			<content:encoded><![CDATA[<span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: 'Times New Roman'; font-size: 16px; line-height: normal; "><div style="font-family: Tahoma, Helvetica, Arial, sans-serif; font-size: 76%; background-color: rgb(255, 255, 255); background-image: initial; background-repeat: initial; background-attachment: initial; -webkit-background-clip: initial; -webkit-background-origin: initial; line-height: 1.3em; color: rgb(51, 51, 51); background-position: initial initial; "><p>The great thing about Scrum is that when you do it right it lets you know when you are doing it wrong. At&#160;<a mce_href="ztr.com" target="_blank" style="color: rgb(27, 87, 177); text-decoration: none; font-weight: normal; " href="ztr.com">ZTR</a>&#160;we have been practising&#160;Scrum&#160;for a while now, but lately it hasn't felt right. Maybe it's because we've fallen back to the Waterfall mentality of "code now and let QA find the bug later" or perhaps it's becuase the team if feeling less empowered as some decision making is removed. Whatever the reason, something doesn't smell right, and as long as you are&#160;<i><b>truthful</b><span class="Apple-style-span" style="font-style: normal; ">&#160;with yourself, your team and your process Scrum has wonderful mechanisms to let you know when you've become a ScrumBut ("Oh yeah, we do Scrum, BUT... &#60;insert shoot yourself in the foot shortcut here&#62;).&#160;</span></i></p></div></span>]]></content:encoded>
			<wfw:commentRss>http://craigagreen.com/when_scrum_smells_funny-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

