小编And*_*erg的帖子

在 PolicyCenter 中创建基本 REST API

我正在尝试在 PolicyCenter 中创建基本的 HelloWorld REST API。GET /apis我从的端点(从)收到内部服务器错误com.guidewire.pl.rest.docs.ApiListGenerator,并且我的新端点返回 404 Not Found。我不确定缺少什么,并且在日志中没有看到任何线索。欢迎任何提示。

获取 http://localhost:8180/pc/rest/apis

{
  "status": 500,
  "errorCode": "java.lang.IllegalArgumentException",
  "cause": {
    "class": "java.lang.IllegalArgumentException",
    "message": "Keys in JsonObject cannot be null"
  },
  "stackTrace": [
    "gw.api.json.JsonObject.validateKey(JsonObject.java:898)",
    "gw.api.json.JsonObject.put(JsonObject.java:849)",
    "com.guidewire.pl.rest.docs.ApiListGenerator.lambda$createApiListJson$2(ApiListGenerator.java:37)",
    "java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183)", 
    ...
Run Code Online (Sandbox Code Playgroud)

获取 http://localhost:8180/pc/rest/helloworld

{ 
  "status": 404,
  "errorCode": "gw.api.rest.exceptions.NotFoundException", 
  "userMessage": "No resource was found at path /helloworld"
}
Run Code Online (Sandbox Code Playgroud)

[模块\配置\gsrc\myorg\pc\integration\restapi\helloworld\HelloWorldHandler.gs]

package myorg.pc.integration.restapi.helloworld    

class HelloWorldHandler {

  public function getHelloWorld() : String {
    return 'Hello, World!'
  }

}
Run Code Online (Sandbox Code Playgroud)

[模块\配置\配置\集成\apis\myorg\pc\helloworld\helloworld-1.0.swagger.yaml]

swagger: "2.0"
info:
  version: "1.0"
  title: …
Run Code Online (Sandbox Code Playgroud)

guidewire

0
推荐指数
1
解决办法
403
查看次数

标签 统计

guidewire ×1