Powered By Blogger

Thursday, May 31, 2012

Sample Java Web service and the Client to call the same

Sample Web service and the Client to call the same

In this blog we would discuss how to develop webservice , publish the webservice programatically and then develop the client to call the above webservice. 
You need Eclipse or Jdeveloper as the IDE 

step1

First develop the interface for the webservice as shown below

package example;

import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.Style;

@WebService
@SOAPBinding(style=Style.RPC)
public interface HelloWorld {
   
    @WebMethod
    String getHelloWorldAsString(String name);

}


step2

Now implement the above interface as shown below

package example;

import javax.jws.WebService;

@WebService(endpointInterface="example.HelloWorld")
public class HelloWorldImpl implements HelloWorld{
    public String getHelloWorldAsString(String name) {
       
        return "hello world from jax -ws "+name;
    }

}

step3

We need to publish the above webservice so that the WSDL is generated and published in the given location.

package example;

import javax.xml.ws.Endpoint;

public class HelloWorldPublisher {

    /**
     * @param args
     */
    public static void main(String[] args) {
        HelloWorldImpl obj = new HelloWorldImpl();
        Endpoint.publish("http://localhost:8080/example/hello",obj);
        System.out.println("web service published ..");
       
    }

}

step4

Develop the client code to call the above published webservice

package example;

import java.net.MalformedURLException;
import java.net.URL;

import javax.xml.namespace.QName;
import javax.xml.ws.Service;

public class HelloWorldClient {

    /**
     * @param args
     * @throws MalformedURLException
     */
    public static void main(String[] args) throws MalformedURLException {
       
       
        URL url = new URL("http://localhost:8080/example/hello?wsdl");
       
       
        QName qname = new QName("http://example/","HelloWorldImplService");
//note: http://example is target namespace of WSDL and HelloWorldImplService is again taken from //WSDL
       
        //1st argument is the service uri. refer to the wsdl document
        //2nd argumnet is the service name. refer to wsdl
       
        Service service = Service.create(url,qname);
        HelloWorld hello = service.getPort(HelloWorld.class);
        System.out.println(hello.getHelloWorldAsString("Aleem"));
       

    }

}

Tuesday, May 29, 2012

Interviewing skills or how to conduct interview




Purpose of interview

The interview is an opportunity  for both the hiring organization and the candidate to exchange information with an aim of locating if there is a good fit between them

An employer should assess three levels of skills
Content skills-job releated to technical skills eg programming, accounting
Transferable skills – skills needed for handling work, e.g managing operating, co-ordination
Adaptive skills –Does the candidate have the personality temperament for the job? Can he/she maange open-mindedness,flexibility,adaptability,tolerance etc

Types of Interviews

Behavioral Interview
Example: Tell me about a time you had to find a creative solution to a problem? This is based on the principle that your past performance can give you an insight into your likely style of handling an issue in the future
Skills and desired behaviour than can be looked here are
Decision making /problem solving
Leadership
Motivation
Communication
Interpeersonal skills
Planning and organization
Critical thinking skills
Team work
Ability to influence others
Adaptability
Eye of detail
Honesty/integrity
Energy
Risk taking
Independence

Case Interview
Is an analysis of a business commonly used by management consulting firms as they demonstrate their ability to work through business scenarious which you are likely to face as a consultant?
These could last between 10 to 30 minutes. You can give any case or scenarious and observe how the candidate behaves.
Industry Specific Interview
The aim here is to find out what is the level of interviewee’s knowledge about the industry specifically . E.g Name our product that you believe is well/poorly positioned and why? What are the factors which drive mergers and acquisitions?

Conducting  the  interview

1.Inform the candidate in the beginning that you will be taking notes
2.Acknowledge the recipe of the resume . Tell the candidate that the resume was insightful and that you will foucs on the skills and competencies required for performing the teask efficiently
3.Build rapport at the begiing of the interview. The interviewer needs t do for a limited period of time. Beign with a warm and friendly introuduction. This is followed by focused movememt in the area of the interview
4.Order of Questions
Start with a question which puts the applicant to ease
Alternate
                Easy and difficult questions
                Long and short questions
                Intensity of the questions
