Java Azure Bing在soap上的搜索

Java Azure Bing在soap上的搜索,java,soap,azure,axis2,bing,Java,Soap,Azure,Axis2,Bing,我需要使用url上的wsdl文件在soap上进行搜索。我使用eclipse和ApacheAxis2生成java客户机文件,如本教程所示。我主要写了这段代码 BingServiceStub stub = new BingServiceStub("http://api.search.live.net:80/soap.asmx"); stub._getServiceClient().getOptions().setProperty(org.apache.

我需要使用url上的wsdl文件在soap上进行搜索。我使用eclipse和ApacheAxis2生成java客户机文件,如本教程所示。我主要写了这段代码

            BingServiceStub stub = new BingServiceStub("http://api.search.live.net:80/soap.asmx");
            stub._getServiceClient().getOptions().setProperty(org.apache.axis2.transport.http.HTTPConstants.CHUNKED, false);
            BingServiceStub.SearchRequest request = new BingServiceStub.SearchRequest();
            request.setQuery("blahblah");
            request.setAppId("APP ID");
//          request.setAdult(BingServiceStub.AdultOption.Moderate);
//          request.setImage(null);
//          request.setMarket("2.0");
            SourceType type = SourceType.Web;
            ArrayOfSourceType types = new ArrayOfSourceType();
            types.addSourceType(type);
            request.setSources(types);
            BingServiceStub.SearchRequestE requestE = new BingServiceStub.SearchRequestE();
            requestE.setParameters(request);
            BingServiceStub.SearchResponseE response = stub.search(requestE);
但我犯了这个错误

org.apache.axis2.AxisFault: Client error
    at org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java:531)
    at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:375)
    at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
    at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
    at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
    at com.microsoft.schemas.livesearch._2008._03.search.BingServiceStub.search(BingServiceStub.java:182)
    at client.BingServiceClient.main(BingServiceClient.java:40)
我了解到bing搜索api已迁移到WindowsAzure。搜索URL中有一些更改,但我找不到有关soap类型请求的文档


需要帮助吗?

我不知道你为什么在帖子中引用了Windows Azure,因为你有两种方法可以使用旧的大开发者搜索2 Windows Azure Market Place访问Bing search 1

如果您已从Microsoft Azure Data Market获得Bing搜索AppID,则URL为

但是,如果您已经从Bing开发者中心获得了AppID,那么在2012年8月1日之前,您仍然可以使用以下URL使用它:

基于上述代码,您使用的是Bing开发者网站URL,因此它不是特定于Windows Azure数据市场的,并且基于Bing搜索API 2.0,因此您可以查看以下示例并修复代码,因为某些设置不正确,如下所述:


如果您是从Windows Azure Market Place获得AppID的,那么您可以使用在找到AppID的同一地点描述的方法。从bing搜索迁移到Azure,AppID概念将替换为帐户密钥。我跟着 并在下面的代码中写入帐户密钥而不是appid

request.setAppId("APP ID");
这并不能解决我遇到的客户端错误问题。我认为由于迁移到azure,必须为soap编写一个新的教程。你给我的网址是2009年写的
它是旧的

在查询中,您连接到的URL不是DataMarket URL。我给你的链接仍然适用于非数据市场的实时搜索。如果您正在使用Azure,请使用URL?哪个是正确的。