You need to have setter method

public void setName( String value ){
...

On 1/18/07, Julien HENOT <[EMAIL PROTECTED]> wrote:
Hi everyone,

I try to transfert a RDF object from a server to a client, and there is a
failure during the test
I do a mapping for RDF too.
I try with Integer, and there is no problem.

<mappings  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  xsi:schemaLocation="http://xfire.codehaus.org/schemas/1.0/mapping.xsd";>
    <mapping>
        <method name="RDF">
            <parameter index="0" class="java.lang.String"/>
        </method>
         <method name="getName">
            <return-type class="java.lang.String"/>
        </method>
   </mapping>
</mappings>



public class RDF {

      private String name;

      public RDF(){
             name = "";
      }

      public RDF(String _name){
             name=_name;
      }

      public String getName(){
             return name;
      }

}




on the server side :
        public RDF findAnnotation(Integer id){
               RDF rdfObj = new RDF("truc");
               return rdfObj;
        }


on the client side


public class AnnotationClientTest{

    public void testClient() throws MalformedURLException{

        Service serviceModel = new
ObjectServiceFactory().create(AnnotationService.class,"AnnotationService","http://localhost:8080/annotation/services/AnnotationService",null);

        AnnotationService service = (AnnotationService) new
XFireProxyFactory().create(serviceModel,"http://localhost:8080/annotation/services/AnnotationService";);


        GenericClientImpl GC = new GenericClientImpl(service);


        GC.findAnnotation(null);

    }
}



and the client fonction :

        public Annotation findAnnotation(Integer id){
               RDF r = (RDF) service.findAnnotation(null);
               System.out.println("rdf number :" + r.getName());
               return null;
        }


thank you for your help



henot julien

_________________________________________________________________
Personnalisez votre Messenger avec Live.com
http://www.windowslive.fr/livecom/


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to