SOAP not working - General Problem ?

English! place to talk about development, programming and coding
Post Reply
sebast
Znuny newbie
Posts: 8
Joined: 02 Jun 2010, 10:35
Znuny Version: 5.0.6
Real Name: Sebastian Freiberg

SOAP not working - General Problem ?

Post by sebast »

Hello,

the communication with my OTRS via SOAP is simply not possible.

When I execute the rpc-example.pl (adapted to my settings) the following error occurs:

Code: Select all

./rpc_example.pl 
NOTICE: TicketObject->TicketCreateNumber()
Can't call method "Dispatch" without a package or object reference at ./rpc_example.pl line 18.
I changed the code, to see the error, to:

Code: Select all

my $RPC = Core->new() || print "$@";

# create a new ticket number
print "NOTICE: TicketObject->TicketCreateNumber()\n";
my $TicketNumber = $RPC->Dispatch( $User, $Pw, 'TicketObject', 'TicketCreateNumber' );
Trying to use a PHP-Version of a client the following error occurs:

Code: Select all

php otrs_soap_ticket_my.php
PHP Fatal error:  Uncaught SoapFault exception: [soap:Client] Application failed during request deserialization: 
no element found at line 1, column 0, byte -1 at /usr/local/lib/perl5/site_perl/5.8.8/i86pc-solaris/XML/Parser.pm line 187
 in otrs_soap_ticket_my.php:20
Stack trace:
#0 otrs_soap_ticket_my.php(20): SoapClient->__soapCall('Dispatch', Array)
#1 {main}
  thrown in otrs_soap_ticket_my.php on line 20
Seems as if the SOAP-XML-Syntax is not quite right.

SOAP-Request:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="Core" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:Dispatch><TicketID xsi:type="xsd:string">1263</TicketID><TicketObject xsi:type="xsd:string">TicketNumberLookup</TicketObject></ns1:Dispatch></SOAP-ENV:Body></SOAP-ENV:Envelope>
The PHP-Client is the one explained here http://www.iniy.org/?p=20&lang=de

I use mod_perl in Apache Webserver, Perl 5.8.8 and the script otrs.CheckModules.pl says everything is fine.

Any help or comments appreciated.

Btw: The SOAP configuration in SysConfig was done ;-)
OTRS 5.0.6
Apache/2.4.7 (Ubuntu)
mod_perl/2.0.8
Perl/v5.18.2
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: SOAP not working - General Problem ?

Post by jojo »

please fill your signature with OTRS Version, OS and so on. It looks like a bug with the SOAP Perl Module or with mod_perl
"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
Dizzy
Znuny expert
Posts: 200
Joined: 12 Apr 2007, 14:30

Re: SOAP not working - General Problem ?

Post by Dizzy »

I have had the same problem with OTRS 2.4 :-)
I gues it has something to do with the SOAP-Lite package in your case, too.

Take a look here:
http://blog.otrs.org/2011/03/04/fixing- ... -for-otrs/

The latest SOAP-Lite Versions seem to be somehow incompatible with OTRS, I am using SOAP-Lite 0.69, this is fine :)
OTRS: 2.4.9 + ITSM 2.1.1 + CiCS 3.3.5
SLES 11
MySQL-Version: 5.1.49
sebast
Znuny newbie
Posts: 8
Joined: 02 Jun 2010, 10:35
Znuny Version: 5.0.6
Real Name: Sebastian Freiberg

Re: SOAP not working - General Problem ?

Post by sebast »

Thanks for your answers.

That's exactly what I thought. Therefore I installed the oldest version of SOAP::Lite I found in CPAN.

The latest verison is not supported, I know.
otrs.CheckModules.pl delivers that information if a newer version than supported is installed.

Maybe I try version 0.69.

Regards
OTRS 5.0.6
Apache/2.4.7 (Ubuntu)
mod_perl/2.0.8
Perl/v5.18.2
sebast
Znuny newbie
Posts: 8
Joined: 02 Jun 2010, 10:35
Znuny Version: 5.0.6
Real Name: Sebastian Freiberg

[Solved] SOAP not working - General Problem ?

Post by sebast »

There is a bug using SOAP-Lite in Solaris described here: https://rt.cpan.org/Public/Bug/Display.html?id=58538

You can use an opm providing a patched version of SOAP-Lite as described here: http://blog.otrs.org/2011/03/04/fixing- ... -for-otrs/

That solved my problem, SOAP for OTRS is now working.
OTRS 5.0.6
Apache/2.4.7 (Ubuntu)
mod_perl/2.0.8
Perl/v5.18.2
Post Reply