Just fully qualify the data type, like this:

@namespace ("com.b2b.camel.service")
protocol CamelEndpointDAOService{

    import schema "camelEndpoint.avsc";

    int persist(com.b2b.camel.endpoint.CamelEndpoint camelEndpoint);
    com.b2b.camel.endpoint.CamelEndpoint fetch(int id);
}

Dave

From: Atin Sood [mailto:[email protected]]
Sent: Saturday, April 20, 2013 8:15 AM
To: [email protected]
Subject: Namespace issues when using schema with avdl file‏


I have a schema file like this

{"namespace" : "com.b2b.camel.endpoint",
         "type" : "record",
         "name" : "CamelEndpoint",
         "fields" : [
            {"name" : "id", "type" : "int"},
            {"name" : "desc", "type" : "string"},
            {"name" : "from", "type" : "string"},
            {"name" : "to", "type" : "string"}
         ]
}

and I want to use the same in the the avdl file where my protocol will be using 
it

@namespace ("com.b2b.camel.service")
protocol CamelEndpointDAOService{

    import schema "camelEndpoint.avsc";

    int persist(CamelEndpoint);
    CamelEndpoint fetch(int id);

}

Note that the camelEndpoint is in a different namespace compared to the 
CamelEndpointDAOService.

I am not sure how to make the avdl file look into the namespace of 
CamelEndpoint. I am importing the schema but not sure how to get the namespace 
correctly.

Regards
--
Atin Sood
Sent with Sparrow<http://www.sparrowmailapp.com/?sig>

Reply via email to