0

我是 SAVON 的新手,ruby 这是我从客户那里得到的第一个任务。因此,非常感谢任何帮助。

<complexType name="CEvent">
 <annotation>
  <documentation>The base used for all events. All events extend this structure.</documentation> 
  </annotation>
 <complexContent>
 <extension base="ttns:CItemWithDBRecordId">
 <sequence>
  <element name="user" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="date" type="xsd:dateTime" minOccurs="1" maxOccurs="1" nillable="false" /> 
  <element name="notes" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="eventaddorder" type="xsd:short" minOccurs="1" maxOccurs="1" /> 
  <element name="name" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="parenteventid" type="xsd:long" minOccurs="0" maxOccurs="1" /> 
  <element name="attachmentlist" type="ttns:ArrayOfCFileAttachment" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="fieldlist" type="ttns:ArrayOfCField" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="resultingstate" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="hours" type="xsd:double" minOccurs="0" maxOccurs="1" /> 
  <element name="assigntolist" type="ttns:ArrayOfstring" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="releasenotesversion" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="generatedeventtype" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="generatedbyname" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="totaltimespent" type="xsd:double" minOccurs="0" maxOccurs="1" /> 
  <element name="overrideuser" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" /> 
  <element name="marksuspect" type="xsd:boolean" minOccurs="0" maxOccurs="1" /> 
  </sequence>
  </extension>
  </complexContent>
  </complexType>

而且我不知道如何获得它,还需要使用我的输入数据更新元素的字段。

我以这种方式访问​​复杂名称。

响应 = @client.request 'CEvent'

我得到的回应是

(SOAP-ENV:Client) 方法“ins0:CEvent”未实现:方法名称或名称空间无法识别

我确定这不是方法,因为它不是方法名称,所以我还在挠头来解决这个问题。!!

4

1 回答 1

0

我最近刚刚完成了一个使用 SAVON 访问 Microsoft SharePoint 上的 SOAP 服务的项目。您应该能够使用 Savon 请求返回的哈希值访问响应数据。

response.hash[:annotation][:complexContent][:sequence]

看看下面我网站上的文章。它不是特定于您的要求,但可能会有所帮助。

http://mark.stratmann.me/content_items/using-savon-to-connect-to-microsoft-sharepoint-soap-services-in-rails-3-2

于 2013-02-16T11:03:52.803 回答