Skip to Content

If you know me…you know I love to build blog series…but this time, I’m not going to talk about PHP, Ruby or Python. I’m going to talk about SMP and what can we do with it. Of course, being this my first blog on the matter, I will start with a very basic program, that will read a public web service and return us some information back.

First off all…I gotta admit that I based myself on the great video series created by my friend and team mate Ingo Sauerzapf.

For this blog, I’m using the Developer Center for SMP. So the first thing is to open some application in order: Start Sybase Unwired Platform, MD5, 9800, Sybase Control Center and Sybase Unwired WorkSpace.

SUP_Weather_00.png

When we log into the Sybase Control Center, we must create a user for our application.

SUP_Weather_01.png

After we have created our user, we can move to the BlackBerry emulator and choose the “Workflow” application. Which is going to be of course empty, so we need to configure it by going to it’s settings.

SUP_Weather_02.png

We’re using the same User Name and Activation Code that we used on the Sybase Control Center. Next step is to open the Sybase Unwired WorkSpace and create a new Mobile Application Project and call it “Weather_Convertion”. (I know…I have a typo…should be Conversion…but I have all the pictures taken, so you guys corrected when creating your applications).

We must create an Mobile Business Object and name it “Weather_Object”.

SUP_Weather_013.png

As we’re going to use a Web Service, we need to choose it as the Data Source and create a Profile for it, which is basically provide the Web Service to use. We’re going to use this one: http://www.w3schools.com/webservices/tempconvert.asmx?WSDL It’s important that we change the default String value on the Attributes Mapping to (3)…because 100 it’s just too much 😉

Next step is to create a Personalization Key which we will call CelsiusPK.

SUP_Weather_018.png

On our Mobile Business Object, we should go to the attributes, and then load arguments to establish the personalization key we just created.

SUP_Weather_019.png

After that, a simple right click to Deploy Project would be more than enough.

SUP_Weather_022.png

We’re now ready for the next step, which should be the “GUI” to call it in a way…let’s create a Mobile Workflow Forms Editor object and call it Weather_Convertion (Again…sorry for the typo), here it’s important to check the first checkbox, which will state that our application can be started on demand. When everything is ready, we need drag and drop our Weather_Object into our Form Editor environment.

SUP_Weather_025.png

We it’s done, we can double click on the “Start Screen” and add a Menu Item with the name “Get Fahrenheit”, with the following options.

SUP_Weather_03.png

SUP_Weather_026.png

We need to link this to our Weather_Object, so let’s search it and call it’s query operation. Also we can Generate an error screen and set the default success screen, which is the screen which should be shown is everything went right.

SUP_Weather_027.png

It’s very important to go to the Personalization Key Mapping and link the Personalization Key with the Object Key.

SUP_Weather_029.png

With that set…we can right click and call the “Generate Mobile Workflow Package…”. And we can even assign our application to work only for certain users.

SUP_Weather_031.png

Without a single line of code, we can test our little application and confirm that it’s working just fine…

SUP_Weather_032.png

SUP_Weather_033.png

SUP_Weather_034.png

I hope you liked this first blog, even when it’s really basic…I promise that my next blog is going to be really nice…might take me a while, as it’s not easy, but I’m sure it’s going to be something worth to wait for 😎

To report this post you need to login first.

16 Comments

You must be Logged on to comment or reply to a post.

      1. Mark Teichmann

        I already tried that some days earlier but I could not provide an access code. Although I could submit the form I did not get an answer until now.

        But the link ‘Request access to SUP’ comes with a comment ‘(with access code only)’.

        Now I would like to know where I could get this access code?

        (0) 
        1. Alvaro Tejada Galindo Post author

          Mark:

          I just checked with my teammates…your request will be processed, but you need to be patient as we had Pre-DKOM on San Jose and an InnoJam in Bangalore 😉

          Greetings,

          Blag.

          (0) 
  1. Pasquale De Angelis

    Hi Blag,

    i have followed your sample but when i call ‘GetFahreneit’ i obtain the following message from Android Emulator :

    it’s not possible to load file:///…….UnwiredPlatform\Servers\MessagingServer\bin\WorkFlowClient.dll access denied …..

    Have you some idea?

    Thanks

    Marco

    (0) 
    1. Alvaro Tejada Galindo Post author

      Pasquale:

      I’m not much of an Android user…so I always use the BlackBerry emulator…I tried with the Android one and for me it’s working just fine…have you tried with the BB one? Do you have the same error? All the images on the Dev Center are based on a master image, so basically yours and mine are the same…are you sure you follow the steps correctly?

      Greetings,

      Blag.

      (0) 
      1. Pasquale De Angelis

        Hi Alvaro,

        thank you for your support, i have solved, below i explain how:

        i have verified that WorkFlowClient.dll was ‘encrypted’ (showed green under Win7 64 OS) then with right-click/properties/advanced i have unchecked ‘encrypted’ attribute.

        I have restarted Unwired Server and now it works fine.

        Bye

        Marco

        (0) 
  2. Pasquale De Angelis

    Hi Alvaro,

    i have requested an access to SUP Sandbox about one week ago but i haven’t received any answer, how i can check if my request has been processed ?

    Thanks

    Pasquale

    (0) 

Leave a Reply