If more than one person would be present on the interview panel decide who will ask which question before the candidate walks in
5. If there are gaps in any educatioin identify the reasons for the same
6.Awards and certificates.
Look for awards/letters of appreciation , certificates. Ask questions about the circumstances for which the person has been appreciated.
7.Closing an interview
Ask –“is there anything I have fauled to ask that you think , I need to know to make the cecision favourable to you?
After they respond ,thank them for coming
Let them know your next course of action

Preparation for the interview

Before you conduct the interview you need to prepare
1.       List out the performance expectations its various dimensions and details of requirements for assessment
Before we get on with conducting an interview it is important to assesses the requriments/expectations from the person we ultimately recruit. What is the kind of knowledge experience behavioural characteristics etc we are going to look for?

The three components of performance expectations are

a)Goals: For example, you hav to recruit some one for your sales team. The quota the person has to achieve will be a critical criterion while making a hiring decisoin

b)Job barriers: For example: can candidate work on odd timings? How will be his performance during odd timings?His performance should not be effected due to this barriers.

c)Competency requirements: expected competency

You should get the list of expectations from the direct manager who is going to hire this candidate. You need to talk to him and get the details

2.       Create Job description

It covers 4 elements on the job
Accountability/responsibilities/duties
Dimenstions-levels or size of responsibility
Framework-where does the job fit in the organization
Relationship-with whom does the position holder interact
3.       Develop and use Interviewer’s guid
This will have common set of questions as why to reinvent wheel each time?
Also prevents discrimination and bias

Types of Questions to be asked


Past behavior
Past behavior is a good predictor of likely future behavior


Ask Good question
Asking bad questions geets you bad answer. Asking good questions is not natural human talent. Often interviewer's talk too much lead the interviewee towards their own way of thinking and overload him/her with multiple questions. This results in a bad interview which gets youu limited information and that too of poor queality


Open Ended Questions
use open ended questions e.g tell me aobut yourself. What kind of a manager are you? How good are your analytical skills

Self evaluative questions
Tell me about a time when you were part of a team and fund that one member of this team was consistently not contributing. Where would you like to see yourself in 5 years?Describe the new experiences and responsibilities you would like to add-on in the future.Why are you intereseted in our organization?

Genuine Questions
Prepare questions that are genuine , not too presumptuous or pushy, not focused on personal issues or about salary

Types of Questions to be avoided

Multiple questions
Do not ask string of questions in a rapid fire style.

Leading questions
These are the questions which carry an indication in terims of the desired response. E.g. I am strongly in favor of an "all young" squad in the 'one day' cricket team. Are you a supported of this therory too?The candiate will conciously choose to say 'yes' even if he disagreed with you as he doesn't want to challenge your strongly held views-that too during the interview.

Probing questions
these are closed qestions asked to get the specific information you need. Eg how many members were part of the team yu lead?What were the sales targets the 'most successsful' team achieved?
If you have lot of probing questions then you end talking more and interviewee would talk less as he would just answer with yes/no or in one word


How to use Silence in the interview?

-silence is often used as a means to ask a question . E.g silence of
-upto 5 secs is usually given to let the interviewee collect thoughts
-5-20 secs to encourage interviewee to share information he probabaly wants to keep to himself
-20 secs or more -To presurize for confidential information

Sample questions forbidden by law

-Questions pertainign to marital status/divorce/being single
-Ages of applicant's childeren-could lead to an issue of sexcual discrimination
-Don't ask about pregnancy or plans for starting a family
-Don't ask someone's date of birth/age
-Never ask if a person has even been held behind bars.
-Don't ask about place of birth or native language




Wednesday, May 16, 2012

Creating an Effective Team


The process of creating an effective team can be a daunting task for someone not used to dealing with the human dynamics of teamwork. The following tips provide an outline for building teams.
 

Start with Your Ability to Relate:

