diff --git a/Changelog b/Changelog index 0f78869..722c5ac 100644 --- a/Changelog +++ b/Changelog @@ -1,3 +1,4 @@ +Tweaks to make it possible to use an arbitrary transport Fix potential race condition 1.10.0 diff --git a/README.md b/README.md index c104bb2..740a69c 100644 --- a/README.md +++ b/README.md @@ -270,6 +270,20 @@ of the server will be ignored. This will enable the following flags: FLAGS_IGNORE_NAMESPACES, FLAGS_NIL, FLAGS_DEFAULT_TYPE_STRING +Using an arbitrary transport +============================ +aXMLRPC uses http with the java.net API. If you want to use another protocol or API, you can do: + +```java + boolean debug = false; + SerializerHandler serializerHandler = new SerializerHandler(); // or you may build it with flags + String payload = new Call(serializerHandler, "add", 5, 10).getXML(debug); + + InputStream istream = sendPayloadWithMyTransport(payload); // use your implementation here + + Integer i = (Integer) new ResponseParser.parse(serializerHandler, istream, debug); +``` + License ======= diff --git a/src/main/java/de/timroes/axmlrpc/ResponseParser.java b/src/main/java/de/timroes/axmlrpc/ResponseParser.java index 81634c5..f32891c 100644 --- a/src/main/java/de/timroes/axmlrpc/ResponseParser.java +++ b/src/main/java/de/timroes/axmlrpc/ResponseParser.java @@ -25,7 +25,7 @@ * * @author Tim Roes */ -class ResponseParser { +public class ResponseParser { private static final String FAULT_CODE = "faultCode"; private static final String FAULT_STRING = "faultString"; diff --git a/src/main/java/de/timroes/axmlrpc/serializer/SerializerHandler.java b/src/main/java/de/timroes/axmlrpc/serializer/SerializerHandler.java index f609b3c..b6e9fd1 100644 --- a/src/main/java/de/timroes/axmlrpc/serializer/SerializerHandler.java +++ b/src/main/java/de/timroes/axmlrpc/serializer/SerializerHandler.java @@ -45,6 +45,10 @@ public class SerializerHandler { private int flags; + public SerializerHandler(){ + this(XMLRPCClient.FLAGS_DEBUG); + } + public SerializerHandler(int flags) { this.flags = flags; string = new StringSerializer(