-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't seem to get full text search working using SOAP #10
Comments
As far as I can see, ContentSearch = 'OR' is being ignored by the OTRS Generic Ticketconnector. When I do some testing, the results appear as if only results are given back for which each of the conditions specified is True. This behavior occurs both calling the TicketConnector from Python and when testing the GenericTicket connector directly using SoapUI. @frdmn could you do some testing if you agree with me that the ticket connector checks for each condition regardless of the value supplied for ContentSearch? If so, we could file a bug report with OTRS itself. |
@ewsterrenburg I would love to debug/test this with you! I already spent several months trying to get a proper response from the OTRS team, but no-one really could help me out yet. Let me know when and how you need my help 👍 |
Doesn't sound really hopeful, since I suspect the issue is located within OTRS itself... @frdmn Could you please check if a request of the following nature only returns you the tickets for which the string being searched for (I used "test", use something that is present in your tickets ;)) occurs both in the subject and body of the ticket. If so, I will put it up on the OTRS mailing list
|
Not sure if I do this right, but I setup SoapUI, downloaded the WSDL, imported it and tried the following request: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://www.otrs.org/TicketConnector/">
<soapenv:Header/>
<soapenv:Body>
<TicketSearch>
<UserLogin>jonas.friedmann</UserLogin>
<Password>[password]</Password>
<Body>RapidSSL</Body>
<Subject>RapidSSL</Subject>
<ContentSearch>OR</ContentSearch>
</TicketSearch>
</soapenv:Body>
</soapenv:Envelope> Which returns the following (error) response: <soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<Fault xmlns="http://www.otrs.org/TicketConnector/">
<faultcode>Server</faultcode>
<faultstring>Namespace from SOAPAction 'http://www.otrs.org/TicketConnector' does not match namespace from configuration 'http://www.otrs.org/TicketConnector/'</faultstring>
</Fault>
</soap:Body>
</soap:Envelope> Did I miss anything? |
Don't know, it's working for me. But you could also test it using your python code I guess... |
Interesting, works for me via |
Here's the request received from the debugger:
Comparison: 2,3c2,3
< 'CONTENT_LENGTH' => '422',
< 'CONTENT_TYPE' => 'text/xml;charset=UTF-8',
---
> 'CONTENT_LENGTH' => '388',
> 'CONTENT_TYPE' => 'text/xml;charset=utf-8',
7,8c7,8
< 'HTTP_ACCEPT_ENCODING' => 'gzip,deflate',
< 'HTTP_CONNECTION' => 'Keep-Alive',
---
> 'HTTP_ACCEPT_ENCODING' => 'identity',
> 'HTTP_CONNECTION' => 'close',
10,11c10
< 'HTTP_SOAPACTION' => '"http://www.otrs.org/TicketConnector/TicketSearch"',
< 'HTTP_USER_AGENT' => 'Apache-HttpClient/4.1.1 (java 1.5)',
---
> 'HTTP_USER_AGENT' => 'Python-urllib/2.7',
19c18
< 'REMOTE_PORT' => '56885',
---
> 'REMOTE_PORT' => '56379',
30c29,30
< 'SERVER_SOFTWARE' => 'Apache/2.2.16 (Debian)'
---
> 'SERVER_SOFTWARE' => 'Apache/2.2.16 (Debian)',
> 'SSL_TLS_SNI' => 'ticket.intern.company.de' My guess is that the |
@ewsterrenburg Finally got it working! Apparently the Regarding your actual question: I've picked a ticket which contains a really unique ticket number from a remote ticket system (2016031410000296) only in the subject, but not in the body. Now I tried a SOAP request like this: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns="http://www.otrs.org/TicketConnector/">
<soapenv:Header/>
<soapenv:Body>
<TicketSearch>
<UserLogin>jonas.friedmann</UserLogin>
<Password>[password]</Password>
<Body>2016031410000296</Body>
<Subject>2016031410000296</Subject>
<ContentSearch>OR</ContentSearch>
</TicketSearch>
</soapenv:Body>
</soapenv:Envelope> And this is what I've received: <?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Body>
<TicketSearchResponse xmlns="http://www.otrs.org/TicketConnector/" xsi:nil="true" />
</soap:Body>
</soap:Envelope> Ergo, the response is completely empty even though, it should actually list at least one ticket ID. To cross check this problem I removed either I guess this confirms our assumptions, right? |
@frdmn I agree. |
@ewsterrenburg I am not really familiar with mailing lists, so it would be nice if you could submit it. If you have more important stuff to do right now, I can also try to o it :) |
Posted it on the OTRS mailinglist |
Thank you! Now let's wait patiently for a response :) |
@frdmn |
🙂👍 Von meinem iPhone gesendet
|
I have been working on a Python implementation for the OTRS API over the last few days which - I'll have to admit - actually does the same thing as you have done here. But I really did not want to touch that SOAP stuff and am using the REST interface.
The only ticket I have in my system is the initial "Welcome to OTRS" which has "worldwide" in it's body, so the ticket should also be found in my [12] example, right?! |
@frennkie Since @frdmn has similar experiences of proper responses lacking, priority for the dev team seems to be low. Fortunately, I am not using full text searches anyway. |
@ewsterrenburg I assume you have absolutely no intention on using/switch to REST as you already have a full SOAP implementation, right? I have not yet published my code but am planning to do so (possibly as "PyOTRS"). Any objections from your side? |
No objections at all and neither any intention to use/switch to REST at the moment.
|
@ewsterrenburg I think you got the wrong frennkie there.. I'm @frennkie ;-) |
@frennkie Ok, that doesn't seem difficult. Nonetheless I was being clueless when I installed OTRS while the SOAP service worked right away. So, maybe it's possible to switch someday, yet for now SOAP service does it's job perfectly fine :) |
@frennkie Perhaps you could "+1" the issue in the bug tracker so the OTRS dev team notice the demand of a fix for this problem. Right now, my original project is kind of abandoned because it depends on a full text search in OTRS :/ I already thought about just scraping the web page instead for now... |
@frdmn I already posted a follow up in the OTRS tracker to Bug 11981. |
@frennkie Oh, I saw Robert's comments but didn't realize it's you. Thanks buddy! 👍 |
Issue is clear. Is now fixed in OTRS (at least in OTRS5). Will close this issue. |
👍 |
Hi all, I know that this issue is closed but I have the same problem when trying to search tickets based on their article fields (subject, body etc). I m having OTRS 6 on ubuntu and I am executing queries with curl in the terminal. OTRS is also configured as an Invoker with REST and I am using the common GenericTicketConnectorREST webservice with the basic ticket and session functions. For example: But this one that searches for tickets with a specific subject it doesn't work and returns all the existing tickets on the OTRS server. Same problem exists for the From, To, CC and Body. ContentSearch and FullTextIndex don't make a difference as well. Also AttachmentName doesn't seem to work as well but that is not article related I guess. Any help will be appreciated. |
@Filterer If so, could you please try the OTRS mailing list or one of the OTRS related forums for help... |
Hello,
i struggle since about 3 months to get the full text search working via SOAP.
Already tried asking for help in the official otterhub forum, but noone seems to be able to help me here: OtterHub - OTRS Community | Full text search via SOAP and GenericTicketConnector
Here's what I use at the moment:
... based on the example code in the Ticket.pm file in the OTRS source: https://github.com/OTRS/otrs/blob/1e908159a5dbdcfb94cc35d13bf15b04ac3e6a24/Kernel/System/LinkObject/Ticket.pm#L271-L282, but for some reason it always returns an empty array.
However, it works fine when I try a more simple search like:
I want to search like the full text search in the web ui though. Any ideas?
The text was updated successfully, but these errors were encountered: