Keywords

.NET (3) .rb (1) *.cod (1) 3110c (1) Algorithm (1) Amazon Cloud Drive (1) amkette (1) Android (1) Apex (6) apex:dynamic (1) API (1) API version (1) Application Development Contest (2) Artificial Intelligence (2) Atricore (1) b2g (1) Binary Search Tree (1) Blackberry Application Development (1) Blackberry Java Development Environment (1) Blender Game Engine (1) bluetooth (2) Boot2Gecko (1) bug fix (1) C (1) C++ (2) Cloud computing (1) Cloud Storage (1) Code Blocks (1) Code for a Cause (2) codejam (1) Coding (1) const_cast (1) Custom Help (1) Dancing With the Googlers (1) Data Structures (1) desktop environment (5) Doubly Linked List (1) Dropbox (1) dynamic visualforce component (1) dynamic_cast (1) Enterprise WSDL (1) Execution Context (1) fedora 14 (1) fedora 17 (5) Firefox OS (1) Flashing Nokia 3110c handset (1) Force.com (7) Gaia (1) Game Developement (1) GCC (2) GDG (2) Goank (1) Google (4) Google Developer Group (2) Google Drive (1) GTK+ (5) HACK2012 (2) Hall of Mirrors (1) help for this page (1) HTML5 (2) HTTP Web Server (1) IDE (1) Identity Provider (1) Intelligent Systems (1) Java (1) JDE (1) JOSSO (1) location based social network (1) me.social (1) MinGW (1) Natural Language Processing (1) Natural Language Toolkit (1) neckphone (1) NLKT (1) Nokia Pheonix (1) Notebook (1) Numeric XML Tags (1) OAuth2.0 (1) OLPC (7) OLPC-XO-1 (7) One Laptop per Child (5) Override custom help (1) Paas (1) Partner WSDL (1) Polymorphism (1) programming contest (1) PyGTK (4) Python (10) Recycled Numbers (1) reinterpret_cast (1) Research (1) REST (1) RM-237 (1) Robotics (1) Ruby (1) Saas (2) Salesforce.com (7) SDK (1) Service Provider (1) Single sign on (1) SOAP (3) Speaking in Tongues (1) SSO Agent (1) SSO Gateway (1) static_const (1) sugar (7) sugar activity (4) sugarlabs (7) SVG (2) Symbiotic AI (1) Tabbed container (1) TCP/IP (1) TCP/IP stack (1) Typecasting (1) typeid (1) ubuntu 13.10 (1) UDP (1) Upgrade Assembly (1) Visualforce (2) Web Server (1) Web Services (3) Web2.0 (1) wikipedia (1) wikipediaHI (1) WSDL (1) XML tags (1)

Monday, February 13, 2012

Flashing your Nokia 3110c handset

Hi,

I am writing this blogspost to share the procedure to flash your Nokia 3110c mobile handset. Last week I was synchronizing my contacts with Gmail using Nokia suite. It asked me to upgrade my firmware, I clicked ok and suddenly after upgrade my Nokia 3110c started showing abnormal behaviour. When I switched on a white screen flashed 3 times and phone gets switched off. This is due to the fact the upgrade wasn't successful and your nokia 3110c files are corrupted.

I followed few steps and got my phone back just free of cost. If you go to Nokia store they might take huge amount for this.. So here are the steps:
1. Download Nokia Pheonix setup.
2. Download RM-237 files from http://www.mediafire.com/?gdjv2ej1m9328so. Nokia 3110c product type is RM-237 hence downloading firmware files.
3. extract these files and create a folder with name "RM-237" under "C:\Program Files\Nokia\Phoenix\Products\" and paste extracted files in RM-237 directory.
4. Start pheonix. Make sure "NO CONNECTIONS" is selected in connections dropdown.
5. Goto "File> Open Product". Select RM-237 from product type.
6. Goto "Flashing>Firmware Update". Select RM-237 from Product type in dialog that opens on hitting browse button next to product code.
7.Click "Dead phone USB flashing" and connect your phone to your PC with USB cable.
8. Click "Refurbish" and wait for pheonix to flash your phone. Please be patient since it takes 10-15 mins.- don't interrupt in this step.

