views:

91

answers:

1

I generated java web service client from here --> http://api.search.live.net/search.wsdl.. I want to make search and listing the return values. How ı can show result ?

my code is :

import java.rmi.RemoteException; 
import com.microsoft.schemas.LiveSearch._2008._03.Search.*; 

public class searchtry {
public static void main(String[] args) throws RemoteException { 
  LiveSearchPortTypeProxy client=new LiveSearchPortTypeProxy();
  SearchRequest request=new SearchRequest(); 
  SearchRequestType1 type1=new SearchRequestType1(); 
  sorgu.setAppId("*********************************"); //Windows Live gave this id for using that service  
  sorgu.setSources(new SourceType[]{SourceType.Web}); 
  sorgu.setQuery("Java"); 
  aratip.setParameters(request); 
  SearchResponseType0 answer= client.search(type1); 
  System.out.println(answer.toString()); 
} 
+1  A: 

Can you look at the generated class SearchResponseType0 and see what do toString method do (if its present). Otherwise you need to print the values from object using other methods int he object which give u access to individual result entries

Fazal