【问题标题】:ERP Operation not found error in WSO2EI DSSWSO2EI DSS 中未发现 ERP 操作错误
【发布时间】:2019-04-21 07:16:38
【问题描述】:

我在 WSO2EI 中创建了一个 REST - 数据服务并尝试通过邮递员客户端工具访问,但我收到此错误。

端点:http://LAPTOP-T4F1HOAM:8280/services/getStudRecNo?user_id=test8

找不到操作的端点引用 (EPR) 是 /services/getStudRecNo?user_id=test8 并且 WSA 操作 = null。如果此 EPR 以前可以访问,请联系服务器管理员。

谁能帮忙。

谢谢

dss 代码。

<data name="getStudRecNo" transports="http https local">
   <description>get student unique id</description>
   <config enableOData="false" id="mySchoolDB">
      <property name="driverClassName">org.postgresql.Driver</property>
      <property name="url">jdbc:postgresql://localhost:5432/mySchool</property>
      <property name="username">admin</property>
      <property name="password">admin</property>
   </config>
   <query id="GetStudentRecordNo" useConfig="mySchoolDB">
      <sql>SELECT getstudentid FROM getstudentid(?)</sql>
      <result outputType="json">{"entries": {"entry": [ { "getstudentid": "$getstudentid"} ]}}</result>
      <param defaultValue="TEST" name="user_id" sqlType="STRING"/>
   </query>
   <operation name="getsrno">
      <call-query href="GetStudentRecordNo">
         <with-param name="user_id" query-param="user_id"/>
      </call-query>
   </operation>
   <resource method="GET" path="getsrno">
      <call-query href="GetStudentRecordNo">
         <with-param name="user_id" query-param="user_id"/>
      </call-query>
   </resource>
</data>

【问题讨论】:

    标签: wso2dss wso2ei


    【解决方案1】:

    您必须将资源路径(在您的情况下为“getsrno”)附加到 URL。然后 URL 看起来像,

    http://LAPTOP-T4F1HOAM:8280/services/getStudRecNo/getsrno?user_id=test8

    另外,由于资源的HTTP方法是GET,所以请求也应该是GET请求。

    【讨论】:

      猜你喜欢
      • 2013-03-20
      • 1970-01-01
      • 1970-01-01
      • 2014-02-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-07-21
      • 2012-07-11
      相关资源
      最近更新 更多