Package com.ibm.commons.util.io.json

Examples of com.ibm.commons.util.io.json.JsonObject


   *
   * @return Profile - returns the fetched Profile
   * @throws ProfileServiceException
   */
  public Profile getMyProfile() throws ProfileServiceException {
    JsonObject result = null;
    try {
      //making a call directly here using ClientService's get method, 
      Response response = endpoint.getClientService().get(ProfileConstants.GETUSERIDENTITY.getUrl(), ClientService.FORMAT_JSON);
      result = (JsonObject) response.getData() ;
    } catch (ClientServicesException cse) {
      throw new ProfileServiceException(cse, Messages.InvalidValue_1);
    }
    String userId = (String) result.getJsonProperty("subscriberid");
    if (StringUtil.isEmpty(userId)) {
      throw new ProfileServiceException(null, Messages.InvalidValue_2);
    }
    return getProfile(userId);
  }
View Full Code Here


      String envName = options.getString("env");
      PlaygroundEnvironment env = dataAccess.getEnvironment(envName);
      env.prepareEndpoints();
 
      // Push the dynamic parameters to the user session
      JsonObject p = (JsonObject)options.get("params");
      if(p!=null) {
        for(Iterator<String> it= p.getJsonProperties(); it.hasNext(); ) {
          String name = it.next();
          String value = (String)p.getJsonProperty(name);
          env.pushSessionParams(name, value);
        }
      }
     
      String serverUrl = composeServerUrl(req);
View Full Code Here

      this.env = DataAccessBean.get().getEnvironment(envName);
      this.prov = new EnvParameterProvider(env);
      env.prepareEndpoints();
     
      // Push the dynamic parameters to the user session
      JsonObject p = (JsonObject)requestParams.options.get("params");
      if(p!=null) {
        for(Iterator<String> it= p.getJsonProperties(); it.hasNext(); ) {
          String name = it.next();
          String value = (String)p.getJsonProperty(name);
          env.pushSessionParams(name, value);
        }
      }
     
      // Compose the URLs
View Full Code Here

TOP

Related Classes of com.ibm.commons.util.io.json.JsonObject

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.