web service client in java
- by user622222
I want to generate a client program using the service 
I am unable to display the results, how can I do so?
import java.rmi.RemoteException; 
public class searchtry {
public static void main(String[] args) throws RemoteException { 
  SearchRequest request=new SearchRequest(); 
  SearchRequestType1 type1=new SearchRequestType1(); 
  query.setAppId("*********************************"); //Windows Live gave this id for using that service  
  query.setSources(new SourceType[]{SourceType.Web}); 
  query.setQuery("Java"); 
  aratip.setParameters(request); 
  SearchResponseType0 answer= client.search(type1); 
  System.out.println(answer.toString()); 
}