Java OTRS Integration (approach no. 50)

English! place to talk about development, programming and coding
Post Reply
ev9raner
Znuny newbie
Posts: 3
Joined: 13 Aug 2012, 14:47
Znuny Version: 3.1.7

Java OTRS Integration (approach no. 50)

Post by ev9raner »

Hello folks,

currently our company is running OTRS 3.1.7 and works fine so far. Now i got the requirement from our management to connect OTRS to an other Java application and exchange some data. I saw that there's a SOAP API at the OTRS side available, but I have no clue to get this communication to work, because:
* I'm not able to read & understand perl
* Therefore i don't get the provided dev manuals (dev.otrs.org)

Has anybody of you a code snippet for a JAVA client to exchange data with OTRS. On this base i would be able to adapt the SOAP messages regarding the OTRS manual to fetch other necessary data.

Thanks in advance!

PS: the password policy of this forum is kinda fort-knox style ;)
Alexander Halle
Znuny expert
Posts: 296
Joined: 04 Jul 2010, 17:49
Znuny Version: 3.1.x
Real Name: Alexander Halle
Company: radprax MVZ GmbH
Location: Wuppertal
Contact:

Re: Java OTRS Integration (approach no. 50)

Post by Alexander Halle »

Perhaps you will need commercial help, because the question could be too special or maybe you have too less perl knowledge (like me ;) ), so that one can help you.

As an idea please look at the "JSON interface", maybe you can use this as a solution to communicate with OTRS:

http://www.lotb.de/wordpress/2010/json- ... -einblick/

This is not an official interface but the technology used for the iphone app, so as a side effect we got a JSON interface ;)
Alexander Halle System: OTRS 3.1.x, Ubuntu 10.04.x LTS, MySQL 5.1.x, Apache 2.2.x
OTRS Community Links: User Meetings, Projects
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Java OTRS Integration (approach no. 50)

Post by jojo »

there is also a wsdl file in the documentation
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
ev9raner
Znuny newbie
Posts: 3
Joined: 13 Aug 2012, 14:47
Znuny Version: 3.1.7

Re: Java OTRS Integration (approach no. 50)

Post by ev9raner »

Alexander Halle wrote:Perhaps you will need commercial help, because the question could be too special or maybe you have too less perl knowledge (like me ;) ), so that one can help you.
You're right, i have none perl knowledge :D

@jojo: i'll check the documentation for the wsdl description - can you tell me in which document it's located?
ev9raner
Znuny newbie
Posts: 3
Joined: 13 Aug 2012, 14:47
Znuny Version: 3.1.7

Re: Java OTRS Integration (approach no. 50)

Post by ev9raner »

Now we found the wsdl file (from the CVS system) and our SOAP Request looks like this:

Code: Select all

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:env="http://schemas.xmlsoap.org/soap/envelop/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
    <TicketGet SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
     <UserLogin>....</UserLogin>
     <Password>...</Password>
     <TicketID>....</TicketID>
</TicketGet>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
But if we send this request to our 3.1.7 OTRS we get the following response:

soap:Client:Denied access to method (TicketGet) in class (main) at /opt/otrs/Kernel/cpan-lib/SOAP/Lite.pm line 2750.

Based on our system administrators the user we use here is already configured to use the SOAP API. Do you have any additional hints what we could check / try?

*update*

We used the wsdl located in orts\development\webservices => the strange thing is, that in the wsdl the location does not point to rpc.pl ? Is that the wrong wsdl file?

Update once again
I stopped now playing with the SOAP API and use now the iPhone REST API => and this API works fine - no problems at all ;)
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Java OTRS Integration (approach no. 50)

Post by jojo »

the rpc.pl is the wrong SOAP interface, you have to use the nph-genericinterface.pl
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Alexander Halle
Znuny expert
Posts: 296
Joined: 04 Jul 2010, 17:49
Znuny Version: 3.1.x
Real Name: Alexander Halle
Company: radprax MVZ GmbH
Location: Wuppertal
Contact:

Re: Java OTRS Integration (approach no. 50)

Post by Alexander Halle »

ev9raner wrote:I stopped now playing with the SOAP API and use now the iPhone REST API => and this API works fine - no problems at all ;)
Great. I hope my link to the corresponding article on lotb helped you.

Please think later about sharing some knowledge about the creative use of the iPhone module, there's still too few information about (mis)using this module.
Alexander Halle System: OTRS 3.1.x, Ubuntu 10.04.x LTS, MySQL 5.1.x, Apache 2.2.x
OTRS Community Links: User Meetings, Projects
Post Reply