how to use rpc/soap interface

Moderator: crythias

Locked
krzak
Znuny newbie
Posts: 1
Joined: 24 Sep 2012, 11:39
Znuny Version: 3.1.7
Real Name: Marcin

how to use rpc/soap interface

Post by krzak »

Hi,

I stuck with RCP/SOAP interface. How it should be used? I cant figure out what is difference between "rpc.pl" or "nph-genericinterface.pl". Non of them is working for me anyway:

this is how I'm trying to connect at the moment:

Code: Select all

my $RPC = new SOAP::Lite( proxy => 'http://my-host/otrs/nph-genericinterface.pl/Webservice/webservice', uri => 'http://www.otrs.org/TicketConnector/' );
print "NOTICE: TicketObject->TicketGet(TicketID => 1653)\n";
my $som = $RPC->Dispatch( $User, $Pw, 'TicketObject', 'TicketGet', TicketID => '1653' );
die $som->fault->{faultstring} if $som->fault;
print $som->result;
so I get "Got no OperationType" error message.

I tried (based on rpc-example.pl:

Code: Select all

my $RPC = new SOAP::Lite( proxy => 'http://my-host/otrs/rpc.pl', uri => 'http://localhost/Core' );
print "NOTICE: TicketObject->TicketGet(TicketID => 1653)\n";
my $som = $RPC->Dispatch( $User, $Pw, 'TicketObject', 'TicketGet',TicketID => '1653' );
die $som->fault->{faultstring} if $som->fault;
print $som->result;
but no luck, result is empty, while Ticket exists for sure.

What I'm doing wrong?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: how to use rpc/soap interface

Post by jojo »

The rpc.pl is the old fashioned one. It directly gives you access to OTRS Ticket API.

The other one is the Generic Interface, please read admin and development manual topics on this first
"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
Locked