1

我正在尝试使用 curl 从 shell 更新 Bugzilla 中的错误。我已成功授权并收到 cookie。但是当我尝试使用 XML 更新错误时,如下所示:

<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>Bug.update</methodName>
<params>
<param><value><struct>
<member><name>ids</name><value>91039</value></member>
<member><name>comment</name>
<name>body</name><value><string>test1test1test1</string></value>
<name>is_private</name><value><boolean>1</boolean></value>
</member>
</struct></value></param>
</params>
</methodCall>

我得到:

<?xml version="1.0" encoding="utf-8"?>
<methodResponse>
  <params>
    <param>
      <value>
        <struct>
          <member>
            <name>bugs</name>
            <value>
              <array>
                <data>
                  <value>
                    <struct>
                      <member>
                        <name>changes</name>
                        <value>
                          <struct />
                        </value>
                      </member>
                      <member>
                        <name>last_change_time</name>
                        <value>
                          <dateTime.iso8601>
                          20131028T12:03:12</dateTime.iso8601>
                        </value>
                      </member>
                      <member>
                        <name>id</name>
                        <value>
                          <int>91039</int>
                        </value>
                      </member>
                      <member>
                        <name>alias</name>
                        <value>
                          <string />
                        </value>
                      </member>
                    </struct>
                  </value>
                </data>
              </array>
            </value>
          </member>
        </struct>
      </value>
    </param>
  </params>
</methodResponse>

该错误没有任何反应。

4

1 回答 1

0

After adding value and struct tags it's started working.

Proper XML:

<?xml version='1.0' encoding='UTF-8'?>
<methodCall>
<methodName>Bug.update</methodName>
<params>
<param><value><struct>
<member><name>ids</name><value>91039</value></member>
<member><name>comment</name>
<value>
<struct>
<member><name>body</name><value><string>test1test1test1</string></value></member>
<member><name>is_private</name><value><boolean>1</boolean></value></member>
</struct>
</value>
</member>
</struct></value></param>
</params>
</methodCall>
于 2013-10-29T08:19:28.320 回答