我已经配置了通用票证连接器,数据映射设置为simple / xslt / empty,我得到curl调用的空响应。我可以看到服务器正在接收请求,但它没有响应。有人可以帮我解决这个问题。
我在https://github.com/OTRS/otrs/tree/master/development/webservices
的服务器端配置---
Debugger:
DebugThreshold: debug
TestMode: '0'
Description: Manage remote tickets
FrameworkVersion: 5.0.20
Provider:
Operation:
CreateTicket:
Description: Create remote tickets
MappingInbound: {}
MappingOutbound: {}
Type: Ticket::TicketCreate
Get ticket:
Description: Get ticket
MappingInbound: {}
MappingOutbound: {}
Type: Ticket::TicketGet
Sessioncreate:
Description: create remote session
MappingInbound: {}
MappingOutbound: {}
Type: Session::SessionCreate
Transport:
Config:
KeepAlive: ''
MaxLength: '1000000000'
RouteOperationMapping:
CreateTicket:
RequestMethod:
- POST
Route: /Ticket
Get ticket:
RequestMethod:
- GET
Route: /Ticket/:TicketID
Sessioncreate:
RequestMethod:
- POST
Route: /Session
Type: HTTP::REST
RemoteSystem: ''
Requester:
Transport:
Type: ''
根据文档从远程系统调用卷曲:
curl "http://otrs.com/otrs/nph-genericinterface.pl/Webservice/GenericTicketConnectorREST/Ticket/6000?UserLogin=agent&Password=123"
curlcall的输出:
curl: (52) Empty reply from server
答案 0 :(得分:1)
我遇到了同样的错误,并且可以通过对URL使用以下方案来解决该问题:
http://otrs.com/otrs/nph-genericinterface.pl/Webservice/[Web Service Name]/[Operation Name]/[Variable]?UserLogin=[Agent Login]&Password=[Agent Password]
占位符来自OTRS设置中的Web服务配置:
变量的映射可以通过使用导致这种形式的“配置”按钮进行配置:
例如如果OTRS URL为localhost
,Web服务名称为Foobar
,座席登录名是agent
,而他/她的密码是123456
,则卷曲请求可能看起来像(给定如屏幕截图所示配置命令TicketGet
:
curl "https://localhost/otrs/nph-genericinterface.pl/Webservice/Foobar/TicketGet/10235?UserLogin=agent&Password=123456"