craigAgreen
BlackBerry and .NET WebService Tutorial (It Works!) - Part 3 PDF Print
Wednesday, 27 January 2010 02:28

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: 

 

 .NET web service

 [WebService(Namespace = "urn:tempuri")]
 [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
 public class HelloWorldService : System.Web.Services.WebService
 {


    [SoapRpcMethod(), WebMethod]
    public Complex HelloServer2(string user, string pwd) 
    {
       Complex myObj = new Complex();
       myObj.name = string.Format("user:{0}, pwd:{1}", user, pwd);
       myObj.value = 42;
       return myObj; 
    }
 


    public class Complex 
    {
      public string name; 
      public int value; 
    } 
 } 

 

In HelloWorld.java: 

String serviceUrl = "http://localhost/HPServices/HelloWorldService.asmx";        
String serviceNamespace ="urn:tempuri"; //saw a post saying "http://tempuri.org/" might cause a problem.  Who knows?!
String soapAction = "urn:tempuri/HelloServer2";
       
SoapObject rpc = new SoapObject(serviceNamespace, "HelloServer2");
rpc.addProperty("user", "testuser");
rpc.addProperty("pwd", "123password");        
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.encodingStyle = SoapSerializationEnvelope.ENC;
envelope.bodyOut = rpc;


//envelope.dotNet = true;
     
// Add the mapping so that the return value can be converted back to our Complex object.  
envelope.addMapping("urn:tempuri/encodedTypes", "Complex", new Complex().getClass()); 
 
 


 
Did you see that?!?!?!
        //envelope.dotNet = true;
Nice.
 
Thanks Michael.
 
Stackoverflow DevDays - Toronto PDF Print
Sunday, 25 October 2009 03:20

I had great expectations for this day. 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.

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.

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).

 [Update: Ralph Whitbeck's jQuery talk can be found here]

Greg Wilson saved the day (slides here). 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.

[Update: Greg Wilson's talk can be found here] 

Reg Braithwaite 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.

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

 
Your invitation to preview Google Wave PDF Print
Wednesday, 14 October 2009 19:26

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 flaky, but that's to be expected and can be forgiven (for now).

My wave account is  This e-mail address is being protected from spambots. You need JavaScript enabled to view it  

 

 

 

 

 
BlackBerry and .NET WebService Tutorial - Part 2 PDF Print
Wednesday, 01 July 2009 04:30

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.

Read more...
 
BlackBerry and .NET Web Service Tutorial - Part 1 PDF Print
Monday, 22 June 2009 17:24

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,  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.

Read more...
 
<< Start < Prev 1 2 Next > End >>

Page 1 of 2

Sponsored Links