cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r595254 - in /incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding: ./ src/demo/restful/server/
Date Thu, 15 Nov 2007 09:27:39 GMT
Author: jliu
Date: Thu Nov 15 01:27:38 2007
New Revision: 595254

URL: http://svn.apache.org/viewvc?rev=595254&view=rev
Log:
Fixed a few namespace problems. Unfortunately, have not figured out how to fix the java script
stuff(http://localhost:8080/test.html), anyone who is more familiar with java script than
me? (function addCustomer(c) has been invoked successfully, but the table somehow did not
get updated.)

Modified:
    incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.json
    incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.xml
    incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java
    incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java
    incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java
    incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/test.html
    incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/update.xml

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.json
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.json?rev=595254&r1=595253&r2=595254&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.json
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.json
Thu Nov 15 01:27:38 2007
@@ -1,6 +1,6 @@
 { 
   "acme.Customer" : {
-    "acme.name" : "Jim Bob"
+    "acme.name" : "Jim"
   }
 }
     

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.xml?rev=595254&r1=595253&r2=595254&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.xml
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/add.xml
Thu Nov 15 01:27:38 2007
@@ -1,4 +1,4 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<customer xmlns="http://server.restful.demo">
-<name>Jim Bob</name>
+<customer xmlns="http://demo.restful.server">
+<name>Jim</name>
 </customer>

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java?rev=595254&r1=595253&r2=595254&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java
Thu Nov 15 01:27:38 2007
@@ -28,7 +28,7 @@
 import org.codehaus.jra.Post;
 import org.codehaus.jra.Put;
 
-@WebService(targetNamespace = "http://customer.acme.com")
+@WebService(targetNamespace = "http://demo.restful.server")
 public interface CustomerService {
 
     @Get

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java?rev=595254&r1=595253&r2=595254&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java
Thu Nov 15 01:27:38 2007
@@ -24,7 +24,7 @@
 import javax.jws.WebService;
 
 // END SNIPPET: service
-@WebService(endpointInterface = "com.acme.customer.CustomerService")
+@WebService(endpointInterface = "demo.restful.server.CustomerService")
 public class CustomerServiceImpl implements CustomerService {
     long currentId = 1;
     Map<Long, Customer> customers = new HashMap<Long, Customer>();

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java?rev=595254&r1=595253&r2=595254&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java
Thu Nov 15 01:27:38 2007
@@ -109,7 +109,7 @@
 
         // Set up the JSON StAX implementation
         Map<String, String> nstojns = new HashMap<String, String>();
-        nstojns.put("http://customer.acme.com", "acme");
+        nstojns.put("http://demo.restful.server", "acme");
 
         MappedXMLInputFactory xif = new MappedXMLInputFactory(nstojns);
         properties.put(XMLInputFactory.class.getName(), xif);

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/test.html
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/test.html?rev=595254&r1=595253&r2=595254&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/test.html
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/test.html
Thu Nov 15 01:27:38 2007
@@ -32,13 +32,13 @@
 	} else {
 	  alert('Perhaps your browser does not support xmlhttprequests?');
 	}
-	
+
 	xmlhttp.onreadystatechange = function() {
 	  if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
 	    var res = '(' + xmlhttp.responseText + ')';
 	    var customers = eval(res);
-	    customers = customers['acme.customers'];
-	    
+	    customers = customers['acme.Customers'];
+
 	    var customer = customers['acme.customer'];
 		if (customer.length) {
 		  for (var i = 0; i < customer.length; i++) {
@@ -46,20 +46,20 @@
 		  }
 		} else {
 		  addCustomer(customer);
-		  
+
         }
 	  } else {
 	    // wait for the call to complete
 	  }
 	};
-	
+
 	xmlhttp.open('GET', "http://localhost:8080/json/customers", true);
     xmlhttp.send(null);
 }
 
 function addCustomer(c) {
   var t = document.getElementById('customertable');
-  
+
   var tr = document.createElement("tr");
   var td = document.createElement("td");
   var id = document.createTextNode(c['acme.id']);
@@ -76,7 +76,7 @@
  <body>
    <h1>Jettison/CXF AJAX Demo</h1>
    <p>
-     The button below will go and hit the URL 
+     The button below will go and hit the URL
      <a href="http://localhost:8080/json/customers">http://localhost:8080/json/customers</a>
      and list the customers below in a table.
    <p>
@@ -86,7 +86,7 @@
    <p>
      <h1>Customers</h1>
      <!-- Yes, this is using a table because I'm incompotent with HTML! -->
-     <table style="border: 1px black solid;" cellspacing="5" id="customertable>
+     <table style="border: 1px black solid;" cellspacing="5" id="customertable">
        <tr>
          <th><strong>ID</strong></th>
          <th><strong>Customer Name</strong></th>

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/update.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/update.xml?rev=595254&r1=595253&r2=595254&view=diff
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/update.xml
(original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/restful_http_binding/update.xml
Thu Nov 15 01:27:38 2007
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<customer xmlns="http://server.restful.demo">
+<customer xmlns="http://demo.restful.server">
 <id>123</id>
 <name>Danno</name>
 </customer>



Mime
View raw message