【问题标题】:Error 500 when trying to create an Event in IBM Connections using REST API尝试使用 REST API 在 IBM Connections 中创建事件时出现错误 500
【发布时间】:2014-04-24 15:18:14
【问题描述】:

我正在尝试使用 IBM Connections 4.5 中的 REST 创建事件,我使用了 IBM Connections API 文档,但是当我发布请求时,我收到错误 500,并且没有返回错误消息。我传递的 Atom 文档是:

<?xml version="1.0" encoding="UTF-8"?>
<entry 
    xmlns="http://www.w3.org/2005/Atom" 
    xmlns:app="http://www.w3.org/2007/app" 
    xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
<title type="text">ST0809</title>
<content type="html"><![CDATA[ Description ]]></content>
<category term="event" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>
 <snx:recurrence scheme="http://www.ibm.com/xmlns/prod/sn" custom="yes">
      <snx:period scheme="http://www.ibm.com/xmlns/prod/sn">
        <snx:startDate scheme="http://www.ibm.com/xmlns/prod/sn">2014-06-23T08:00:00.000Z</snx:startDate>
        <snx:endDate scheme="http://www.ibm.com/xmlns/prod/sn">2014-06-23T09:00:00.000Z</snx:endDate>
      </snx:period>
</snx:recurrence>
</entry>

我发布到 URL“/communities/calendar/atom/calendar/event?calendarUuid=" 显然填写了 uuid。

有人有什么想法吗?

【问题讨论】:

    标签: rest atom-feed connection


    【解决方案1】:

    IBM 文档中有一个错误,它缺少一些东西(例如,文档没有提到 snx:period)。

    这是工作版本,注意已经添加了 allday。

    <entry 
    xmlns="http://www.w3.org/2005/Atom" 
    xmlns:app="http://www.w3.org/2007/app" 
    xmlns:snx="http://www.ibm.com/xmlns/prod/sn">
    <title type="text">ST0809</title>
    <content type="html"><![CDATA[ Description ]]></content>
    <snx:allday>0</snx:allday>
    <category term="event" scheme="http://www.ibm.com/xmlns/prod/sn/type"></category>
    <snx:recurrence scheme="http://www.ibm.com/xmlns/prod/sn" custom="yes">
    <snx:period scheme="http://www.ibm.com/xmlns/prod/sn">
    <snx:startDate scheme="http://www.ibm.com/xmlns/prod/sn">2014-06-23T08:00:00.000Z</snx:startDate>
    <snx:endDate scheme="http://www.ibm.com/xmlns/prod/sn">2014-06-23T09:00:00.000Z</snx:endDate>
    </snx:period>
    </snx:recurrence>
    </entry>
    

    【讨论】:

      猜你喜欢
      • 2021-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多