
I am attempting to use Python and SOAPpy as a requestor to the Generic Interface. However, I am having issues. This is the complete Python code for my test: http://pastebin.com/jD7jD5yv This is the SOAP request that it is sending out: http://pastebin.com/gUKc8np4 OTRS system log is reporting that it "Got no OperationType!" I am stuck and can't seem to find what I am missing. Can someone point me in the right direction? Thanks, Kris

Christoph,
Yes, I did. I imported a YAML file for the GenericTicketConnector (below)
---
Debugger:
DebugThreshold: debug
TestMode: '0'
Description: Ticket Connector Sample
FrameworkVersion: 3.3.6
Provider:
Operation:
SessionCreate:
Description: Creates a Session
MappingInbound:
Type: Simple
MappingOutbound:
Type: Simple
Type: Session::SessionCreate
TicketCreate:
Description: Creates a Ticket
MappingInbound:
Type: Simple
MappingOutbound:
Type: Simple
Type: Ticket::TicketCreate
TicketGet:
Description: Retrieve Ticket data
MappingInbound:
Type: Simple
MappingOutbound:
Type: Simple
Type: Ticket::TicketGet
TicketSearch:
Description: Search for Tickets
MappingInbound:
Type: Simple
MappingOutbound:
Type: Simple
Type: Ticket::TicketSearch
TicketUpdate:
Description: Updates a Ticket
MappingInbound:
Type: Simple
MappingOutbound:
Type: Simple
Type: Ticket::TicketUpdate
Transport:
Config:
MaxLength: '100000000'
NameSpace: http://www.otrs.org/TicketConnector/
Type: HTTP::SOAP
RemoteSystem: ''
Requester:
Transport:
Type: ''
----- Original Message -----
From: "Christoph Zwerschke"
OTRS system log is reporting that it "Got no OperationType!"
Did you create a GenericTicketConnector web service and add the TicketCreate operation for "OTRS as provider" with in the Admin web interface? -- 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

Am 15.07.2014 20:18, schrieb Kristofer Pettijohn:
Yes, I did. I imported a YAML file for the GenericTicketConnector
That looks ok. Maybe it's a problem with the hrefs or the namespaces created by SOAPpy. I am using suds-jurko instead of SOAPpy because it also works with Python 3 and is recommended on the SOAPpy homepage. It creates output similar to what Michiel posted and works very well for me. -- Christoph

I wasn't attached to SOAPpy for any reason other than that was the example I found for connecting to OTRS from Python before the GenericInterface came along.
Would you be able to post a short snippet of how you are connecting to GI from suds-jurko?
I am receiving this error:
suds.transport.TransportError: HTTP Error 411: Length Required
Did you have to hand craft a wsdl?
----- Original Message -----
From: "Christoph Zwerschke"
Yes, I did. I imported a YAML file for the GenericTicketConnector
That looks ok. Maybe it's a problem with the hrefs or the namespaces created by SOAPpy. I am using suds-jurko instead of SOAPpy because it also works with Python 3 and is recommended on the SOAPpy homepage. It creates output similar to what Michiel posted and works very well for me. -- 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

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

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.
----- Original Message -----
From: "Christoph Zwerschke"
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/Gen... 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

Hi Christoph, Op 16 jul. 2014 18:14 schreef "Christoph Zwerschke" < zwerschke@urz.uni-heidelberg.de>:
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/Gen... <snip>
Actually OTRS should deliver the WSDL file, it's a shame it doesn't.
Well, actually the file you are looking at IS from the OTRS project, it is just someone's import into Google Code. The original is here: https://github.com/OTRS/otrs/tree/rel-3_3/development/webservices -- Mike

Am 17.07.2014 22:17, schrieb Michiel Beijen:
Actually OTRS should deliver the WSDL file, it's a shame it doesn't.
Well, actually the file you are looking at IS from the OTRS project, it is just someone's import into Google Code. The original is here:
https://github.com/OTRS/otrs/tree/rel-3_3/development/webservices
Thanks, hadn't seen that. Unfortunately, it's not mentioned in the documentation. But what I meant was that the file should be delivered by OTRS via HTTP when the service URL is requested with ?wsdl query parameter. -- Christoph

I also noticed in testing after your assistance, is that new tickets are created assigned to root (like normal tickets), but with a status of locked. Did you see this also, or is it just me?
----- Original Message -----
From: "Christoph Zwerschke"
Actually OTRS should deliver the WSDL file, it's a shame it doesn't.
Well, actually the file you are looking at IS from the OTRS project, it is just someone's import into Google Code. The original is here:
https://github.com/OTRS/otrs/tree/rel-3_3/development/webservices
Thanks, hadn't seen that. Unfortunately, it's not mentioned in the documentation. But what I meant was that the file should be delivered by OTRS via HTTP when the service URL is requested with ?wsdl query parameter. -- 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

Am 21.07.2014 05:53, schrieb Kristofer Pettijohn:
I also noticed in testing after your assistance, is that new tickets are created assigned to root (like normal tickets), but with a status of locked. Did you see this also, or is it just me?
Setting the status with the interface to "new" works for me. -- Christoph

Hi Kris,
I created a perl-based client for the Generic Interface:
https://metacpan.org/pod/distribution/App-OTRS-CreateTicket/bin/otrs.CreateT...
your datastructure is not correct. The server complains about a missing
OperationType, what is 'TicketCreate' in my XML structure below.
I found this to be the XML that is generated by my client, which *works*:
http://requestb.in/1icbkha1?inspect#rmn6uh
The request is this:
<?xml version="1.0" encoding="UTF-8"?>
I am attempting to use Python and SOAPpy as a requestor to the Generic Interface. However, I am having issues.
This is the complete Python code for my test: http://pastebin.com/jD7jD5yv This is the SOAP request that it is sending out: http://pastebin.com/gUKc8np4
OTRS system log is reporting that it "Got no OperationType!"
I am stuck and can't seem to find what I am missing. Can someone point me in the right direction?
Thanks,
Kris
--------------------------------------------------------------------- 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
participants (3)
-
Christoph Zwerschke
-
Kristofer Pettijohn
-
Michiel Beijen