Skip to content

Commit e882cfc

Browse files
committed
Update README.md.
1 parent 9c3c97c commit e882cfc

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ HTTP-RPC provides the following classes for implementing REST services:
4141
* `ResourcePath` - annotation that associates a resource path with a service method
4242
* `JSONEncoder` - class that serializes an object hierarchy to JSON
4343
* `JSONDecoder` - class that deserializes an object hierarchy from JSON
44-
* `WebServiceProxy` - web service invocation proxy
44+
* `WebServiceProxy` - class for consuming remote web services
4545
* `WebServiceException` - exception thrown when a service operation returns an error
4646
* `org.httprpc.beans`
47-
* `BeanAdapter` - adapter class that presents the contents of a Java Bean instance as a map
47+
* `BeanAdapter` - class that presents the contents of a Java Bean instance as a map or vice versa
4848
* `org.httprpc.sql`
49-
* `ResultSetAdapter` - adapter class that presents the contents of a JDBC result set as an iterable sequence of maps or typed values
50-
* `Parameters` - class for simplifying execution of prepared statements
49+
* `ResultSetAdapter` - class that presents the contents of a JDBC result set as an iterable sequence of maps or typed values
50+
* `Parameters` - class for applying named parameters values to prepared statements
5151

5252
These classes are explained in more detail in the following sections.
5353

@@ -115,7 +115,7 @@ Method arguments may be any of the following types:
115115
* `java.util.List`
116116
* `java.net.URL`
117117

118-
As shown in the previous example, `List` arguments represent multi-value parameters. List values are automatically converted to their declared types (e.g. `List<Double>`).
118+
As shown in the previous section, `List` arguments represent multi-value parameters. List values are automatically converted to their declared types (e.g. `List<Double>`).
119119

120120
`URL` arguments represent file uploads. They may be used only with `POST` requests submitted using the multi-part form data encoding. For example:
121121

@@ -301,7 +301,7 @@ public class TreeNode {
301301
}
302302
```
303303

304-
An example service method that returns a `TreeNode` structure is shown below:
304+
A service method that returns a `TreeNode` structure is shown below:
305305

306306
```java
307307
@RequestMethod("GET")
@@ -355,7 +355,7 @@ Although the values are actually stored in the strongly typed properties of the
355355
```
356356

357357
### Typed Map Access
358-
`BeanAdapter` can also be used to facilitate type-safe access to deserialized JSON data. For example, `JSONDecoder` would parse the content returned by the previous example into a graph of map and list values. The `adapt()` method of the `BeanAdapter` class can be used to efficiently transform this loosely typed data structure into a strongly typed object hierarchy. This method takes an object (typically a map) and a result type as arguments, and returns an instance of the result type that adapts the underlying value.
358+
`BeanAdapter` can also be used to facilitate type-safe access to deserialized JSON data. For example, `JSONDecoder` would parse the content returned by the previous example into a collection of map and list values. The `adapt()` method of the `BeanAdapter` class can be used to efficiently transform this loosely typed data structure into a strongly typed object hierarchy. This method takes an object (typically a map) and a result type as arguments, and returns an instance of the result type that wraps the underlying value.
359359

360360
For example, given the following interface definition:
361361

@@ -556,9 +556,9 @@ public <T> T invoke() throws IOException { ... }
556556
public <T> T invoke(ResponseHandler<T> responseHandler) throws IOException { ... }
557557
```
558558

559-
The first version automatically deserializes a successful server response using `JSONDecoder`. The second version allows a caller to provide a custom response handler.
559+
The first version automatically deserializes a successful response using `JSONDecoder`. The second version allows a caller to provide a custom response handler.
560560

561-
If the server returns an error response, a `WebServiceException` will be thrown. If the content type of the response is "text/plain", the body of the response will be returned in the exception message.
561+
If the server returns an error response, a `WebServiceException` will be thrown. The response code can be retrieved via the exception's `getStatus()` method. If the content type of the response is "text/plain", the body of the response will be returned in the exception message.
562562
563563
### Example
564564
The following code snippet demonstrates how `WebServiceProxy` might be used to access the operations of the simple math service discussed earlier:

0 commit comments

Comments
 (0)