Author: gnodet
Date: Sat Oct 7 09:33:22 2006
New Revision: 453958
URL: http://svn.apache.org/viewvc?view=rev&rev=453958
Log:
SM-599, SM-691: fix html client pages
Modified:
incubator/servicemix/branches/servicemix-3.0/samples/bridge/client.html
incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-basic.html
incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-ws-sec.html
incubator/servicemix/branches/servicemix-3.0/samples/wsdl-first/client.html
Modified:
incubator/servicemix/branches/servicemix-3.0/samples/bridge/client.html
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.0/samples/bridge/client.html?view=diff&rev=453958&r1=453957&r2=453958
==============================================================================
--- incubator/servicemix/branches/servicemix-3.0/samples/bridge/client.html
(original)
+++ incubator/servicemix/branches/servicemix-3.0/samples/bridge/client.html Sat
Oct 7 09:33:22 2006
@@ -19,8 +19,9 @@
<!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 dv©c. 2005) $
-->
<html>
<head>
-<title>ServiceMix SOAP Binding Example</title>
+<title>ServiceMix Bridge Example</title>
<script type="text/javascript">
+var urlToOpen = "http://localhost:8192/bridge/"; //default URL to open
function getHTTPObject() {
var xmlhttp = false;
@@ -55,7 +56,13 @@
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 4) { /* 4 : état "complete" */
var response = document.getElementById("response");
- response.value = "STATUS: " + xmlhttp.status + "\n" +
xmlhttp.responseText
+ var responseStatus = "";
+ try {
+ responseStatus = xmlhttp.status + "";
+ } catch (e) {
+ responseStatus = "ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO
CONNECT.";
+ }
+ response.value = "STATUS: " + responseStatus + "\n" +
xmlhttp.responseText;
}
}
}
@@ -63,18 +70,25 @@
}
function send() {
+ if ((document.getElementById("urlToOpen").value != urlToOpen) &&
(document.getElementById("urlToOpen").value != "")) {
+ //use user entry only if it at least can be okay
+ urlToOpen = document.getElementById("urlToOpen").value;
+ }
var xmlhttp = getHTTPObject();
if (!xmlhttp) {
alert('cound not create XMLHttpRequest object');
return;
}
var request = document.getElementById("request");
- var response = document.getElementById("response");
+ var response = document.getElementById("response");
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead
UniversalBrowserWrite");
- xmlhttp.open("POST", "http://localhost:8192/bridge/", true);
} catch (e) {
- alert('error opening');
+ }
+ try {
+ xmlhttp.open("POST", urlToOpen, true);
+ } catch (e) {
+ alert('Error opening connection');
}
xmlhttp.send(request.value);
}
@@ -84,11 +98,13 @@
<body>
-<h1>ServiceMix SOAP Binding Example</h1>
+<h1>ServiceMix Bridge Example</h1>
+
+<p>Welcome to the Bridge example for ServiceMix.</p>
-<p>Welcome to the soap binding example for ServiceMix</p>
+<p>Perform a POST into the HTTP binding. This requires JavaScript.</p>
+<p>Target: <input type="text" size="50" id="urlToOpen" value=""><script
type="text/javascript">document.getElementById("urlToOpen").value =
urlToOpen;</script>.</p>
-Perform a POST into the HTTP binding <p>
<table>
<tr>
Modified:
incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-basic.html
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-basic.html?view=diff&rev=453958&r1=453957&r2=453958
==============================================================================
---
incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-basic.html
(original)
+++
incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-basic.html
Sat Oct 7 09:33:22 2006
@@ -18,8 +18,9 @@
-->
<html>
<head>
-<title>ServiceMix SOAP Binding Example</title>
+<title>ServiceMix WS-Security Example</title>
<script type="text/javascript">
+var urlToOpen = "http://localhost:8192/Service/"; //default URL to open
function getHTTPObject() {
var xmlhttp = false;
@@ -54,7 +55,13 @@
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 4) { /* 4 : état "complete" */
var response = document.getElementById("response");
- response.value = "STATUS: " + xmlhttp.status + "\n" +
xmlhttp.responseText
+ var responseStatus = "";
+ try {
+ responseStatus = xmlhttp.status + "";
+ } catch (e) {
+ responseStatus = "ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO
CONNECT.";
+ }
+ response.value = "STATUS: " + responseStatus + "\n" +
xmlhttp.responseText;
}
}
}
@@ -71,7 +78,10 @@
var response = document.getElementById("response");
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead
UniversalBrowserWrite");
- xmlhttp.open("POST", "http://localhost:8192/Service/", true);
+ } catch (e) {
+ }
+ try {
+ xmlhttp.open("POST", urlToOpen, true);
} catch (e) {
alert('error opening');
}
@@ -83,11 +93,12 @@
<body>
-<h1>ServiceMix SOAP Binding Example</h1>
+<h1>ServiceMix WS-Security Example</h1>
-<p>Welcome to the soap binding example for ServiceMix</p>
+<p>Welcome to the WS-Security example for ServiceMix</p>
-Perform a POST into the HTTP binding <p>
+<p>Perform a POST into the HTTP binding. This requires JavaScript.</p>
+<p>Target: <input type="text" size="50" id="urlToOpen" value=""><script
type="text/javascript">document.getElementById("urlToOpen").value =
urlToOpen;</script>.</p>
<table>
<tr>
Modified:
incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-ws-sec.html
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-ws-sec.html?view=diff&rev=453958&r1=453957&r2=453958
==============================================================================
---
incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-ws-sec.html
(original)
+++
incubator/servicemix/branches/servicemix-3.0/samples/ws-sec/client-ws-sec.html
Sat Oct 7 09:33:22 2006
@@ -18,8 +18,9 @@
-->
<html>
<head>
-<title>ServiceMix SOAP Binding Example</title>
+<title>ServiceMix WS-Security Example</title>
<script type="text/javascript">
+var urlToOpen = "http://localhost:8192/WSSec/"; //default URL to open
function getHTTPObject() {
var xmlhttp = false;
@@ -54,7 +55,13 @@
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 4) { /* 4 : état "complete" */
var response = document.getElementById("response");
- response.value = "STATUS: " + xmlhttp.status + "\n" +
xmlhttp.responseText
+ var responseStatus = "";
+ try {
+ responseStatus = xmlhttp.status + "";
+ } catch (e) {
+ responseStatus = "ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO
CONNECT.";
+ }
+ response.value = "STATUS: " + responseStatus + "\n" +
xmlhttp.responseText;
}
}
}
@@ -71,7 +78,10 @@
var response = document.getElementById("response");
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead
UniversalBrowserWrite");
- xmlhttp.open("POST", "http://localhost:8192/WSSec/", true);
+ } catch (e) {
+ }
+ try {
+ xmlhttp.open("POST", urlToOpen, true);
} catch (e) {
alert('error opening');
}
@@ -83,11 +93,12 @@
<body>
-<h1>ServiceMix SOAP Binding Example</h1>
+<h1>ServiceMix WS-Security Example</h1>
-<p>Welcome to the soap binding example for ServiceMix</p>
+<p>Welcome to the WS-Security example for ServiceMix</p>
-Perform a POST into the HTTP binding <p>
+<p>Perform a POST into the HTTP binding. This requires JavaScript.</p>
+<p>Target: <input type="text" size="50" id="urlToOpen" value=""><script
type="text/javascript">document.getElementById("urlToOpen").value =
urlToOpen;</script>.</p>
<table>
<tr>
Modified:
incubator/servicemix/branches/servicemix-3.0/samples/wsdl-first/client.html
URL:
http://svn.apache.org/viewvc/incubator/servicemix/branches/servicemix-3.0/samples/wsdl-first/client.html?view=diff&rev=453958&r1=453957&r2=453958
==============================================================================
--- incubator/servicemix/branches/servicemix-3.0/samples/wsdl-first/client.html
(original)
+++ incubator/servicemix/branches/servicemix-3.0/samples/wsdl-first/client.html
Sat Oct 7 09:33:22 2006
@@ -19,8 +19,9 @@
<!-- $Rev: 356052 $ $Date: 2005-12-11 14:41:20 -0800 (dim., 11 dv©c. 2005) $
-->
<html>
<head>
-<title>ServiceMix SOAP Binding Example</title>
+<title>ServiceMix WSDL-First Example</title>
<script type="text/javascript">
+var urlToOpen = "http://localhost:8192/PersonService/"; //default URL to open
function getHTTPObject() {
var xmlhttp = false;
@@ -55,7 +56,13 @@
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState == 4) { /* 4 : état "complete" */
var response = document.getElementById("response");
- response.value = "STATUS: " + xmlhttp.status + "\n" +
xmlhttp.responseText
+ var responseStatus = "";
+ try {
+ responseStatus = xmlhttp.status + "";
+ } catch (e) {
+ responseStatus = "ERROR WHILE RETRIEVING STATUS; MAYBE UNABLE TO
CONNECT.";
+ }
+ response.value = "STATUS: " + responseStatus + "\n" +
xmlhttp.responseText;
}
}
}
@@ -63,6 +70,10 @@
}
function send() {
+ if ((document.getElementById("urlToOpen").value != urlToOpen) &&
(document.getElementById("urlToOpen").value != "")) {
+ //use user entry only if it at least can be okay
+ urlToOpen = document.getElementById("urlToOpen").value;
+ }
var xmlhttp = getHTTPObject();
if (!xmlhttp) {
alert('cound not create XMLHttpRequest object');
@@ -72,7 +83,10 @@
var response = document.getElementById("response");
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead
UniversalBrowserWrite");
- xmlhttp.open("POST", "http://localhost:8192/PersonService/", true);
+ } catch (e) {
+ }
+ try {
+ xmlhttp.open("POST", urlToOpen, true);
} catch (e) {
alert('error opening');
}
@@ -84,12 +98,13 @@
<body>
-<h1>ServiceMix SOAP Binding Example</h1>
-
-<p>Welcome to the soap binding example for ServiceMix</p>
+<h1>ServiceMix WSDL-First Example</h1>
-Perform a POST into the HTTP binding <p>
+<p>Welcome to the WSDL-First example for ServiceMix</p>
+<p>Perform a POST into the HTTP binding. This requires JavaScript.</p>
+<p>Target: <input type="text" size="50" id="urlToOpen" value=""><script
type="text/javascript">document.getElementById("urlToOpen").value =
urlToOpen;</script>.</p>
+
<table>
<tr>
<td>