One of the most important aspects of leading a team is understanding the importance of relating to each of the member’s as individuals. Recognizing that individual members of a team bring different perspectives, skills, opinions, and ideas is important. Leaders of process simplification work can begin by simply focusing energy on relating to the unique qualifications of each member of the team – and expressing that openly to the group as it forms.

 Lead with a Sense of Authenticy:

Effective leaders are those who present themselves as authentic with an openness that is characterized by being genuine. As a leader, you do not need complex interaction formulas to create an effective team. In fact, you do not have to be easy-going, well-educated, hard-nosed, or even especially experienced to build a team. In other words, it’s more important to simply be yourself. You can be effective with people using common sense and a few fundamental principles. 

Vision:

Vision means being able to excite the team with large, desired outcomes. As a leader your vision for the outcome of the process simplification work is essential to helping members of your team achieve results. The first step in creating a sense of vision is to project such a goal and articulate it to the team. This goal must contain challenge, appeal to personal achievement, a sense of contributing to something larger than one’s self, and it must also provide an opportunity to make a difference. As a process simplification leader it will be essential for you to position the goal by picturing success. Initial questions for members of your team might be:
 What will it look like when we get there?
 What will success be like, feel like?
 How will others know that we have arrived?

Commitment:

Some members of a team may assume, for example, that commitment means long hours of work well beyond what is normally expected of others. To some it may mean increased productivity and a sense or drive for project success. Generally speaking, when expectations are defined, success rates soar. When leaders assume that everyone "should" be committed, as a matter of course, we overlook the difficulties many have with certain commitments. 
If people cannot initially commit, it doesn't mean they don't care. More often, it means they do care, and they are caught up in a process of doubt. This process precedes every meaningful commitment. Effective leaders catalyze this process, so that team members can pass through this stage efficiently on their way to genuine commitment and innovative strategies. 
This pre-commitment process is the same for team leaders and members. When we ponder a new commitment, we climb up to a kind of mental diving board. Commitments contain unknowns, and some warn of possible failure. It is common for people to neither jump nor climb back down the "ladder," but rather to stay stuck at the end of the board, immobilized in pros, cons, obstacles, and worries. In this state of mind, the obstacles begin to rule, obscuring the vision, and often times blunting motivation and creativity. 
When leaders do not understand the commitment process they tend to seek accountability without providing support. Without a means to process doubts and fears, people often feel pressured to commit, but can't. The solution to this problem is two fold: establish an atmosphere of trust, and within that atmosphere encourage inclusion. 

Trust:

Trust is the antidote to the fears and risks that can block meaningful commitment. Trust means confidence in team leadership and vision as well as direction. When trust prevails, team members are more willing to go through a difficult process, supported through ups and downs, as well as the ability to deal effectively with risk and potential loss or failure. Trust is most efficiently established when leadership commits to a vision first, followed by the fact that everyone knows those commitments are genuine. The process for leaders to commit is the same as for everyone else: assess pre-commitment doubts, questions, unknowns and fears. This involves three simple steps:
 List the unknowns.
 Research the unknowns.
 Assess worst case scenarios and their survivability.
