diff options
author | fmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68> | 2011-07-26 10:32:20 +0000 |
---|---|---|
committer | fmoga <fmoga@13f79535-47bb-0310-9956-ffa450edef68> | 2011-07-26 10:32:20 +0000 |
commit | 7c37fa57602419fcf5e80018a9eb48c9590a5e01 (patch) | |
tree | 2c276a906d59f653e89ae2e341160d56eca1fdda /sca-java-2.x/contrib/samples/learning-more/binding-websocket/autocomplete-webapp | |
parent | bbef1e502a5277517ccfe64617d9aeed2e8af0de (diff) |
Fix typos in README.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1151057 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r-- | sca-java-2.x/contrib/samples/learning-more/binding-websocket/autocomplete-webapp/README | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sca-java-2.x/contrib/samples/learning-more/binding-websocket/autocomplete-webapp/README b/sca-java-2.x/contrib/samples/learning-more/binding-websocket/autocomplete-webapp/README index 6f7f3e13ab..7e721af2aa 100644 --- a/sca-java-2.x/contrib/samples/learning-more/binding-websocket/autocomplete-webapp/README +++ b/sca-java-2.x/contrib/samples/learning-more/binding-websocket/autocomplete-webapp/README @@ -21,9 +21,9 @@ your choice supports one of these protocol versions. The websocket binding also features a javascript API to simulate SCA in the browser. In order to use it, the following script has to be included in the client page: - <script type="text/javascript" - src="org.apache.tuscany.sca.WebsocketComponentContext.js"> - </script> + <script type="text/javascript" + src="org.apache.tuscany.sca.WebsocketComponentContext.js"> + </script> This will inject proxies for all services defined in the composite that are using binding.websocket. All invocation and connection management is handled @@ -34,9 +34,9 @@ be called: Given the asynchornous nature of websockets, a function should be defined in order to handle responses received for a certain service operation. This should be done as follows: - Tuscany.WebsocketComponentContext.<component name>.<service name>.<operation name>.responseHandler = function(response) { - // handle response - }; + Tuscany.WebsocketComponentContext.<component name>.<service name>.<operation name>.responseHandler = function(response) { + // handle response + }; Note that the data exchange is automatically handled by the binding, so the parameters should have the same structure as the data types defined in the method @@ -44,17 +44,17 @@ definition. Also, the response will have the same data type as the return type o the service method. Objects are passed over the wire in JSON format. Another detail worth mentioning is that the binding will use a single websocket -connection to handle the communication between a browser client and all services +connection to handle communication between a browser client and all services defined using binding.websocket on the same port. Requests and responses will get multiplexed via the same channel and get routed to the appropriate service implementation, respectively javascript function. -In order to run the sample, you can run "mvn jetty:run" which will start a Jetty +In order to run the sample, you can execute "mvn jetty:run" which will start a Jetty instance automatically or use "mvn package" and deploy the resulting war to the application server of your choice. Next, point your browser at - http://localhost:8080/sample-binding-websocket-autocomplete-webapp/ + http://localhost:8080/sample-binding-websocket-autocomplete-webapp/ You can see how suggestions are being received in real time when characters are entered in the text field. You can see the persistent websocket connection using |