title: Consuming OTRS TicketConnector from .NET apps
body: <p>I want to consume <strong><a href="http://otrs.github.io/doc/manual/admin/3.3/en/html/genericinterface.html#generic-ticket-connector" rel="nofollow">OTRS TicketConnector</a></strong> webservice in a .NET app.</p>
  
  <p>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.</p>
  
  <p>I've found a custom WSDL for TicketConnector <a href="https://raw.githubusercontent.com/mbeijen/otrs/master/development/webservices/GenericTicketConnector.wsdl" rel="nofollow">here</a>. But when I'm trying to use it in 'Add Service Reference' it leads to an empty Reference.cs showing the following errors:</p>
  
  <pre><code>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.
  </code></pre>
  
  <p>I've tried to import the WSDL above via svcutil with no success.<br>
  Also, I've tried to import this WSDL via 'Add Web Reference' with the same results.</p>
  
  <p>So my question is: <strong>how do you consume OTRS TicketConnector service from a .NET app?</strong><br>
  Maybe you can give a code snippet or a proper WSDL that can be successfully imported with the .NET tools?<br>
  Also, I would appreciate any help in resolving issues with the WSDL errors I mentioned above.</p>