Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-xmlrpc
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-xmlrpc
Commits
a7f922e3
Commit
a7f922e3
authored
Aug 08, 2006
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- added dummy files for call test
parent
679864f1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
139 additions
and
0 deletions
+139
-0
call-test-2.adp
www/call-test-2.adp
+61
-0
call-test-2.tcl
www/call-test-2.tcl
+78
-0
No files found.
www/call-test-2.adp
0 → 100644
View file @
a7f922e3
<master>
<property name="title">@page_title@</property>
<property name="main_navbar_label">admin</property>
<h1>@page_title@</h1>
<form action="call-test-4" method=POST>
<%= [export_form_vars url token timestamp user_id object_type] %>
<table cellpadding=2 cellspacing=0 border=0>
<tr class=roweven>
<td valign=top>URL:</td>
<td>@url@</td>
</tr>
<tr class=rowodd>
<td valign=top>User ID:</td>
<td>@user_id@</td>
</tr>
<tr class=roweven>
<td valign=top>Timestamp:</td>
<td>@timestamp@</td>
</tr>
<tr class=rowodd>
<td valign=top>Token:</td>
<td>@token@</td>
</tr>
<tr class=roweven>
<td valign=top>Object Type:</td>
<td><input type=text name=object_type value="@object_type@" size=20 disabled></td>
</tr>
<!--
<tr class=rowodd>
<td valign=top>Object ID:</td>
<td>
<select name=object_id>
@object_id_options;noquote@
</select>
</td>
</tr>
<tr>
<td></td>
<td><input type=submit></td>
</tr>
-->
</table>
</form>
<h2>Not implemented yet</h2>
The call function (creating and deleting objects) have not been implemented yet.
www/call-test-2.tcl
0 → 100644
View file @
a7f922e3
ad_page_contract
{
Autenticate the user and issue an auth-token
that needs to be specified for every xmlrpc-request
@author Frank Bergmann
(
frank.bergmann@project-open.com
)
}
{
user_id
timestamp
token
object_type
{
url
"/RPC2/"
}
{
method
"sqlapi.call"
}
}
# ------------------------------------------------------------
# Security & Defaults
# ------------------------------------------------------------
set
return_url
"
[
ad_conn url
]
?
[
ad_conn query
]
"
set
page_title
"Call-Test-2"
set
context_bar
[
im_context_bar
$page
_title
]
set
current_user_id
[
im_xmlrpc_get_user_id
]
# ------------------------------------------------------------
#
# ------------------------------------------------------------
set
error
""
set
result
""
set
info
""
set
query_results
[
list
]
# Get the list of all objects of that type
if
{[
catch
{
set authinfo
[
list
\
[
list
-string token
]
\
[
list
-int
$user
_id
]
\
[
list
-string
$timestamp
]
\
[
list
-string
$token
]
\
]
set query_results
[
xmlrpc::remote_call
\
http://172.26.0.3:30038/RPC2
\
"sqlapi.call"
\
-array
$authinfo
\
-string
$object
_type
\
-array
[
list
[
list
-string foo
]
[
list
-string
"bar"
]]
]
}
err_msg
]}
{
append error
$err
_msg
}
set
status
[
lindex
$query
_results 0
]
set
object_id_options
[
list
]
if
{
"ok"
!=
$status
}
{
set error
"
$status
"
append error
[
lindex
$query
_results 1
]
}
else
{
set object_ids
[
lindex
$query
_results 1
]
foreach id
$object
_ids
{
set object_id
[
lindex
$id
0
]
set object_name
[
lindex
$id
1
]
append object_id_options
"<option value=
\"
$object
_id
\"
>
$object
_name</option>
\n
"
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment