共计 869 个字符,预计需要花费 3 分钟才能阅读完成。
首先我们得有一个可以正常工作的 Restful API:
然后在 Cloud for Customer 的 Cloud Application Studio 里创建 Restful API 的模型,把第一步可以正常工作的 Restful API url 填进模型里去:
然后在 ABSL 里使用如下代码进行消费:
import ABSL;
if(this.OutboundDeliveryID.IsInitial() == false){
raise already_delivered.Create(“E”);
return;
}
var HttpMethod = “GET”;
var HttpResource = “”; // not required
var ContentType = “”; // not required
var Body = “”; // not required
var HeaderParameter : collectionof NameAndValue; // not required
var URLParameter : collectionof NameAndValue;
var URLParameterEntry : NameAndValue;
URLParameterEntry.Name = “SoID”;
URLParameterEntry.Value = this.ID.content;
URLParameter.Add(URLParameterEntry);
var response = WebServiceUtilities.ExecuteRESTService(“JerryExternalService”, “JerryExternal”, HttpMethod, HttpResource,
URLParameter, HeaderParameter,ContentType, Body);
this.OutboundDeliveryID = response.Content;
raise delivery_message.Create(“S”, this.OutboundDeliveryID);
要获取更多 Jerry 的原创文章,请关注公众号 ” 汪子熙 ”: