从.NET应用程序消费OTRS TicketConnector [英] Consuming OTRS TicketConnector from .NET apps

查看:253
本文介绍了从.NET应用程序消费OTRS TicketConnector的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想消费的 OTRS TicketConnector Web服务在.NET应用程序。

I want to consume OTRS TicketConnector webservice in a .NET app.

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

Normally, the easiest way to get connected to a webservice is to import its WSDL via 'Add Service Reference'. Unfortunately, OTRS TicketConnector doesn't publish the WSDL.

我已经找到了TicketConnector的此处。但是,当我试图使用它'添加服务引用'它会导致显示以下错误空Reference.cs:

I've found a custom WSDL for TicketConnector here. But when I'm trying to use it in 'Add Service Reference' it leads to an empty Reference.cs showing the following errors:

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。结果$ B $ ; b另外,我试图导入通过添加Web引用具有相同的结果这个WSDL

I've tried to import the WSDL above via svcutil with no success.
Also, I've tried to import this WSDL via 'Add Web Reference' with the same results.

所以我的问题是:你怎么消费OTRS从.NET应用程序TicketConnector服务?结果
也许你可以给一个代码段或可以使用.NET工具成功导入?结果
也适当的WSDL,我希望在解决与我上面提到的WSDL错误问题的任何帮助。

So my question is: how do you consume OTRS TicketConnector service from a .NET app?
Maybe you can give a code snippet or a proper WSDL that can be successfully imported with the .NET tools?
Also, I would appreciate any help in resolving issues with the WSDL errors I mentioned above.

推荐答案

感谢的 OTRS社区论坛,我已经得到了答案? 的WSDL 对于票务连接可在的 GitHub上

Thanks to the OTRS community forum, I've got the answer. WSDLs for Ticket Connector are available at GitHub.

这篇关于从.NET应用程序消费OTRS TicketConnector的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