6.0.11 CE / SOAP API changes?

English! place to talk about OTRS development, programming and coding
Post Reply
artgrohe
OTRS newbie
Posts: 5
Joined: 16 Oct 2018, 13:15
OTRS Version?: 3.x - 6.x

6.0.11 CE / SOAP API changes?

Post by artgrohe » 16 Oct 2018, 15:37

Hi,
this is my first post in this forum, so hello everyone! :)

I'm developing a java software that makes use of the SOAP API that comes with OTRS.
The software is compatible with OTRS 3.x up to 5.x.
Now I wanted to make it compatible with 6.x, but it seems that the API has changed a lot, or at least something has changed so the responses I get are always empty / nil.
Here is an example SOAP XML Request Message to get all Queues in Otrs, posted to http://localhost/otrs/rpc.pl :

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:env="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-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Header />
   <SOAP-ENV:Body>
      <Dispatch xmlns="/Core">
         <Username xsi:type="xsd:string">some_user</Username>
         <Password xsi:type="xsd:string">some_pass</Password>
         <Object xsi:type="xsd:string">QueueObject</Object>
         <Method xsi:type="xsd:string">QueueList</Method>
      </Dispatch>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
this request has worked - until OTRS 6.
The answer looked typically like this:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope 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:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <soap:Body>
      <DispatchResponse xmlns="/Core">
         <s-gensym3 xsi:type="xsd:int">3</s-gensym3>
         <s-gensym5 xsi:type="xsd:string">Junk</s-gensym5>
         <s-gensym7 xsi:type="xsd:int">2</s-gensym7>
         <s-gensym9 xsi:type="xsd:string">Raw</s-gensym9>
         <s-gensym11 xsi:type="xsd:int">1</s-gensym11>
         <s-gensym13 xsi:type="xsd:string">Postmaster</s-gensym13>
         <s-gensym15 xsi:type="xsd:int">4</s-gensym15>
         <s-gensym17 xsi:type="xsd:string">Misc</s-gensym17>
      </DispatchResponse>
   </soap:Body>
</soap:Envelope>
The response I get is now:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope 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:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <soap:Body>
      <DispatchResponse xmlns="/Core" xsi:nil="true" />
   </soap:Body>
</soap:Envelope>
Of course I have enabled the Core::SOAP::User and Core::SOAP::Password in the System Configuration.

I know this is a very specific issue, but maybe someone of you knows where to point me.

Thank you for your time:)

jojo
Moderator
Posts: 14598
Joined: 26 Jan 2007, 14:50
OTRS Version?: Git Master
Contact:

Re: 6.0.11 CE / SOAP API changes?

Post by jojo » 16 Oct 2018, 18:40

rpc.pl is depricated. lease use the GenericInterface.

The rpc.pl always connects to the PERL API of OTRS. In OTRS 6 where several changes in the backend API. Please consult doc.otrs.com to gain deeper knowledge.
"Production": 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 :: Share your ideas

artgrohe
OTRS newbie
Posts: 5
Joined: 16 Oct 2018, 13:15
OTRS Version?: 3.x - 6.x

Re: 6.0.11 CE / SOAP API changes?

Post by artgrohe » 17 Oct 2018, 09:32

Ok, thanks for the info.
Deprecated normally means it is still working.. so it looks like since version 6 they completely deactivated it.

The GenericInterface is the feature where you create Webservices in the Admin Interface of OTRS, right?
Ok then I have to rewrite everything basically XO

jojo
Moderator
Posts: 14598
Joined: 26 Jan 2007, 14:50
OTRS Version?: Git Master
Contact:

Re: 6.0.11 CE / SOAP API changes?

Post by jojo » 17 Oct 2018, 11:45

Depricated means that it will be unavailable from OTRS 7 on.

In OTRS 6 where huge API changes, so your script has to be changed
"Production": 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 :: Share your ideas

artgrohe
OTRS newbie
Posts: 5
Joined: 16 Oct 2018, 13:15
OTRS Version?: 3.x - 6.x

Re: 6.0.11 CE / SOAP API changes?

Post by artgrohe » 17 Oct 2018, 13:51

ok, thanks

riyasathe
OTRS newbie
Posts: 1
Joined: 23 Mar 2019, 07:48
OTRS Version?: 4.0.13
Contact:

Re: 6.0.11 CE / SOAP API changes?

Post by riyasathe » 23 Mar 2019, 08:55

Excellent thread. I got useful information. Thank you!

tocnaza
OTRS newbie
Posts: 1
Joined: 08 Apr 2019, 18:11
OTRS Version?: OTRS 7

Re: 6.0.11 CE / SOAP API changes?

Post by tocnaza » 09 Apr 2019, 08:57

Ok, thanks for the info.

Post Reply