IBM-Cloud / talent-manager

Sample/Tutorial using Cloudant, Watson in a JavaEE App on IBM Bluemix
http://talent-manager.mybluemix.net
Apache License 2.0
20 stars 42 forks source link

Watson API URL changed #7

Open bookpbk opened 8 years ago

bookpbk commented 8 years ago

I happen to stumble on a bug that is caused by incorrect Watson API address, perhaps because URL is migrated.

The code below is where the bug in the file com.ibm.personafusion.Config is, and the fix (that seems to work)

<---------------------CODE------------------------>

package com.ibm.personafusion; import com.ibm.personafusion.db.CloudantClient; public class Config {

/** Cloudant **/
public static final int CLOUDANT_PORT = 443;
public static final String CLOUDANT_NAME = "talent-manager";

/** Watson User Modeling **/

public static final String WATSON_PROF_API =  "/v2/profile";
public static final String WATSON_VIZ_API = "/v2/visualize";

/* OLD
public static final String WATSON_PROF_API =  "/api/v2/profile";
public static final String WATSON_VIZ_API = "/api/v2/visualize";*/

public static CloudantClient cc = new CloudantClient();
/* Mobile Data Config */
public static final String MOBILE_DATA_APP_ID = "";
public static final String MOBILE_DATA_APP_SECRET = "";

}

poplav commented 7 years ago

@bookpbk If you see a bug and have a fix you should open a PR!