6.0.11 CE / SOAP API changes?

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

6.0.11 CE / SOAP API changes?

Post by artgrohe »

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
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: 6.0.11 CE / SOAP API changes?

Post by jojo »

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™ 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
artgrohe
Znuny newbie
Posts: 5
Joined: 16 Oct 2018, 13:15
Znuny Version: 3.x - 6.x

Re: 6.0.11 CE / SOAP API changes?

Post by artgrohe »

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
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: 6.0.11 CE / SOAP API changes?

Post by jojo »

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™ 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
artgrohe
Znuny newbie
Posts: 5
Joined: 16 Oct 2018, 13:15
Znuny Version: 3.x - 6.x

Re: 6.0.11 CE / SOAP API changes?

Post by artgrohe »

ok, thanks
riyasathe
Znuny newbie
Posts: 1
Joined: 23 Mar 2019, 07:48
Znuny Version: 4.0.13
Contact:

Re: 6.0.11 CE / SOAP API changes?

Post by riyasathe »

Excellent thread. I got useful information. Thank you!
tocnaza
Znuny newbie
Posts: 1
Joined: 08 Apr 2019, 18:11
Znuny Version: OTRS 7

Re: 6.0.11 CE / SOAP API changes?

Post by tocnaza »

Ok, thanks for the info.
Post Reply