The list of unknowns reveals some answers and further questions for the team. Some of these questions lend themselves to research (others' experience, a smallpilot plan), and
some have no apparent answers. Every major commitment contains some risk as well as some lingering unknowns.
Having explored worst case scenarios to the process simplification effort, the team as well as the leader now understands the potential loss and gain involved in the new vision. At this point, leadership can commit itself, and prepare to include other team members. That preparation must include a plan for leadership to share visibly both risk and reward with the other team members who will be coming on board. With leadership's commitment to a clear vision, and a genuine plan to share risks and rewards, the atmosphere for trust is in place. From this point forward, you are now ready to include others in the process simplification team effort. 

Inclusion:

Inclusion is essential to ensure that the project has all voices represented at the table. This means getting others to commit to the team effort and helping others through their "diving board doubts" to genuine commitment to the task at hand. The best setting to obtain buy-in and build trust is in small groups that facilitate thorough “give and take”. The basic tasks are to communicate the vision, make sure it is understood, communicate leadership's commitment (including sharing risk and reward, and how), and elicit and address peoples' doubts. Inclusion means allowing others to voice their concerns as well as a leader’s ability to elicit response or inquiry through non-invasive approach.

 Help Exchange:

The final step in creating the team is to establish a corroborative, balanced strategy for reaching the committed vision. This plan will consist of all of the tasks and help exchange necessary to realize the overall vision. If well formed your team is in the best position to supply this information. Since by this time you have laid the groundwork for trust, and established good buy-in, your team is likely to be enthusiastically cooperative. 
At this point, the leadership role is to catalyze consensus, not to issue orders. Consensus means that team members agree to a particular approach. Consensus occurs easily when most feel their ideas were heard and considered. Obtaining consensus again requires use of leadership communication skills such as non-assumptive questions, good listening, and directed response. Effective teams often produce lively discussions of divergent viewpoints before reaching consensus. Diverse views can mean unresolved argument, or they can mean increased team growth and ultimate consensus.
In summary then here are some general guidelines for building an effective team:

Open Communication . . .

 Creates and maintains a climate of trust and open, honest communication.
 Allows team members to talk openly with one another.
 Promotes the exchange of feedback.
Provide team members to work through misunderstandings and conflicts.

Commitment to a Common Purpose and Performance Goals . . .

 Keeps the purpose in the forefront of decision making and evaluations of team practices.
 Helps one another maintain the focus.

Shared Responsibility . . .

 Allows team members to feel equally responsible for the performance of the team and its outcome.
 Permits individuals to have primary roles for completing team tasks and remain flexible to do what is necessary to accomplish the team’s goals and tasks.

Use of Resources and Talents . . .

 Utilizes the resources and talents of all the group members.
 Makes good use of the team’s creative talent by openly sharing skills and knowledge, and encourages learning from one another.

Capacity for Self-Evaluation . . .

 Allows teams to stop and look at how well they are doing and what, if anything may be hindering their performance and communication.

Participative Leadership…

 Provides opportunities for team members to participate in decision making.
 Allows team members to help set goals and develop strategies for achieving these goals.
 Allows team members to help identify tasks and decide how to approach and evaluate them.

Team Climate Survey




Take the following team climate survey, to see where your process simplification team stands firm as a group.

Purpose

Do members share a sense of why the team exists and are invested in accomplishing the mission?
In a successful team: Members proudly share a sense of why the team exists and are invested in accomplishing its mission and goals.

Priorities

Do members know what needs to be done next, by whom, and by when to achieve team goals?
In a successful team: Members know what needs to be done next, by whom, and by when to achieve team goals.

Roles

Do members know their roles in getting tasks done and when to allow a more skillful member to do a contain task?
Members know their roles in getting tasks done and when to allow more skillful members to do a certain task.

Decisions

Are authority and decision-making lines clearly understood?
In a successful team: Authority and decision-making lines are clearly understood.

Conflict

Is conflict dealt with openly and considered important to decision-making and personal growth?
In a successful team: Conflict is dealt with openly and is considered important to decision-making and personal growth.

Personal Traits

Do members feel their unique personalities are appreciated and well utilized?
In a successful team: Members feel their unique personalities are appreciated and well utilized.

Norms

Are group norms set for working together and are they seen as standards for everyone in the group?
In a successful team: Group norms for working together are set and seen as standards for every one in the groups.

Effectiveness

Do members find team meetings efficient and productive and look forward to this time together?
In a successful team: Members find team meetings efficient and productive and look forward to this time together.

Success

Do members clearly know when the team has met with success and share in this equally and proudly?
In a successful team: Members know clearly when the team has met with success and share in this equally and proudly.

Training

Are opportunities for feedback and updating skills provided and taken advantage of by team members?
In a successful team: Opportunities for feedback and updating skills are provided and taken advantage of by team members.



The five dysfunctions of the Team are

1)Inattention to RESULTS
2)Avoidance of Accountability
3)Lack of Commitment
4)Fear of Conflict
5)Absence of Trust

Tuckmans Team Development Model