You will see such logs in output section:

Flashing started
Creating product data items list
Product data items list created
Backup not required
Flashing phone
Initializing
Scanning image files...
Waiting for USB device...
Loading secondary boot code: 14528 bytes
Secondary boot loaded
Loading update server code: 253888 bytes
Update server loaded
Asic CMT: Verifying communication to device...
Asic CMT: Verifying communication to device...
Scanning image files...
Creating 128k file from rm237__07.30.image_c_tr...
Asic CMT: Start programming 22403 KB...
Asic CMT: Erasing rm237__07.30.mcusw
Asic CMT: Erasing area 1...
Asic CMT: Erasing area 2...
Asic CMT: Erasing area 3...
Asic CMT: Erasing area 4...
Asic CMT: Erasing area 5...
Asic CMT: Erasing area 6...
Asic CMT: Erasing area 7...
Asic CMT: Erasing area 8...
Asic CMT: Erasing area 9...
Asic CMT: Erasing rm237__07.30.ppm_c
Asic CMT: Erasing area 1...
Asic CMT: Erasing rm237__07.30.image_c_tr_128
Asic CMT: Erasing area 1...
Asic CMT: Programming rm237__07.30.mcusw
Asic CMT: Programming  0%
Asic CMT: Programming  2%
Asic CMT: Programming  4%
Asic CMT: Programming  6%
Asic CMT: Programming  8%
Asic CMT: Programming  10%
Asic CMT: Programming  12%
Asic CMT: Programming  14%
Asic CMT: Programming  16%
Asic CMT: Programming  18%
Asic CMT: Programming  20%
Asic CMT: Programming  22%
Asic CMT: Programming  24%
Asic CMT: Programming  26%
Asic CMT: Programming  28%
Asic CMT: Programming  30%
Asic CMT: Programming  32%
Asic CMT: Programming  34%
Asic CMT: Programming  36%
Asic CMT: Programming  38%
Asic CMT: Programming  40%
Asic CMT: Programming  42%
Asic CMT: Programming  44%
Asic CMT: Programming  46%
Asic CMT: Programming  48%
Asic CMT: Programming  50%
Asic CMT: Programming  52%
Asic CMT: Programming  54%
Asic CMT: Programming  56%
Asic CMT: Programming  58%
Asic CMT: Programming  60%
Asic CMT: Programming  62%
Asic CMT: Programming  64%
Asic CMT: Programming rm237__07.30.ppm_c
Asic CMT: Programming  66%
Asic CMT: Programming  68%
Asic CMT: Programming  70%
Asic CMT: Programming  72%
Asic CMT: Programming  74%
Asic CMT: Programming  76%
Asic CMT: Programming  78%
Asic CMT: Programming  80%
Asic CMT: Programming  82%
Asic CMT: Programming rm237__07.30.image_c_tr_128
Asic CMT: Programming  84%
Asic CMT: Programming  86%
Asic CMT: Programming  88%
Asic CMT: Programming  90%
Asic CMT: Programming  92%
Asic CMT: Programming  94%
Asic CMT: Programming  96%
Asic CMT: Programming  98%
Asic CMT: Verifying communication to device...
Phone flashing completed. Waiting for phone to boot up
Bootup successful
Verifying communication to product (before flash finalizing) 
Communication verified
Product code changed
Doing factorysets
Factorysets complete
Loading default data to phone
Loading default data to phone
Getting Data Package
Reading product state
Starting backup/restore sub-procedure: data item pre-delay
data item pre-delay
data item pre-delay
Sub-procedure completed: Succeeded., result code: 0
Starting to backup/restore data item: Certificates, version: 1.0
Data Item backup/restore completed: Succeeded., result code: 0
Starting backup/restore sub-procedure: data item post-delay
data item post-delay
data item post-delay
Sub-procedure completed: Succeeded., result code: 0
Starting backup/restore sub-procedure: data item pre-delay
data item pre-delay
data item pre-delay
Sub-procedure completed: Succeeded., result code: 0
Starting to backup/restore data item: EmergencyNumbers, version: 1.0
Data Item backup/restore completed: Succeeded., result code: 0
Starting backup/restore sub-procedure: data item post-delay
data item post-delay
data item post-delay
Sub-procedure completed: Succeeded., result code: 0
Starting backup/restore sub-procedure: data item pre-delay
data item pre-delay
data item pre-delay
Sub-procedure completed: Succeeded., result code: 0
Starting to backup/restore data item: ISSVariantActivator, version: 1.0
Data Item backup/restore completed: Succeeded., result code: 0
Starting backup/restore sub-procedure: data item post-delay
data item post-delay
data item post-delay
Sub-procedure completed: Succeeded., result code: 0
Starting backup/restore sub-procedure: data item pre-delay
data item pre-delay
data item pre-delay
Sub-procedure completed: Succeeded., result code: 0
Starting to backup/restore data item: ProductProfile, version: 1.0
Data Item backup/restore completed: Succeeded., result code: 0
Starting backup/restore sub-procedure: data item post-delay
data item post-delay
data item post-delay
Sub-procedure completed: Succeeded., result code: 0
Backup/restore result: 0 out of 4 items were not backed up
Default data loading complete
Stopping all operations, returning phone to default mode
All operations completed
Firmware updating succeeded.


