简体   繁体   English

Sage sdata Web服务问题

[英]Sage sdata web service issue

I am working on Sage SData integration. 我正在研究Sage SData集成。 Unfortunately, there is a problem in sending data to the server. 不幸的是,将数据发送到服务器存在问题。 I am able to retrieve data and delete contract but when I add new contract through POST or update through PUT , it gives an error: 我能够检索数据并删除合同,但是当我通过POST添加新合同或通过PUT更新时,它会出错:

error ApplicationDiagnosis Index was out of range. 错误ApplicationDiagnosis Index超出范围。 Must be non-negative and less than the size of the collection. 必须是非负数且小于集合的大小。 Parameter name: index System.ArgumentOutOfRangeException: Index was out of range. 参数名称:index System.ArgumentOutOfRangeException:索引超出范围。 Must be non-negative and less than the size of the collection 必须是非负数且小于集合的大小

Does any one have a PHP or JSON example of adding a new contract? 有没有人有PHP或JSON添加新合同的例子?

Do you have an example of the endpoint your trying to get to? 你有一个你试图去的端点的例子吗?

My guess would be your trying to access an endpoint that doesn't return anything, the web server still tries to serve you a atom feed but fails. 我的猜测是你试图访问一个不返回任何东西的端点,网络服务器仍试图为你提供一个原子提供但却失败了。 I have had this numerous times while working with SData until I find the correct endpoints for the Resource Kinds I'm wanting to work with. 在使用SData时,我已经多次这样做,直到我找到了我想要使用的资源种类的正确端点。

Couple of tips 几个小技巧

SData URL takes the following form; SData URL采用以下形式;

<protocol>://<hostname>:<port>/sdata/<application>/<contract>/<resourcekind>?<queryparameters>

Couple of useful system urls which may help you discover registered endpoints easier; 几个有用的系统网址,可以帮助您更容易地发现注册的端点;

  • <protocol>://<hostname>:<port>/sdata/$system (List all system endpoints) <protocol>://<hostname>:<port>/sdata/$system (列出所有系统端点)
  • <protocol>://<hostname>:<port>/sdata/$system/adapters (List installed adapters) <protocol>://<hostname>:<port>/sdata/$system/adapters (列出已安装的适配器)
  • <protocol>://<hostname>:<port>/sdata/$system/registry/endpoints (List of registered endpoints) <protocol>://<hostname>:<port>/sdata/$system/registry/endpoints (已注册端点列表)

You may find help more readily available from the following resources; 您可以通过以下资源更方便地获得帮助;

http://sdata.sage.com/ (Sage SData Portal) http://sdata.sage.com/(Sage SData Portal)

http://sage.github.io/SData-2.0/pages/core/0100/ (Sage SData Core Specification 1.1) http://sage.github.io/SData-2.0/pages/core/0100/(Sage SData核心规范1.1)

http://sdata.sage.com/SDataForum/ (Sage SData Forum - Useful Resource) http://sdata.sage.com/SDataForum/(Sage SData论坛 - 实用资源) (Forum unfortunately has been discontinued) (不幸的是论坛已经停止)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM