Home
Find the answer to your question
Can I make UploadSiteHostedPictures API call directly via eBay Java SDK ?
Summary
The sample java program below is written with eBay JAVA SDK framework. The code illustrates how to upload multiple images from a local file system to the eBay picture server.
Java SDK uses UploadSiteHostedPictures, the only call in the Trading API that doesn't support SOAP, to upload image files in binary form. The source code for using UploadSiteHostedPictures functionality can be found in the Java SDK com.ebay.sdk.pictureservice package : ${java_sdk}/source/core/src/com/ebay/sdk/pictureservice.
Detailed Description
/* for(int i = 0; i < piList.length; i ++ ) { String errorMsg= piList[i].getErrorMessage() ; if (piList[i].getReponse().getAck().compareTo(AckCodeType.FAILURE)==0){ System.out.print( piList[i].getErrorType() + " | " + errorMsg ) ; }else { //http://developer.ebay.com/devzone/xml/docs/Reference/eBay/UploadSiteHostedPictures.html#Response.SiteHostedPictureDetails.FullURL if (errorMsg !=null && errorMsg.length() >0) { System.out.print( piList[i].getErrorType() + " | " + errorMsg ) ; }; } } |