ByteArrayInputStream bais = new ByteArrayInputStream(buf.toString().getBytes());
Document xml = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(bais);
connector.setConfiguration(xml.getDocumentElement());
connector.create();
connector.addInvocationHandler("sample", new SampleInvocationHandler());
connector.start();
/////////////////////////////////////
///// Set up client side. ////