Dr Bruce Tuckman published his Forming Storming Norming Performing model in 1965. He added a fifth stage, Adjourning, in the 1970s. The Forming Storming Norming Performing theory is an elegant and helpful explanation of team development and behaviour

Tuckman's model explains that as the team develops maturity and ability, relationships establish, and the leader changes leadership style. Beginning with a directing style, moving through coaching, then participating, finishing delegating and almost detached. At this point the team may produce a successor leader and the previous leader can move on to develop a new team.

tuckman's forming storming norming performing four-stage model

The progression is:
  1. forming
  2. storming
  3. norming
  4. performing
Here are the features of each phase:

forming - stage 1

High dependence on leader for guidance and direction. Little agreement on team aims other than received from leader. Individual roles and responsibilities are unclear. Leader must be prepared to answer lots of questions about the team's purpose, objectives and external relationships. Processes are often ignored. Members test tolerance of system and leader. Leader directs (similar to Situational Leadership® 'Telling' mode).

storming - stage 2

Decisions don't come easily within group. Team members vie for position as they attempt to establish themselves in relation to other team members and the leader, who might receive challenges from team members. Clarity of purpose increases but plenty of uncertainties persist. Cliques and factions form and there may be power struggles. The team needs to be focused on its goals to avoid becoming distracted by relationships and emotional issues. Compromises may be required to enable progress. Leader coaches (similar to Situational Leadership® 'Selling' mode).

norming - stage 3

Agreement and consensus is largely forms among team, who respond well to facilitation by leader. Roles and responsibilities are clear and accepted. Big decisions are made by group agreement. Smaller decisions may be delegated to individuals or small teams within group. Commitment and unity is strong. The team may engage in fun and social activities. The team discusses and develops its processes and working style. There is general respect for the leader and some of leadership is more shared by the team. Leader facilitates and enables (similar to the Situational Leadership® 'Participating' mode).

performing - stage 4

The team is more strategically aware; the team knows clearly why it is doing what it is doing. The team has a shared vision and is able to stand on its own feet with no interference or participation from the leader. There is a focus on over-achieving goals, and the team makes most of the decisions against criteria agreed with the leader. The team has a high degree of autonomy. Disagreements occur but now they are resolved within the team positively and necessary changes to processes and structure are made by the team. The team is able to work towards achieving the goal, and also to attend to relationship, style and process issues along the way. team members look after each other. The team requires delegated tasks and projects from the leader. The team does not need to be instructed or assisted. Team members might ask for assistance from the leader with personal and interpersonal development. Leader delegates and oversees (similar to the Situational Leadership® 'Delegating' mode).

tuckman's forming storming norming performing model

tuckman forming storming performing norming




Better quality diagrams are available as separate files:
Tuckman 'forming storming' diagram (doc format)
Tuckman 'forming storming' diagram (pdf format)
(Thanks S Doran for suggestion. And thanks also C Lloyd for pointing out the error in these diagrams, duly corrected Aug 2008 - storming and norming were inverted.)

Tuckman's fifth stage - Adjourning

Bruce Tuckman refined his theory around 1975 and added a fifth stage to the Forming Storming Norming Performing model - he called it Adjourning, which is also referred to as Deforming and Mourning. Adjourning is arguably more of an adjunct to the original four stage model rather than an extension - it views the group from a perspective beyond the purpose of the first four stages. The Adjourning phase is certainly very relevant to the people in the group and their well-being, but not to the main task of managing and developing a team, which is clearly central to the original four stages.

adjourning - stage 5

Tuckman's fifth stage, Adjourning, is the break-up of the group, hopefully when the task is completed successfully, its purpose fulfilled; everyone can move on to new things, feeling good about what's been achieved. From an organizational perspective, recognition of and sensitivity to people's vulnerabilities in Tuckman's fifth stage is helpful, particularly if members of the group have been closely bonded and feel a sense of insecurity or threat from this change. Feelings of insecurity would be natural for people with high 'steadiness' attributes (as regards the 'four temperaments' or DISC model) and with strong routine and empathy style (as regards the Benziger thinking styles model, right and left basal brain dominance).

