刚刚使用OTRS Help Desk 3.3.8在OTRS Appliance 1.0.8上进行了测试,对我来说一切都很好。我可以使用TicketGet方法获取文章和附件。
请参阅以下描述如何设置OTRS Web 服务设置的文章。
完成OTRS Web 服务设置后,我通过 SoapUI 将以下 SOAP 请求发送到OTRS Ticket Connector端点(在我的例子中http://192.168.112.34/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnector
):
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<TicketGet>
<UserLogin>root@localhost</UserLogin>
<Password>root</Password>
<TicketID>965</TicketID>
<AllArticles>1</AllArticles>
<Attachments>1</Attachments>
</TicketGet>
</soapenv:Body>
</soapenv:Envelope>
并得到以下回应:
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<TicketGetResponse xmlns="http://www.otrs.org/TicketConnector/">
<Ticket>
<Age>160723</Age>
<ArchiveFlag>n</ArchiveFlag>
<Article>
<ArticleID>3260</ArticleID>
<ArticleType>webrequest</ArticleType>
...
<Attachment>
<Content>
W0dlbmVyYWxdDQpTZXJ2ZXI9Mg0KQ3JlYXRlVGFibGU9MA0KW0Rlc3RdDQpTYXZlVG9GaWxlPTEN
...
aXNoXQ0KTG9hZEludG9FZGl0b3I9MA0KQ2xvc2VBZnRlckNvbXBsaXRlPTANCg==
</Content>
<ContentAlternative/>
<ContentID/>
<ContentType>text/plain</ContentType>
<Filename>1.smt</Filename>
<Filesize>673 Bytes</Filesize>
<FilesizeRaw>673</FilesizeRaw>
</Attachment>
<Attachment>
<Content>
REVDTEFSRSBAUkMgaW50DQpERUNMQVJFIEBMb2dnZWRVc2VySUQgaW50DQpERUNMQVJFIEBVc2Vy
...
Y2hhbmdlc1htbA0KICAsQEJhc2VDb250cmFjdHNYbWwNCkdPDQoNCg==
</Content>
<ContentAlternative/>
<ContentID/>
<ContentType>application/octet-stream</ContentType>
<Filename>3.sql</Filename>
<Filesize>610 Bytes</Filesize>
<FilesizeRaw>610</FilesizeRaw>
</Attachment>
<AttachmentIDOfHTMLBody>3</AttachmentIDOfHTMLBody>
<Body>sdfghhfghg</Body>
...
</Article>
...
</Ticket>
</TicketGetResponse>
</soap:Body>
</soap:Envelope>
如您所见,我收到了票的初始文章,里面有 2 个附件。
希望这有助于或毫不犹豫地提供反馈。