SMS aus SAP mit sipgate (ABAP & XMLRPC)

Alles rund um die Sprache ABAP®: Funktionsbausteine, Listen, ALV
2 Beiträge • Seite 1 von 1
2 Beiträge Seite 1 von 1

SMS aus SAP mit sipgate (ABAP & XMLRPC)

Beitrag von vagans (ForumUser / 6 / 0 / 0 ) »
hallo zusammen!

ich war so frei mich einfach mal hier anzumelden und um rat zu fragen bei einem kleinen problem!

ich soll einen smsversand aus unserem sap system mit hilfe von sipgate realisieren.
auf der sipgate page ist eine api vorhanden mit beispielen in perl, leider komme ich damit nicht sehr weit:

Code: Alles auswählen.

#!/usr/bin/perl -w
#
# Sam Buca, indigo networks GmbH, 08/2007
#
# This script is a very basic perl-client to the SAMURAI service 
# provided by sipgate (indigo networks GmbH) without any claim to 
# completeness and without any warranty!
#
# The following code shows how to use the service to send messages 
# via SMS using a sipgate account.
#

use strict;
use Frontier::Client;	# needed for XMLRPC

# declare some variables for later use:
my $VERSION = "1.0";
my $NAME	= "sipgateAPI-sms.pl";
my $VENDOR	= "indigo networks GmbH";
my $url;
my $xmlrpc_client;
my $xmlrpc_result;
my $args_identify;
my $args;

# check the count of commandline parameters and show usage information 
# if not matching:
unless (@ARGV == 4) {
	print "\n";
	print "This script needs 4 parameters supplied on the commandline:\n";
	print "\n";
	print "parameter 1 -> the username (not SIPID) used to login to sipgate\n";
	print "parameter 2 -> the password associated with the username\n";
	print "parameter 3 -> the number to send the message to\n";
	print "               (with national prefix, e.g. 4917xxxxxxxxx)\n";
	print "parameter 4 -> the message to send quoted in \" or \'\n";
	print "\n";

	exit 0;
}

# define URL for XMLRPC:

$url = "https://$ARGV[0]:$ARGV[1]\@samurai.sipgate.net/RPC2";

# create an instance of the XMLRPC-Client:

$xmlrpc_client = Frontier::Client->new( 'url' => $url );

# identify the script to the server calling XMLRPC-method "samurai.ClientIdentify"
# providing client-name, -version and -vendor:

$args_identify = { ClientName => $NAME, ClientVersion => $VERSION, ClientVendor => $VENDOR };

$xmlrpc_result = $xmlrpc_client->call( "samurai.ClientIdentify", $args_identify );

# the check for success is not necessary in this case since the Frontier::Client module 
# dies with an exception in case of a fault, but we do it for completeness:

if ($xmlrpc_result->{'StatusCode'} == 200) {
    print "Successfully identified to the server!\n";
} else {
	# we should never get here!
	print "There was an error during identification to the server!\n";
}

# create the input argument set for XMLRPC:

$args = { RemoteUri => "sip:$ARGV[2]\@sipgate.net", TOS => "text", Content => $ARGV[3] };

# do the call and store the result / answer to $xmlrpc_result:

$xmlrpc_result = $xmlrpc_client->call( "samurai.SessionInitiate", $args );

# again we do the check on success for completeness:

if ($xmlrpc_result->{'StatusCode'} == 200) {
    print "Your request was successfully send to the server!\n";
} else {
	# we should never get here!
	print "There was an error!\n";
}
den anfang mit dem prüfen auf richtige anzahl von parametern spare ich mir, weil ich das soweit verstehe, bzw im moment nicht brauche.

die url kriege ich soweit auch hin (einfach user und passwort mit der restlichen url in concatenate, oder?)

mein erstes problem stellt sich mir nun bei dem punkt

Code: Alles auswählen.

# create an instance OF the XMLRPC-CLIENT:

$xmlrpc_client = Frontier::Client->new( 'url' => $url );
was genau wird hier gemacht? es wird eine instanz für xmlrpc erstellt.
was ist denn die varibale $xmlrpc_client - einfach ein objekt?
es wird also eine neue url erstellt mit dem wert aus $url und in $xmlrpc_client gepackt?

wenn mir das jemand erklären könnte, wäre mir wohl schon ganz gut geholfen!

schonmal vielen dank im voraus!

gesponsert
Stellenangebote auf ABAPforum.com schalten
kostenfrei für Ausbildungsberufe und Werksstudenten


Re: SMS aus SAP mit sipgate (ABAP & XMLRPC)

Beitrag von RockyAM (ForumUser / 30 / 0 / 7 ) »
Müsste eigentlich über SAP-Connect schon möglich sein.

Da reicht denke ich nur ne Konfiguration.

siehe hier: http://sappandit.wordpress.com/2009/05/ ... n-for-sms/

Seite 1 von 1

Vergleichbare Themen

3
Antw.
11348
Views
OLE und ABAP: Aufruf von Excel-VBA Prozeduren aus ABAP
von OnkelSAP » 26.05.2010 09:45 • Verfasst in ABAP Objects®
3
Antw.
45773
Views
ABAP 7.02 - Neues Feature - Pragmas in ABAP
von foessleitnerj » 09.01.2013 17:02 • Verfasst in Tips + Tricks & FAQs
6
Antw.
14076
Views
ABAP Workbench und ABAP Dictionary - für Einsteiger
von schnonus » 03.04.2008 10:39 • Verfasst in ABAP® für Anfänger
3
Antw.
8586
Views
ABAP vs. ABAP Objects
von Mr.Black » 11.07.2007 14:27 • Verfasst in ABAP Objects®
0
Antw.
10365
Views
&KEY& in SAP ABAP
von tekko » 30.03.2020 14:45 • Verfasst in ABAP® für Anfänger

Über diesen Beitrag


Unterstütze die Community und teile den Beitrag für mehr Leser und Austausch

Newsletter Anmeldung

Keine Beiträge verpassen! Wöchentlich versenden wir lesenwerte Beiträge aus unserer Community.
Die letzte Ausgabe findest du hier.
Details zum Versandverfahren und zu Ihren Widerrufsmöglichkeiten findest du in unserer Datenschutzerklärung.