View Christos Tranoris's profile on LinkedIn


Visit The Model Driven Software Network

Who's online

There are currently 0 users and 6 guests online.

Syndicate

Syndicate content

Anonymous | August 17, 2010 - 14:45

Folks,

This was a great tutorial.  Actually worked for me.  I extended the service so
it actually does something.  You can change the status message and get it
to add numbers.
 <code>
package myPkg;

public class MyService {
   
    static String status;
    static int one, two;
   
    public MyService() {
    }
   
    public Boolean Configure(String param){
       
        status = param;       
        return true;
    }
   
    public Boolean StartMe(){
    return true;
    }
   
    public Boolean StopMe(){
    return true;
    }
   
    public Boolean SetNums(int x, int y) {
       
        one = x;
        two = y;
        return true;
    }
   
    public int AddNums() {
       
        return(one+two);
       
    }
   
    public String getStatus(){
        return status;
    }
   
}
</code>

Reply

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.