Fehler beim Ausführen des Scripts rpc-example.pl

Hilfe zu Znuny Problemen aller Art
Locked
Lehugo
Znuny newbie
Posts: 6
Joined: 01 Nov 2011, 15:25
Znuny Version: 3.0

Fehler beim Ausführen des Scripts rpc-example.pl

Post by Lehugo »

Hallo,

habe den Script unverändert auf dem OTRS Server ausgeführt und bekommt folgende Fehlermeldung:
###########################################
C:\temp>perl rpc-example.pl
NOTICE: TicketObject->TicketCreateNumber()
Use of uninitialized value in concatenation (.) or string at rpc-example.pl line 37.
NOTICE: New Ticket Number is:
NOTICE: TicketObject->TicketGet(TicketID => 1)
Use of uninitialized value in concatenation (.) or string at rpc-example.pl line 42.
NOTICE: Ticket Number is:
Use of uninitialized value in concatenation (.) or string at rpc-example.pl line 43.
NOTICE: Ticket State is:
Use of uninitialized value in concatenation (.) or string at rpc-example.pl line 44.
NOTICE: Ticket Queue is:
NOTICE: TicketObject->TicketCreate(%TicketData)
Failed to create ticket: at rpc-example.pl line 60.
########################################

Soapuser und Passwort sind nicht verändert.
OTRS Version ist 3.0.10 auf Windows 2003 SErver

Hat jemand eine Idee bezüglich der Fehlermeldung.

Danke im voraus
Lehugo
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Fehler beim Ausführen des Scripts rpc-example.pl

Post by jojo »

hast Du das script entsprechend der Einstellungen Deines Systems angepasst? Hast Du in Deinem System einen SOAP User und Passwort eingetragen?
"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
Lehugo
Znuny newbie
Posts: 6
Joined: 01 Nov 2011, 15:25
Znuny Version: 3.0

Re: Fehler beim Ausführen des Scripts rpc-example.pl

Post by Lehugo »

Soap-User (some_user) und Password (some_pass) sind unverändert und sind identisch wie in der file framework.xml.

Gruß
Lehugo
Lehugo
Znuny newbie
Posts: 6
Joined: 01 Nov 2011, 15:25
Znuny Version: 3.0

Re: Fehler beim Ausführen des Scripts rpc-example.pl

Post by Lehugo »

Trotzdem habe ich in otrs.log folgende Fehlermeldung:

[Wed Nov 2 16:08:52 2011][Notice][Core::Dispatch] SOAP::User or SOAP::Password is empty, SOAP access denied!
[Wed Nov 2 16:08:52 2011][Notice][Core::Dispatch] SOAP::User or SOAP::Password is empty, SOAP access denied!

im Skript
.
.
my $User = 'some_user';
my $Pw = 'some_pass';

my $RPC = Core->new();
.

im framework.xml

<ConfigItem Name="SOAP::User" Required="0" Valid="0" ConfigLevel="200">
<Description Translatable="1">Defines the username to access the SOAP handle (bin/cgi-bin/rpc.pl).</Description>
<Group>Framework</Group>
<SubGroup>Core::SOAP</SubGroup>
<Setting>
<String Regex="">some_user</String>
</Setting>
</ConfigItem>
<ConfigItem Name="SOAP::Password" Required="0" Valid="0" ConfigLevel="200">
<Description Translatable="1">Defines the password to access the SOAP handle (bin/cgi-bin/rpc.pl).</Description>
<Group>Framework</Group>
<SubGroup>Core::SOAP</SubGroup>
<Setting>
<String Regex="" Type="Password">some_pass</String>
</Setting>
</ConfigItem>
Lehugo
Znuny newbie
Posts: 6
Joined: 01 Nov 2011, 15:25
Znuny Version: 3.0

Re: Fehler beim Ausführen des Scripts rpc-example.pl

Post by Lehugo »

Der Fehler war in der rpc.pl !

nach dem ich den User und Password gesetzt habe, funktioniert die Schnittstelle.
#####################
#my $RequiredUser = $CommonObject{ConfigObject}->Get('SOAP::User');
#my $RequiredPassword = $CommonObject{ConfigObject}->Get('SOAP::Password');

my $RequiredUser = "some_user";
my $RequiredPassword = "some_pass";

#####################
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Fehler beim Ausführen des Scripts rpc-example.pl

Post by jojo »

Nein, die rpc.pl solltest Du nicht editieren, sondern einen anderen Benutzernamen und Passwort via Sysconfig setzen.

rpc.pl ist ein Programmteil, das dementsprechnd nicht angepasst werden sollte
"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
Lehugo
Znuny newbie
Posts: 6
Joined: 01 Nov 2011, 15:25
Znuny Version: 3.0

Re: Fehler beim Ausführen des Scripts rpc-example.pl

Post by Lehugo »

Danke jojo,

habe mit Sysconfig den User geändert. Ticket wurde angelegt!

Habe jedoch noch Fehler beim Article von Ticket

folgende Fehlermeldung bekomme ich, wenn ich auf den angelegten Ticket klicke.
--------------------------------------------------------------
$("#FixedTable tbody tr.Active").offset() is null

(?)([object Object])@http://svm0111/otrs-web/js/js-cache/Mod ... f2f3.js:97
(?)()@http://svm0111/otrs/index.pl?Action=Age ... tID=18:576
Ready((function (j, s) {return new b.fn.init(j, s);}))@http://svm0111/otrs-web/js/js-cache/Com ... c1f.js:582
trigger()@http://svm0111/otrs-web/js/js-cache/Com ... 6c1f.js:37
trigger([object Event])@http://svm0111/otrs-web/js/js-cache/Com ... 6c1f.js:37
--------------------------------------------------------------

Anscheinend sind die Attributen von Artickel nicht richtig:

#################################################

my $ArticleID =$RPC->Dispatch($User, $Pw, 'TicketObject', 'ArticleSend',
TicketID => $TicketId,
ArticleType => 'phone', # email-external|email-internal|phone|fax|...
SenderType => 'customer', # agent|system|customer
From => 'Soap Interface', # not required but useful
To => 'customer', # not required but useful
Subject => 'Test Ticket', # required
Body => 'Test Body', # required
ContentType => 'text/plain; charset=ISO-8859-1',
MessageID => 'test', # not required but useful
Charset => 'ISO-8859-1',
HistoryType => 'EmailCustomer', # EmailCustomer|Move|AddNote|PriorityUpdate|WebRequestCustomer|...
HistoryComment => 'Some free text!',
UserID => 1,
Loop => 0,

#################################################

Hast du eine Idee, wo hier der Fehler ist ? Oder gibt es eine Doku vom rpc.pl Interface ??

Gruß
Lehugo
Lehugo
Znuny newbie
Posts: 6
Joined: 01 Nov 2011, 15:25
Znuny Version: 3.0

Re: Fehler beim Ausführen des Scripts rpc-example.pl

Post by Lehugo »

Habe im Forum schon die Lösung gefunden.

Danke
Lehugo
Locked