Blag’s experiments with SMP – Volume 1
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.
When we log into the Sybase Control Center, we must create a user for our application.
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.
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”.
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.
On our Mobile Business Object, we should go to the attributes, and then load arguments to establish the personalization key we just created.
After that, a simple right click to Deploy Project would be more than enough.
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.
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.
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.
It’s very important to go to the Personalization Key Mapping and link the Personalization Key with the Object Key.
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.
Without a single line of code, we can test our little application and confirm that it’s working just fine…
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 😎
Grande Blag!
The URL i had to change it from ...WDSL-->...WSDL to make it work
Great and easy example (for rookies like me)
Thanks Daniel! Small typo 😐 I already fixed the link...
Volume 2 should come soon...and it's going to be way better than this one 😉
Greetings,
Blag.
Nice Blog Blag 🙂
Where can I get an access code for the SUP Development sandbox?
Mark:
I'm glad you liked my blog...you must go to the Developer Center:
http://www.sdn.sap.com/irj/sdn/index?rid=/webcontent/uuid/10ce4cc7-b924-2f10-f6a8-c381861a927d
A click on "Request Access to SUP" under the Build categorie.
Greetings,
Blag.
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?
Let me check and I will come back to you 😉
Greetings,
Blag.
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.
😎 Great. Thank you for your help!
Sure, no problem at all 😉
Greetings,
Blag.
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
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.
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
Hi Alvaro,
Nice blog!
One detail...some images are not available. Could you please fix it?
Thanks,
Fernando
I have fixed the pictures...sorry for the long delay 🙁
Greetings,
Blag.
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
Thank you very much for this great example, i learned alot from it. waiting for more 🙂
Rana