Вопрос

Я хочу потреблять ОТРС Tickenconnnector Webservice в приложении .net.

Обычно самый простой способ подключения к веб-сервису - импортировать свой WSDL через «Добавить ссылку на обслуживание». К сожалению, OTRS TicketConnnector не публикует WSDL.

Я нашел пользовательский WSDL для TicketsConnector здесь . Но когда я пытаюсь использовать его в «Добавить ссылку на обслуживание», это приводит к пустую ссылку .C, показывающие следующие ошибки:

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.
.

Я пытался импортировать WSDL выше через svcutil без успеха.

Кроме того, я пытался импортировать этот WSDL через «Добавить веб-ссылку» с теми же результатами.

Итак, мой вопрос: Как вы употребляете службу OTRS Tickets Connnector от приложения .NET?
Может быть, вы можете дать фрагмент кода или правильный WSDL, который может быть успешно импортирован с помощью инструментов .NET?
Кроме того, я был бы признателен за любую помощь в разрешении проблем с ошибками WSDL, которые я упомянул выше.

Это было полезно?
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top