带有链接配置项的OTRS完整故障单信息

时间:2015-12-29 09:37:38

标签: java perl soap otrs

我需要使用SOAP或其他API调用来获取完整的票证信息以及链接的配置项(例如,计算机,硬件,网络等)。

我创建了一个SOAP webservice,它给出了以下输出

 1. Type:Unclassified
 2. SLAID:
 3. EscalationResponseTime:0
 4. Title:test mail
 5. Queue:Postmaster
 6. TicketID:3
 7. Owner:XXXX.johnson@XXXXXXXXX.com
 8. State:open
 9. Priority:3 normal
 10. CreateTimeUnix:1450425201
 11. StateID:4
 12. Responsible:root@localhost
 13. CustomerID:XXXXXX.johnson@XXXXXXXXX.com
 14. UnlockTimeout:1450425202
 15. PriorityID:3
 16. EscalationUpdateTime:0
 17. OwnerID:2
 18. UntilTime:0
 19. EscalationTime:0
 20. CreateBy:2
 21. LockID:1
 22. Lock:unlock
 23. ArchiveFlag:n
 24. RealTillTimeNotUsed:0
 25. ChangeBy:2
 26. ServiceID:
 27. Created:2015-12-18 13:23:21
 28. QueueID:1
 29. CustomerUserID:XXXXXXX.johnson@XXXXXXX.com
 30. Age:949546
 31. GroupID:1
 32. TicketNumber:2015121854000021
 33. TypeID:1
 34. StateType:open
 35. ResponsibleID:1
 36. EscalationSolutionTime:0
 37. Changed:2015-12-18 13:23:29

但在这里我没有得到链接的配置项(计算机)信息。如果我在显示的浏览器中打开AgentTicketZoom页面。

Find image

现在我想获取此信息(配置项目编号,名称,已部署状态,链接为,设备,类型,IP,地址等)。

以下是我在管理控制台中为SOAP Calls导入的GenericTicketConnectorSOAP.yml网络服务

---
Debugger:
  DebugThreshold: debug
  TestMode: 0
Description: Ticket Connector SOAP Sample
FrameworkVersion: 4.x git
Provider:
  Operation:
    SessionCreate:
      Description: Creates a Session
      MappingInbound: {}
      MappingOutbound: {}
      Type: Session::SessionCreate
    TicketCreate:
      Description: Creates a Ticket
      MappingInbound: {}
      MappingOutbound: {}
      Type: Ticket::TicketCreate
    TicketUpdate:
      Description: Updates a Ticket
      MappingInbound: {}
      MappingOutbound: {}
      Type: Ticket::TicketUpdate
    TicketGet:
      Description: Retrieve Ticket data
      MappingInbound: {}
      MappingOutbound: {}
      Type: Ticket::TicketGet
    TicketSearch:
      Description: Search for Tickets
      MappingInbound: {}
      MappingOutbound: {}
      Type: Ticket::TicketSearch
  Transport:
    Config:
      MaxLength: 100000000
      NameSpace: http://www.otrs.org/TicketConnector/
    Type: HTTP::SOAP
RemoteSystem: ''
Requester:
  Transport:
    Type: ''

有人可以帮我这个吗?

1 个答案:

答案 0 :(得分:1)

您必须明白,您必须定义方法,该方法可以从您的Web服务配置中的故障单中检索链接。

为了给你提示,你应该在你的wsdl / yml文件中添加一个新的控制器,它将是LinkObject及其方法LinkList(Kernel :: System :: LinkObject)

 my $LinkList = $LinkObject->LinkList(
    Object    => 'Ticket',
    Key       => '321',
    Object2   => 'FAQ',         # (optional)
    State     => 'Valid',
    Type      => 'ParentChild', # (optional)
    Direction => 'Target',      # (optional) default Both (Source|Target|Both)
    UserID    => 1,
);

然后使用此方法检索故障单的所有链接