Skip to main content
Published: August 13 2007, 4:29:00 PMUpdated: November 28 2020, 3:54:40 PM

How to upload picture via RelistItemCall ?


  RelistItemCall wrapper makes uploading local stored images simple. 
  The  required steps of including Pictures in a ToBeRelisted item are:  

   1. Register EPS server URL in ApiContext object
   2. Register both a String array object ( a list of the image file name paths) and a PictureDetailsType object in RelistItemCall.uploadPictures() method

Detailed Description   

Here is an example java code that re-lists an item with a new StartPrice and new PictureDetails properties .  

  public static void  main(String [] args){
           try {
            String itemID = "110022274195";
            FeesType fees;
            String sandboxEPSURL = "";

             //register EPS server URL in ApiContext object
            RelistItemCall rliCall = new RelistItemCall(apiContext);
            ItemType item = new ItemType();
            item.setItemID(new ItemIDType(itemID));
            item.setStartPrice(new AmountType(0.89));

            // define gallery picture object  
            PictureDetailsType  pictureDetails = new PictureDetailsType();
            // specify image file name path
            String [] pictureFiles = {"c:\\Sample.jpg"};

            //register both String array object (  a list of the image file name paths)  and  PictureDetailsType object 
            rliCall.uploadPictures(pictureFiles, pictureDetails);
            org.apache.axis.types.URI picURL = item.getPictureDetails().getPictureURL(0);
            System.out.println("Relisting Item ....");
            // fire relistItem request
            fees = rliCall.relistItem();
        }catch (Exception e){

Version Info

The code example above was based on the versions specified below:

API Schema Version 515
Java SDK Version javasdk v515 Point Release

Additional Resource

How well did this answer your question?
Answers others found helpful