This is the XML-RPC call in JavaScript:
function getUsers() {
$.xmlrpc({
url: '
http://localhost:8095/mytest',
methodName: 'GetData',
params: [{Table: 'BrechbuhlerUser'}],
success: function(response, status, jqXHR) { document.getElementById("theResponse").innerHTML = response; },
error: function(jqXHR, status, error) { document.getElementById("theResponse").innerHTML = error; }
});
The URL is absolute -
http://localhost:8095/mytestHere's what I get when I request the web page by opening the browser and entering
http://localhost:8095/localhost:8095/
Host: localhost:8095
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
COOKIE: ScaleDealer_DetailView_Main_Tabs=1; SupportTicket_DetailView_Main_SizeableEditors_Item2=0; Branch_DetailView_Main_Tabs=0
localhost:8095/jquery-1.9.1.min.js
Host: localhost:8095
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Accept: */*
Referer:
http://localhost:8095/Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
COOKIE: ScaleDealer_DetailView_Main_Tabs=1; SupportTicket_DetailView_Main_SizeableEditors_Item2=0; Branch_DetailView_Main_Tabs=0
localhost:8095/jquery.xmlrpc.js
Host: localhost:8095
Connection: keep-alive
Cache-Control: max-age=0
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Accept: */*
Referer:
http://localhost:8095/Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
COOKIE: ScaleDealer_DetailView_Main_Tabs=1; SupportTicket_DetailView_Main_SizeableEditors_Item2=0; Branch_DetailView_Main_Tabs=0
localhost:8095/favicon.ico
Host: localhost:8095
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Accept: */*
Referer:
http://localhost:8095/Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
COOKIE: ScaleDealer_DetailView_Main_Tabs=1; SupportTicket_DetailView_Main_SizeableEditors_Item2=0; Branch_DetailView_Main_Tabs=0
localhost:8095/favicon.ico
Host: localhost:8095
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Accept: */*
Referer:
http://localhost:8095/Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
COOKIE: ScaleDealer_DetailView_Main_Tabs=1; SupportTicket_DetailView_Main_SizeableEditors_Item2=0; Branch_DetailView_Main_Tabs=0
localhost:8095/favicon.ico
Host: localhost:8095
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Accept: */*
Referer:
http://localhost:8095/Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
COOKIE: ScaleDealer_DetailView_Main_Tabs=1; SupportTicket_DetailView_Main_SizeableEditors_Item2=0; Branch_DetailView_Main_Tabs=0
localhost:8095/favicon.ico
Host: localhost:8095
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Accept: */*
Referer:
http://localhost:8095/Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
COOKIE: ScaleDealer_DetailView_Main_Tabs=1; SupportTicket_DetailView_Main_SizeableEditors_Item2=0; Branch_DetailView_Main_Tabs=0
This is what I get when I make the XML-RPC call when I enter "
http://localhost:8095" in Chrome, which works properly...
localhost:8095/mytest
Host: localhost:8095
Connection: keep-alive
Content-Length: 194
Accept: application/xml, text/xml, */*; q=0.01
Origin:
http://localhost:8095X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Content-Type: text/xml
Referer:
http://localhost:8095/Accept-Encoding: gzip, deflate
Accept-Language: en-US,en;q=0.8
COOKIE: ScaleDealer_DetailView_Main_Tabs=1; SupportTicket_DetailView_Main_SizeableEditors_Item2=0; Branch_DetailView_Main_Tabs=0
If I double click "index.html" to open the web page instead of fetching it from the RTC web server...
localhost:8095/mytest
Host: localhost:8095
Connection: keep-alive
Access-Control-Request-Method: POST
Origin: null
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.116 Safari/537.36
Access-Control-Request-Headers: content-type
Accept: */*
Accept-Encoding: gzip, deflate, sdch
Accept-Language: en-US,en;q=0.8
There is a difference, though why I don't know as I'm calling the same XML-RPC method whether I'm serving up the web page from RTC web server or double-clicking the index.html file.