Package com.ebay.sdk

Examples of com.ebay.sdk.SdkException


        for(int i = 0; i < productFinderIDList.length; i++) {
          ids.append(productFinderIDList[i]).append(",");
        }
         int lastComaPos = ids.lastIndexOf(",");
         ids.deleteCharAt(lastComaPos);
         throw new SdkException("ProductFinder Data not available for product finder ids:" + ids.toString());
      }
      doc = XmlUtil.createDom(pfXml);

      //
      cache.put(productFinderIDList, doc);
View Full Code Here


    throws SdkException, Exception
  {
    int i;
    java.util.Map gkey_pfid = getPFIDList(request);
    if( gkey_pfid.size() == 0 )
      throw new SdkException("No product finder post data were found.");

    Object[] rgPFID = gkey_pfid.values().toArray();

    //
    SearchAttributeSet[] sets = new SearchAttributeSet[gkey_pfid.size()];
    for( i = 0; i < sets.length; i++ )
    {
      sets[i] = new SearchAttributeSet();
      sets[i].setProductFinderID(Integer.parseInt((String)rgPFID[i]));
    }

    //
    Object[] keys = request.keySet().toArray();
    for(i = 0; i < keys.length; i++ )
    {
      String key = (String) keys[i];

      if (!key.startsWith(A))
        continue;

      String skey = key.substring(A.length());
      String aid, groupKey;
      int us_idx = skey.indexOf(US);
      if( us_idx != -1 )
      {
        aid = skey.substring(0, us_idx);
        groupKey = skey.substring(us_idx);
      }
      else
      {
        aid = skey;
        groupKey = "";
      }

      String valStr = ((String[])request.get(key))[0];

      Object objPFID = findValueByStringKey(gkey_pfid, groupKey);
      if( objPFID == null )
        throw new SdkException("Invalid group key.");

      SearchAttributeSet set = findAttributeSetByPFID(sets, Integer.parseInt((String)objPFID));
      SearchAttribute attr = new SearchAttribute();
      attr.setAttributeID(Integer.parseInt(aid));
      Value val = new Value();
View Full Code Here

              cats = mappedArray.getCategory();
            }
            siteWideCharacteristicSets = resp.getSiteWideCharacteristicSets();
          }
        } catch(IOException ioe) {
          throw new SdkException("Error processing file: " + CATCS_FILE_NAME + " : " + ioe.getMessage());
        } catch(ClassNotFoundException cnfe) {
          throw new SdkException("Error processing file: " + CATCS_FILE_NAME + " : " + cnfe.getMessage());
        } catch(ClassCastException cce) {
          throw new SdkException("Error processing file: " + CATCS_FILE_NAME + " : " + cce.getMessage());
        }
      } else {
        downloadCategoryCS(catId);
        writeObjectToDisk(resp);
      }
View Full Code Here

    {     
      FetchTokenCall api = new FetchTokenCall(this.apiContext);

      String s = this.txtSessionID.getText();
      if( s.length() == 0 )
        throw new SdkException("Please get SessionID first.");
      api.setSessionID(s);

      this.generatedToken = api.fetchToken();

      this.txtToken.setText(this.generatedToken);
View Full Code Here

  void getSessionID()
  {
      try {
       
        if (!validateApiAccount()) {
        throw new SdkException("Please fill in Api Account first.");
      }
       
      GetSessionIDCall api = new GetSessionIDCall(this.apiContext);
     
      String runame = this.getRuName();
View Full Code Here

  private void addAuthToken(Document doc) throws SdkException{
    Node node = XmlUtil.getChildByName(doc, "UploadSiteHostedPicturesRequest");
    Node requesterCredentials = XmlUtil.appendChildNode(doc, EBAY_NAMESPACE, node, "RequesterCredentials");
    String tokenString = apiContext.getApiCredential().geteBayToken();
    if(tokenString == null || tokenString.length() == 0){
      throw new SdkException("No Token Found!!!");
    } else {
      XmlUtil.appendChildNode(doc, requesterCredentials, "eBayAuthToken", tokenString);
    }
  }
View Full Code Here

          sets = cats[i].getCharacteristicsSets();
          if( sets != null && sets.length > 0 )
            t = sets[0].getAttributeSetID();
          else
            throw new SdkException("No CharacteristicsSet cat be found for the category.");
       }
       else
           t = new Integer(cats[i].getCategoryID());

       catsMap.put(t, cats[i]);
View Full Code Here

TOP

Related Classes of com.ebay.sdk.SdkException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.