Once its done it will show "Flashing successful" dialog and starts your Nokia 3110c handset automatically.
You are now ready to use your Nokia 3110c as new :D

I hope you found this blogpost helpful !

Sunday, September 11, 2011

Creating Custom Apex SOAP based Web Service in Salesforce.com's Force.com platform


This blog describes how to create a Custom web service in Salesforce using Apex.

Steps:
  • Navigate to Setup>Develop>Apex Classes  and create new class by clicking new button.
  • Write a class with "global" access modifier with methods (to be exposed) with "webService" keyword
        eg.

global class KartikService
{
    webService static String hello(String Name) 
    {
        return 'Hello '+Name+' ! :D';
    }
}

  • Then save this class. After saving the class you will view a button "Generate WSDL". Click on that to get WSDL for web service you just created. Save the WSDL file. Let say file name is "KartikService.wsdl"
  • Now we will consider how we generate clients to call this service in Java and in .Net.



 For Java:



  • We will create new project in Eclipse with name "ApexCustomWS"
  • You need Enterprise/Partner WSDL to access your Salesforce org. by getting a valid sessionId.
  • Import Enterprise or Partner WSDL file into the project and generate the web service client for that.
  • Import the "KartikService.wsdl" into project and  generate web service client by right clicking on the WSDL file.
  • Image below shows code generated for Partner WSDL in Blue box and code for Custom Web service in Red Box

Above step will generate few Java files. Now add a class "Test.java" and write following code:

package com.sforce.soap.schemas._class.KartikService;
 
import java.net.URL;
import org.apache.axis.AxisFault;
import com.sforce.soap.partner.LoginResult;
import com.sforce.soap.partner.SessionHeader;
import com.sforce.soap.partner.SforceServiceLocator;
import com.sforce.soap.partner.SoapBindingStub;
 
