Find the answer to your question
Advanced Search
I am getting the following exception when making Trading API calls using eBay Java SDK . What is the problem?
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) |
Detailed Description
The Couldn't create SOAP message due to exception: unexpected XML error thrown in Java SDK indicates that you used the XML API Gateway URI as https://api.sandbox.ebay.com/ws/api.dll ( for Sandbox) for your SOAP API calls .
To correct the problem, you need to set the SOAP API Gateway URI for your ApiContext object as below in Java SDK:
ApiContext apiContext = new ApiContext();
Sandbox: apiContext.setApiServerUrl("https://api.sandbox.ebay.com/wsapi")
Production: apiContext.setApiServerUrl("https://api.ebay.com/wsapi")
Additional Resources
- Trading API Document: Routing the Request (Gateway URLs)
- Knowledget Base: Unsupported Verb error for SOAP request
How well did this answer your question?
Answers others found helpful
- I am getting an error message about "Input data for tag <Item.ShippingRegions> is invalid or missing"
- GetMyMessages sample using eBay JAVA SDK
- Sample Code for Exception based logging with .NET SDK using C#
- Java error: sun.security.validator.ValidatorException: No trusted certificate found
- Java SDK - Exception in thread 'main' java.lang.NoClassDefFoundError