我想消耗 OTRS TicketConnector webservice在.NET应用程序中。

一般情况下,可以连接到一个web服务的最简单的方法是通过“添加服务引用”导入其WSDL。不幸的是,OTRS TicketConnector不会发布WSDL。

我找到了一个自定义WSDL for ticledConnector 。但是,当我试图在使用它“添加服务引用”它导致了一个空Reference.cs显示以下错误:

Cannot import wsdl:portType
Detail: An exception was thrown while running a WSDL import extension: System.ServiceModel.Description.XmlSerializerMessageContractImporter
Error: There was a problem loading the XSD documents provided: a reference to a schema type with name 'OTRS_TicketCreate' and namespace 'http://www.otrs.org/TicketConnector/' could not be resolved because the type definition could not be found in the schema for targetNamespace 'http://www.otrs.org/TicketConnector/'. Please check the XSD documents provided and try again.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.otrs.org/TicketConnector/']/wsdl:portType[@name='GenericTicketConnector_Interface']

Cannot import wsdl:binding
Detail: There was an error importing a wsdl:portType that the wsdl:binding is dependent on.
XPath to wsdl:portType: //wsdl:definitions[@targetNamespace='http://www.otrs.org/TicketConnector/']/wsdl:portType[@name='GenericTicketConnector_Interface']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.otrs.org/TicketConnector/']/wsdl:binding[@name='GenericTicketConnector_Service']

Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://www.otrs.org/TicketConnector/']/wsdl:binding[@name='GenericTicketConnector_Service']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://www.otrs.org/TicketConnector/']/wsdl:service[@name='GenericTicketConnector']/wsdl:port[@name='GenericTicketConnector_endPoint']

Custom tool error: Failed to generate code for the service reference 'ServiceReference1'.  Please check other error and warning messages for details.
.

我试图通过导入没有成功SvcUtil工具上面的WSDL。点击 此外,我试图通过“添加Web引用”具有相同的结果导入此WSDL。

所以我的问题是:你如何从.NET应用程序消耗OTRS TicketConnector服务点击? 也许你可以给出一个代码片段或可以成功地用.NET工具导入的正确WSDL?
此外,我会感谢解决上面提到的WSDL错误的问题。

有帮助吗?

解决方案

感谢 Otrs社区论坛,我得到了答案。 wsdls 罚单连接器可在 github

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top