Serializar?

Pessoal estou usando RMI, para serializar uma digital, e depois diserializar, mas na verdade eu gostaria de usar JSF / Web Service…
Alguém poderia da uma dica sobre isso !?
Trata-se de um Sistema de Biométria !

 private byte[] serializar(Template digital) throws IOException {
        byte[] buf = null;
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream out = null;
        try {
            out = new ObjectOutputStream(baos);
            out.writeObject(digital);
            buf = baos.toByteArray();
        } finally {
            out.close();
            baos.close();
        }
        return buf;
    }

    private Template deserializar(byte[] digital) throws IOException {
        Template template = null;
        ByteArrayInputStream bais = new ByteArrayInputStream(digital);
        ObjectInputStream ois = null;
        try {
            ois = new ObjectInputStream(bais);
            template = (Template) ois.readObject();
        } catch (ClassNotFoundException e) {
            getLogger().error(e.getMessage());
        } finally {
            bais.close();
            ois.close();
        }
        return template;
    }

Pq vc está fazendo isso na mão???

vc sabia que ao implementar a “Interface Serializable” vc já esta serializando??? voce agora só precisaria enviar as informações pelo objeto e já era

Se você usar Webservices, o próprio framework (por exemplo, JAX-WS) fica responsável por serializar os objetos (em XML e não bytes).

Está tendo problema em algum ponto específico? Ou não sabe por onde começar? Você já tem experiência com webservices?

Usa o cxf para criar o webservice e só é chamar os seus metodos a partir do cliente
http://www.asjava.com/web-services/web-services-hello-world-example-with-cxf/