java 客户端从服务器收到 SOAP 错误:身份验证失败 ebay

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27865931/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-11-02 12:33:09  来源:igfitidea点击:

Client received SOAP Fault from server: Authentication failed ebay

javasoapebay-api

提问by Vitaly Menchikovsky

When I am trying to run java app to look the item from ebay api I am getting exp:

当我尝试运行 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)

I imported 2 jars as written on tutorial but still have this issue, I get the key from ebay web of app key. My code is:

我按照教程中的说明导入了 2 个 jar,但仍然存在此问题,我从 ebay web of app key 获取了密钥。我的代码是:

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);

and another question, how can I get specification of the item? Hope you can help on this issue.

还有一个问题,我怎样才能得到物品的规格?希望你能帮助解决这个问题。

回答by Pavan

I think the AppID which you given to connect the API is Invalid.

我认为您提供的用于连接 API 的 AppID 无效。

My questions are

我的问题是

  1. Do you have DevID, AppID and CertID provided by eBay ?
  2. If you have then please try to connect from SOAP UI to check whether it is working.
  1. 你有 eBay 提供的 DevID、AppID 和 CertID 吗?
  2. 如果有,请尝试从 SOAP UI 连接以检查它是否正常工作。