You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2007/11/15 18:08:59 UTC

svn commit: r595362 - in /incubator/cxf/branches/2.0.x-fixes: ./ distribution/src/main/release/samples/restful_http_binding/ distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/

Author: dkulp
Date: Thu Nov 15 09:08:56 2007
New Revision: 595362

URL: http://svn.apache.org/viewvc?rev=595362&view=rev
Log:
Merged revisions 595254 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r595254 | jliu | 2007-11-15 04:27:38 -0500 (Thu, 15 Nov 2007) | 1 line
  
  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/branches/2.0.x-fixes/   (props changed)
    incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.json
    incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.xml
    incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java
    incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java
    incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java
    incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/test.html
    incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/update.xml

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.json
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.json?rev=595362&r1=595361&r2=595362&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.json (original)
+++ incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.json Thu Nov 15 09:08:56 2007
@@ -1,6 +1,6 @@
 { 
   "acme.Customer" : {
-    "acme.name" : "Jim Bob"
+    "acme.name" : "Jim"
   }
 }
     

Modified: incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.xml?rev=595362&r1=595361&r2=595362&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.xml (original)
+++ incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/add.xml Thu Nov 15 09:08:56 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/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java?rev=595362&r1=595361&r2=595362&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerService.java Thu Nov 15 09:08:56 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/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java?rev=595362&r1=595361&r2=595362&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/CustomerServiceImpl.java Thu Nov 15 09:08:56 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/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java?rev=595362&r1=595361&r2=595362&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java (original)
+++ incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/src/demo/restful/server/Server.java Thu Nov 15 09:08:56 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/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/test.html
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/test.html?rev=595362&r1=595361&r2=595362&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/test.html (original)
+++ incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/test.html Thu Nov 15 09:08:56 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/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/update.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/update.xml?rev=595362&r1=595361&r2=595362&view=diff
==============================================================================
--- incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/update.xml (original)
+++ incubator/cxf/branches/2.0.x-fixes/distribution/src/main/release/samples/restful_http_binding/update.xml Thu Nov 15 09:08:56 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>