是否可以调用WSO2 API Manager :: publisher api,如下所述:
http://docs.wso2.org/display/AM150/Publisher+APIs
来自网络服务,而不是fronm JSON
格尔茨,
马克
答案 0 :(得分:0)
您只需从webservices调用那些jaggery端点即可。 对这些端点执行简单的HTTP发布;
例如:
// create a post request to addAPI.
String addAPIendpoint = "http://localhost:9763/publisher/site/blocks/item-add/ajax/add.jag";
HttpClient httpclient = new DefaultHttpClient();
HttpPost httppost = new HttpPost(addAPIendpoint);
// Request parameters and other properties.
List<NameValuePair> params = new ArrayList<NameValuePair>(12);
params.add(new BasicNameValuePair(API_ACTION, API_ADD_ACTION));
params.add(new BasicNameValuePair(API_NAME, serviceName));
params.add(new BasicNameValuePair(API_CONTEXT, serviceName));
.....
HttpResponse response = httpclient.execute(httppost, httpContext);