-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
79 lines (64 loc) · 2.81 KB
/
test.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
<!DOCTYPE html>
<html>
<head>
<meta charset="ISO-8859-1">
<title>Test OpenApe.js</title>
<script src="openape.js"></script>
<script src="iso_24752_examples.js"></script>
<script>
let myApp = new Client("daniel", "ich");//,"http://localhost:4567");
setTimeout(
function () {
console.log("jetzt listen:");
myApp.getUserContextList((responseText) => {
console.log("public context list: " + responseText);
}, () => {
console.log("requesting public context lists failed");
}, "");
let userContext = iso_24752_examples.getExample1();
//myApp.createUserContext(userContext, function(responseText) {console.log("id: " + responseText);});
console.log("empty json");
myApp.createUserContext("{}", (responseText) => {
console.log("id: " + responseText);
}, null);
let simple = JSON.stringify(iso_24752_examples.getSimple());
console.log(simple);
myApp.createUserContext(simple, (responseText) => {
console.log("simple id: " + responseText);
}, () => {
console.log("fehler simple")
});
console.log("simple public");
let simplePublic = JSON.stringify(iso_24752_examples.getSimpleAsPublic());
console.log(simplePublic);
myApp.createUserContext(simplePublic, (responseText) => {
console.log("id: " + responseText);
}, null, "");
let xml = iso_24752_examples.getXml();
/*
myApp.createUserContext(xml,function(responseText) {
console.log("id: " + responseText);
myApp.getUserContext(responseText, function(userContext){
console.log("got: " + JSON.stringify(userContext));
});
}, undefined, "application/xml");
var xmlPublic = openape_examples.getXmlPublicExample();
myApp.createUserContext(xmlPublic,function(responseText) {
console.log("id: " + responseText);
myApp.getUserContext(responseText, function(userContext){
console.log("got: " + JSON.stringify(userContext));
});
}, undefined, "application/xml");
*/
let list;
myApp.getUserContextList((responseText) => {
console.log("list:" + responseText);
}, (responseText) => {
console.log("error getting user context list:" + responseText);
}, "");
}, 1);
</script>
</head>
<body>
</body>
</html>