-
systools.urlencode & httpgetclob
Hallo Zusammen.
Für einen Webservice soll eine Adresse eingelesen und verarbeitet werden.
Leider funktioniert das Ganze nicht wie gewünscht.
dcl-s
dcl-s tmpAddress1 VARCHAR(150);
dcl-s tmpAddress2 VARCHAR(150);
tmpAddress1 ='Schmalholzstraße 27, 86916 Kaufering';
EXEC SQL values systools.urlencode(:tmpAddress1,'UTF-8') INTO :tmpAddress2;
Damit soll dann die Google- API aufgerufen werden:
EXEC SQL DECLARE CUR01 SCROLL CURSOR FOR
select *
from XMLTABLE ('$d/GeocodeResponse/result/geometry/location'
passing xmlparse(document(
systools.httpgetclob(
'https://maps.googleapis.com/maps/api/geocode/xml?key=' concat
'GOOGLEKEY&address=' concat
:tmpAddress2 concat
'&components=countryE','' ))) as "d"
COLUMNS
lat decimal(15, 7) PATH 'lat',
lng decimal(15, 7) PATH 'lng'
) ;
EXEC SQL OPEN CUR01;
EXEC SQL FETCH FIRST FROM CUR01 INTO :tmpLat, :tmpLng ;
EXEC SQL CLOSE CUR01;
DSPLY (%char(tmpLat));
Was mache ich falsch ?
Gruß
Similar Threads
-
By dschroeder in forum NEWSboard Programmierung
Antworten: 25
Letzter Beitrag: 14-02-18, 11:11
-
By Bratmaxxe in forum NEWSboard Programmierung
Antworten: 15
Letzter Beitrag: 21-12-17, 08:29
-
By dschroeder in forum NEWSboard Programmierung
Antworten: 3
Letzter Beitrag: 05-10-17, 12:00
-
By KM in forum IBM i Hauptforum
Antworten: 4
Letzter Beitrag: 25-04-17, 09:44
-
By rischer in forum IBM i Hauptforum
Antworten: 28
Letzter Beitrag: 02-10-15, 11:36
Berechtigungen
- Neue Themen erstellen: Nein
- Themen beantworten: Nein
- You may not post attachments
- You may not edit your posts
-
Foren-Regeln
|
Erweiterte Foren Suche
Google Foren Suche
Forum & Artikel Update eMail
AS/400 / IBM i
Server Expert Gruppen
Unternehmens IT
|
Kategorien online Artikel
- Big Data, Analytics, BI, MIS
- Cloud, Social Media, Devices
- DMS, Archivierung, Druck
- ERP + Add-ons, Business Software
- Hochverfügbarkeit
- Human Resources, Personal
- IBM Announcements
- IT-Karikaturen
- Leitartikel
- Load`n`go
- Messen, Veranstaltungen
- NEWSolutions Dossiers
- Programmierung
- Security
- Software Development + Change Mgmt.
- Solutions & Provider
- Speicher – Storage
- Strategische Berichte
- Systemmanagement
- Tools, Hot-Tips
Auf dem Laufenden bleiben
|
Bookmarks