【发布时间】:2010-04-03 19:37:10
【问题描述】:
我从这里生成了 java web 服务客户端 --> http://api.search.live.net/search.wsdl.. 我想搜索并列出返回值。 我如何显示结果?
我的代码是:
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());
}
【问题讨论】:
-
println 输出什么?
-
请格式化您的代码,这很容易...
标签: java client webservice-client livesearch