SOAP::LIte CustomerCompanyAdd does not work

English! place to talk about development, programming and coding
Post Reply
bapetc
Znuny newbie
Posts: 3
Joined: 29 Jun 2011, 16:46
Znuny Version: 3.0
Real Name: Bart Peeters
Company: Trimble

SOAP::LIte CustomerCompanyAdd does not work

Post by bapetc »

Hello,

I try to create a CustomerCompany via SOAP::Lite but I got an error from OTRS:

"No such Object CustomerCompanyObject!"
I want to create a new CustomerCompany, not to update or find.

Here you can find my code:

Code: Select all

my $CustomerCompanyId = $RPC_otrs->Dispatch(
$user_otrs, $pass_otrs, 'CustomerCompanyObject', 'CustomerCompanyAdd',
CustomerID => 'TEST_123',
CustomerCompanyName     => 'New Customer Company Inc.',
CustomerCompanyStreet   => '5201 Blue Lagoon Drive',
CustomerCompanyZIP      => '33126',
CustomerCompanyCity     => 'Miami',
CustomerCompanyCountry  => 'USA',
CustomerCompanyComment  => 'some comment',
ValidID                 => 1,
UserID                  => 1,
);

print "CustomerId:$CustomerCompanyId";
Any idea?
Version OTRS 3.0
I'm able to create tickets and customerusers via SOAP::Lite
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: SOAP::LIte CustomerCompanyAdd does not work

Post by jojo »

rpc.pl only nows these objects:

use Kernel::System::Encode;
use Kernel::System::Log;
use Kernel::System::DB;
use Kernel::System::PID;
use Kernel::System::Main;
use Kernel::System::Time;
use Kernel::System::User;
use Kernel::System::Group;
use Kernel::System::Queue;
use Kernel::System::CustomerUser;
use Kernel::System::Ticket;
use Kernel::System::LinkObject;


you can patch rpc.pl to include more
"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
bapetc
Znuny newbie
Posts: 3
Joined: 29 Jun 2011, 16:46
Znuny Version: 3.0
Real Name: Bart Peeters
Company: Trimble

Re: SOAP::LIte CustomerCompanyAdd does not work

Post by bapetc »

Thanks for the answer.
Where can I find an example of a patched rpc.pl?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: SOAP::LIte CustomerCompanyAdd does not work

Post by jojo »

there is no example for this. You should have some PERL experiences to do this
"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
bapetc
Znuny newbie
Posts: 3
Joined: 29 Jun 2011, 16:46
Znuny Version: 3.0
Real Name: Bart Peeters
Company: Trimble

Re: SOAP::LIte CustomerCompanyAdd does not work

Post by bapetc »

Thanks, I add those line and it works :-)

> use Kernel::System::CustomerCompany;
> $CommonObject{CustomerCompanyObject} = Kernel::System::CustomerCompany->new(%CommonObject);
Post Reply