*/
public static Client create(String jsonUrl, boolean useHttpClient) throws Exception {
if (useHttpClient) {
HTTPSession.register(TransportRegistry.i());
}
Client client = new Client(TransportRegistry.i().createSession(jsonUrl));
Field serializerField = client.getClass().getDeclaredField("serializer");
serializerField.setAccessible(true);
JSONSerializer serializer = (JSONSerializer) serializerField.get(client);
serializer.registerSerializer(new JSONEnterpriseObjectSerializer());
serializer.registerSerializer(new NSArraySerializer());
serializer.registerSerializer(new NSDictionarySerializer());