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

Reply via email to