当我尝试运行java应用程序从ebay api查看项目时,我得到exp:
com.sun.xml.internal.ws.fault.ServerSOAPFaultException: Client received SOAP Fault from server: Authentication failed : Invalid Application:app key Please see the server log to find more detail regarding exact cause of the failure.
at com.sun.xml.internal.ws.fault.SOAP11Fault.getProtocolException(SOAP11Fault.java:178)
at com.sun.xml.internal.ws.fault.SOAPFaultBuilder.createException(SOAPFaultBuilder.java:124)
at com.sun.xml.internal.ws.client.sei.StubHandler.readResponse(StubHandler.java:238)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:189)
at com.sun.xml.internal.ws.db.DatabindingImpl.deserializeResponse(DatabindingImpl.java:276)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:104)
at com.sun.xml.internal.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:77)
at com.sun.xml.internal.ws.client.sei.SEIStub.invoke(SEIStub.java:147)
at com.sun.proxy.$Proxy36.findItemsByKeywords(Unknown Source)
at FindItem.main(FindItem.java:59)
我按照教程编写的方式导入了2个罐子,但仍有这个问题, 我从ebay web app键中获取密钥。 我的代码是:
ClientConfig config = new ClientConfig();
config.setApplicationId("MY app key that taken from ebay");
//create a service client
FindingServicePortType serviceClient = FindingServiceClientFactory.getServiceClient(config);
//create request object
FindItemsByKeywordsRequest request = new FindItemsByKeywordsRequest();
//set request parameters
request.setKeywords("harry potter phoenix");
PaginationInput pi = new PaginationInput();
pi.setEntriesPerPage(2);
request.setPaginationInput(pi);
//call service
FindItemsByKeywordsResponse result = serviceClient.findItemsByKeywords(request);
和另一个问题,我如何获得该项目的规格? 希望你能在这个问题上提供帮助。
答案 0 :(得分:2)
我认为您为连接API而提供的AppID是无效的。
我的问题是