question

goydee-wywiwl avatar image
0 Likes"
goydee-wywiwl asked ·

Standard Input Fiels Not Included in SOAP request

Hi, I am trying to call GetCategories API using eBay sdk SOAP API call. In this API I need to set DetailLevel as ReturnAll and able to add the same in GetCategoriesRequestType object. However I am not getting any category in response. When I have analysed the issues and dumped the SOAP message that is sent from eBay SDK APIs; it is not including any of standard input fields in response. Below is dumped request and response: Request Message: Length=1,385 Info: [INFO ] 2015-12-04 14:04:22,829 ******** 930 Info: [INFO ] 2015-12-04 14:04:24,157 Response Message: Length=567 Info: [INFO ] 2015-12-04 14:04:24,157 2015-12-04T08:34:26.004Z Success 927 E927_INTL_API_17590342_R1 Below is Java Code that I am using: private AbstractRequestType createRequest() { // create soap api request GetCategoriesRequestType request = new GetCategoriesRequestType(); request.setViewAllNodes(Boolean.TRUE); DetailLevelCodeType[] values = new DetailLevelCodeType[1]; values[0] = DetailLevelCodeType.RETURN_ALL; request.setDetailLevel(values); request.setErrorLanguage("en_US"); request.setWarningLevel(WarningLevelCodeType.HIGH); return request; } Please suggest me the solution/work around for the same. Thanks and Regards, Vinod Pandey
trading api javasoap-xml
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.

1 Answer

· Write an Answer
zhuowei.developersupport@ebay.com avatar image
1 Like"
zhuowei.developersupport@ebay.com answered ·
Hi goydee-wywiwl , If you make API call using SOAP api request type directly in Java SDK, you will need to set those [AbstractRequestType][1]'s fields including detail level in the APICall object as below: ApiCall api = new ApiCall(apiContext); api.setDetailLevel(detailLevel); here is the complete code: public static void main(String[] args) { DetailLevelCodeType[] detailLevel = new DetailLevelCodeType[]{ DetailLevelCodeType.RETURN_ALL }; ApiContext apiContext = new ApiContext(); ApiCredential cred = apiContext.getApiCredential(); apiContext.setSite( SiteCodeType.US); cred.seteBayToken(TOKEN); //set Api Server Url apiContext.setApiServerUrl(APISERVERURL); ApiCall api = new ApiCall(apiContext); api.setDetailLevel(detailLevel); GetCategoriesRequestType request = new GetCategoriesRequestType(); try { request.setLevelLimit(4); request.setViewAllNodes(true); GetCategoriesResponseType response = (GetCategoriesResponseType) api.execute(request); } catch (Exception e) { e.printStackTrace(); } } Best Regards, [1]: http://developer.ebay.com/Devzone/XML/docs/Reference/ebay/types/AbstractRequestType.html
· Share
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.