public class Test 
{
   public static void main(String[] args) 
   {
       try 
       {
         //Get a stub for calling partner WSDL's login method in order to get SessionID
         SoapBindingStub bind= (SoapBindingStub)new SforceServiceLocator().getSoap();
         LoginResult lr=bind.login("your_username_here", "your_Password+SecurityToken");
 
         //Create a sessionHeader object and set its sessioId property to sessionId 
         //received in loginResult object                        
         SessionHeader sh=new SessionHeader();
         sh.setSessionId(lr.getSessionId());
 
         //Create a service locator object for your custom web service
         KartikServiceServiceLocator locator=new KartikServiceServiceLocator();
 
         //Get URL for your custom web service
         URL url=new URL(locator.getKartikServiceAddress());
 
         //Create a stub for your custom web service with URL for your service and locator as parameters
         KartikServiceBindingStub stub=new KartikServiceBindingStub(url, locator);
 
         //Set the header property of stub with name "SessionHeader" and value as sh-sessionHeader 
         //object created above 
         stub.setHeader(locator.getKartikServiceAddress(), "SessionHeader", sh);
 
         //now make call to custom service-in our case its "Hello(String name)"
         System.out.println(stub.hello("KARTIK"));
        }
        catch (Exception e) 
        {e.printStackTrace(); }  
   } 
}


Its output:

Hello KARTIK !


For VB.NET:

    • Create a new Winows project or ASP.net project with name "ApexCustomWS"
    • Add Web Service Reference using Partner.wsdl with namespace name as "sForceService"
    • Add Web Service Reference using KartikService.wsdl with namespace name as "MyCustomApexWS"


               

    • Now the project in solution explorer with these references will look like :


               

    • Now we write a procedure "callCustomApexService" that first calls login service and get a sessionID and then make call to custom web service.
    • Code:
    • Imports ApexCustomWS.sForceService
      Imports ApexCustomWS.MyCustomApexWS
       
      Public Class Form1
          Public Sub callCustomApexService()
              Dim stub As New ApexCustomWS.sForceService.SforceService
              Dim lr As LoginResult
              Dim sh As New ApexCustomWS.sForceService.SessionHeader
       
              'make call to login service to get sessionId
              lr = stub.login("your_username_here", "your_Password+SecurityToken")        sh.sessionId = lr.sessionId
              stub.Url = lr.serverUrl
              stub.SessionHeaderValue = sh
       
              'Create stub to call custom web service
              Dim myserviceStub As New MyCustomApexWS.KartikServiceService
              myserviceStub.SessionHeaderValue = New MyCustomApexWS.SessionHeader
              myserviceStub.SessionHeaderValue.sessionId = sh.sessionId
       
              MsgBox(myserviceStub.hello("KARTIK"))
       
          End Sub
          Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
              callCustomApexService()
          End Sub
      End Class
Output of above code will be a MessageBox when the Winform will load in memory.

Saturday, September 3, 2011

Upgrading Assembly for new .NET Framework/ Target to a specific .NET Framework


Upgrading Assembly for new .Net Framework/ Target to a specific .Net Framework

This post describes the process to upgrade an assembly from older .Net versions to newer versions.
Steps:
  1. Open the Class Library project in Visual Studio based on newer .Net framework. This will automatically ask for upgrading the project to target it for newer framework. Continue with upgrading it.
  2.  This will upgrade the project to newer framework version. Now rebuild entire solution by going to "Build>Rebuild Solution".
  3.  Check GlobalAssemblyInfo.<.cs or .vb( language extension)>. Ensure that the assembly version number is correctly targeted to newer version:eg. Upgrading assembly to .Net4.0, GlobalAssemblyInfo must have something like:
                  [assembly: AssemblyVersion("4.0.0.0")]
  1. Now open project properties for project in which you will include this assembly. Goto "Compile" tab.
  2. Click on "Advanced Compile Options". Now check the target framework. If it is .Net Framework 4 Client Profile, when you run your project by including that assembly it will throw an exception like: Warning 1 The referenced assembly "" could not be resolved because it has a dependency on "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" which is not in the currently targeted framework ".NETFramework,Version=v4.0,Profile=Client". Please remove references to assemblies not in the targeted framework or consider retargeting your project. test
  3. Reason behind that your project is target to Framework's client profile. Change the target framework to "All framework" or " .Net Framework 4.0
  4. Now run the project, it will work fine!