That worked perfect!  Thank you!

I agree that OTRS should deliver the WSDL; maybe some day.

Thanks again for your help, I am happy to have this working now.


From: "Christoph Zwerschke" <zwerschke@urz.uni-heidelberg.de>
To: "User questions and discussions about OTRS." <otrs@otrs.org>
Sent: Wednesday, July 16, 2014 11:14:08 AM
Subject: Re: [otrs] Generic Interface with Python

Am 16.07.2014 17:49, schrieb Kristofer Pettijohn:
> Did you have to hand craft a wsdl?

No, luckily someone did this already for me ;-)

https://code.google.com/p/otrs-git/source/browse/development/webservices/GenericTicketConnector.wsdl

I changed the hostname in the WSDL file and saved it as connector.wsdl
along with the following code

from suds.client import Client

wsdl_file = os.path.join(os.path.dirname(__file__), 'connector.wsdl')
wsdl_file = 'file:///' + os.path.abspath(wsdl_file)

client = Client(wsdl_file)

ticket = client.service.TicketCreate(dict(
     UserLogin=..., Password=...,
     Ticket=dict(Title=..., CustomerUser=...,
         Queue=..., State=..., Priority...,
     Article=dict(ArticleType=..., SenderType=...,
         From=..., Subject=...,
         Body=..., ContentType='text/plain; charset=utf8'
     )))

I hope this helps.

Actually OTRS should deliver the WSDL file, it's a shame it doesn't.

-- Christoph

---------------------------------------------------------------------
OTRS mailing list: otrs - Webpage: http://otrs.org/
Archive: http://lists.otrs.org/pipermail/otrs
To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs