question

ericchile avatar image
1 Like"
ericchile asked

Error trying to implement HelloWorld sample??

 

 

 

 

+++++++++++++++++++++++++++++++++++++++

+ Welcome to eBay SDK for Java Sample +

+  - HelloWorld                   +

+++++++++++++++++++++++++++++++++++++++

 

===== [1] Account Information ====

Enter your eBay Authentication Token:  

**Filtered**

Enter eBay SOAP server URL (e.g., https://api.ebay.com/wsapi):  

https://api.sandbox.ebay.com/ws/api.dll

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".

SLF4J: Defaulting to no-operation (NOP) logger implementation

SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Begin to call eBay API, please wait ... 

Fail to get eBay official time.

com.ebay.sdk.SdkException: ApiCall.execute() - Couldn't create SOAP message due to exception: unexpected XML tag. expected: { http://schemas.xmlsoap.org/soap/envelope/}Envelope but found: {urn:ebay:apis:eBLBaseComponents}GeteBayOfficialTimeResponse

at com.ebay.sdk.ApiCall.executeByApiName(ApiCall.java:592)

at com.ebay.sdk.ApiCall.execute(ApiCall.java:349)

at com.ebay.sdk.call.GeteBayOfficialTimeCall.geteBayOfficialTime(GeteBayOfficialTimeCall.java:64)

at com.me.ApplicationHelloWorld.main(ApplicationHelloWorld.java:50)

 

 

Anyone know what is going on?

java-xml
· 1
10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello: I'm another newbie on this API. But I got a different, rather cryptic error which turned out to have the same solution:

 

[INFO ] 2012-06-30 03:43:03,215
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Header/>
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client</faultcode>
   <faultstring>Application name invalid.</faultstring>
   <faultactor>http://www.ebay.com/ws/websvc/eBayAPI</faultactor>
   <detail>
    <FaultDetail>
     <ErrorCode>127</ErrorCode>
     <Severity>Error</Severity>
     <DetailedMessage>API application "121095" invalid.</DetailedMessage>
    </FaultDetail>
   </detail>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>


[ERROR] 2012-06-30 03:43:03,425
com.ebay.sdk.SdkSoapException: API application "121095" invalid.

Fail to get eBay official time.
com.ebay.sdk.SdkSoapException: API application "121095" invalid.
    at com.ebay.sdk.SdkSoapException.fromSOAPFaultException(Unknown Source)
    at com.ebay.sdk.ApiCall.executeByApiName(Unknown Source)
    at com.ebay.sdk.ApiCall.execute(Unknown Source)
    at com.ebay.sdk.call.GeteBayOfficialTimeCall.geteBayOfficialTime(GeteBayOfficialTimeCall.java:64)
    at helloworld.ApplicationHelloWorld.main(ApplicationHelloWorld.java:64)

 

 

My problem is, I was using a sandbox token with the production API. So the solution was to use https://api.sandbox.ebay.com/wsapi, not https://api.ebay.com/wsapi. Thanks zhuowei.developersupport for the solution.

0 Likes 0 ·
zhuowei.developersupport@ebay.com avatar image
0 Likes"
zhuowei.developersupport@ebay.com answered

Hi eanderson,

 

  You used the wrong URL: https://api.sandbox.ebay.com/ws/api.dll which is for eBay Trading XML call.  

When making Trading SOAP call or using Trading SDKs,  you need to use https://api.sandbox.ebay.com/wsapi for sandbox environment or  https://api.ebay.com/wsapi for production.

 

  More information for the same can be found in  Routing the Request (Gateway URLs) doc.

 

Best Regards,

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

InactiveAutoUser avatar image
0 Likes"
InactiveAutoUser answered

Hmmm I have a very similar problem, I get

 

Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

at com.ebay.sdk.ApiCall.<clinit>(ApiCall.java:75)

at HelloWorld.main(HelloWorld.java:29)

 

The server URL is https://api.sandbox.ebay.com/wsapi

 

This is the line that the exception is thrown at

       GeteBayOfficialTimeCall apiCall = new GeteBayOfficialTimeCall(apiContext);

 

I must confess I am a little at a loss as to what I can do about this.

10 |600 characters needed characters left characters exceeded

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.