Friday, May 11, 2012

Different console links in ORACLE SOA world

1)weblogic console
http://host:port/console
example: http://localhost:7001/console

2)Oracle Enterprise Manager console
http://host:port/em
example: http://localhost:7001/em

3) Oracle Service Bus console
http://host:port/sbconsole
example: http://localhost:7001/sbconsole

4)Oracle BPM Worklist Application
http://host_name:port/integration/worklistapp/
where host_name is the name of the host on which the Worklist
application is installed and port is the port number of the SOA-managed server
(the default is 8001).

5) Oracle BPM Workspace web application
http://host_name:port/bpm/workspace/
default port is :8001

Note:Notice that a Oracle BPM Workspace application looks very similar
to a Oracle BPM Worklist, which we are already familiar with.
However, BPM Workspace provides some additional functionality,
like monitoring process performance using the Dashboard.

6)Oracle Service Registry
http://host_name:port/application_name/uddi/web, where
host_name is the name of the host on which OSR is installed, application_name is
name of the application (default name is registry), and port is a number that is set
during the installation process.

Note: Oracle Service Registry (OSR) is a fully V3-compliant implementation of UDDI
(Universal Description, Discovery and Integration), and one of the key components
of Oracle SOA Suite 11g. It allows us to publish and discover services and service
providers, and manage metadata about services (security, transport, or quality
service) using taxonomies. Therefore, it plays an important role when trying to
improve visibility and promote service reuse. It is also important in the scope of SOA
governance.

7)Business Activity Monitoring(BAM)
http://localhost:9001/OracleBAM 

8)Oracle SOA Composer
http://localhost:port/soa/composer
 
The SOA Composer enables you to work with deployed DVMs.  
 
9)WSIL Connection
This is created in Jdeveloper
New Gallery -> All Technologies ->Connections ->WSIL Connection ->
Select Resource pallet and give the WSIL file
 
http://localhost:8001/inspection.wsil 



Wednesday, May 2, 2012

Understanding WSDL Faults

Understanding WSDL Faults

Consider the WSDL with  portType and operations as shown below

< portType name="Sample" >
    < operation name="sayHello" >
      < input message="tns:sayHello"/ >
      < output message="tns:sayHelloResponse"/ >
    < /operation >
    < operation name="addNum" >
      < input message="tns:addNum"/ >
      < output message="tns:addNumResponse"/ >
    < /operation >
    < operation name="subNum" >
      < input message="tns:subNum"/ >
      < output message="tns:subNumResponse"/ >
    < /operation >
  < /portType >
     
   

 


" In the above example each operation has input and output message. For each operation we can add the fault message it returns. The message definition is shown below

 
< message name="SayHelloFaultMessage" >
 < part name="error" type="xs:string" / >
 < /message >

 < message name="AddNumFaultMessage" >
 < part name="error" type="xs:string" / >
 < /message >

 < message name="SubNumFaultMessage" >
 < part name="error" type="xs:string" / >
 < /message >
     

     
After adding the fault the porType is shown below
   
  < portType name="Sample" >
    < operation name="sayHello" >
      < input message="tns:sayHello"/ >
      < output message="tns:sayHelloResponse"/ >
    < fault name="fault" message="tns:SayHelloFaultMessage" / >

    < /operation >
    < operation name="addNum" >
      < input message="tns:addNum"/ >
      < output message="tns:addNumResponse"/ >
    < fault name="fault" message="tns:AddNumFaultMessage" / >

    < /operation >
    < operation name="subNum" >
      < input message="tns:subNum"/ >
      < output message="tns:subNumResponse"/ >
    < fault name="fault" message="tns:SubNumFaultMessage" / >

    < /operation >
  < /portType >


Note the following while adding fault:
WSDL does not require that we use unique fault names within the namespace used
to define the operation. In other words, that faults that have the same name and are
defined within the same namespace will be considered as the same fault in BPEL.
Keep this in mind when designing services that can potentially become partners
of BPEL business processes, because this can lead to conflicts in fault handling
during execution.

In the above we have given unique name so that all the faults are considered as different