I have this class:

package br.wilson.testebean.bean;

import java.io.Serializable;

public class Modelo implements Serializable {
    private String teste;
    private String teste1;
    private String teste2;
    public String getTeste1() {
        return teste1;
    }
    public void setTeste1(String teste1) {
        this.teste1 = teste1;
    }
    public String getTeste() {
        return teste2;
    }
    public void setTeste(String teste) {
        this.teste = teste;
    }
    public void setTeste2(String teste2) {
        this.teste2 = teste2;
    }
    public String getTeste2() {
        return teste2;
    }
}


And I have in my Resource, a resource property from this type, in fact the
Model generated by the Stubs:
 private ResourceProperty modelTesteRP;

    public Modelo getModelTeste() {
        return (Modelo)this.modelTesteRP.get(0);
    }

    public void setModelTeste(Modelo modelTeste) {

        this.modelTesteRP.set(0, modelTeste);
    }

I modified the value of this RP in a method like this:
   Modelo testeModelo = new Modelo();
   testeModelo.setTeste("TesteFromModelo");
   testeModelo.setTeste1("Teste1FromModelo");
   testeModelo.setTeste2("Teste2FromModelo");

   resource.setModelTeste(testeModelo);

In the client, I'm trying to do this:
     GetResourcePropertyResponse modelTesteRP = client.getResourceProperty(
ComBeanNamespaces.RP_MODELTESTE);

      InputSource source = new InputSource(new StringReader(
modelTesteRP.get_any()[0].getAsString()));

      br.wilson.testebean.bean.Modelo modelTeste = (
br.wilson.testebean.bean.Modelo) ObjectDeserializer.deserialize(source,
br.wilson.testebean.bean.Modelo.class);

      System.out.println("testeModel.teste"+modelTeste.getTeste());
      System.out.println("testeModel.teste1"+modelTeste.getTeste1());
      System.out.println("testeModel.teste2"+modelTeste.getTeste2());

But I have this error:
org.globus.wsrf.encoding.DeserializationException: Could not find
deserializer for: br.wilson.testebean.bean.Modelo
        at org.globus.wsrf.encoding.ObjectDeserializationContext.init(
ObjectDeserializationContext.java:125)
        at org.globus.wsrf.encoding.ObjectDeserializationContext.<init>(
ObjectDeserializationContext.java:91)
        at org.globus.wsrf.encoding.ObjectDeserializer.deserialize(
ObjectDeserializer.java:245)
        at br.wilson.testebean.client.ComBeanClient.main(ComBeanClient.java
:199)

Any help? Where I can find more information about Resource Properties?
I don't know where to find, I'll be glad if someone help me, or say me where
I can find the answer.


Cheers.

-- 
"É este um mundo no qual devemos esconder nossas virtudes?"
                     Willian Shakespeare


****************
Wilson Júnior
****************

Reply via email to