Skip to Content
author's profile photo Former Member
Former Member

Some questions about CAF

Hello all,

I'm new to CAF and I'm creating a first application following some how-to guides. However, I have some basic doubts which I would like to solve...

First to all, I have imported a WebService called <i>SearchEquipment</i> where its input is a Search Request (IDEquipment or EquipmentName), and its output are:

1. IDEquipment

2. EquipmentName

3. All descriptions according to all equipments that correspond with one of the both Search Request.

For instance, IDEquipment = 174* and EquipmentName= "null" and the response is:

1741, XXXX, description1

1742, XXXY, description2

Now, I want to create a new WebService with exactly the same Bussiness logic. So, my questions are:

1. According to the Entity Service: How should I create that attributes? (IDEquipment and nameEquipment are not mandatories) . In the datasource option, What's the meaning of map by minValue?.

2. According to the Application Service: I have created a new opperation in the entity service but, the input parameters in the application service are QueryFilter. I would like to parse this QueryFilter attributes to String. How works the API called

CreateStringFilter (parameters meaning) etc?

Thanks in advance!,


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Apr 13, 2007 at 01:09 PM

    Hello Marta,

    I found the function to createStringFilter. I hope that he serves to you.

    <i>public static QueryFilter createStringFilter(String action, String value, String name, boolean bAttribute)


    QueryFilter filter = new QueryFilter();

    filter.action = action;

    filter.valueLow = value;

    filter.attribute = name;

    filter.datatype = "String";

    filter.isString = true;


    filter.operation = "attribute";


    filter.operation = "category";

    return filter;


    Best regards,

    Luis Galey.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 14, 2007 at 05:24 PM

    Firstly the idea of composite is not to duplicate any backend functionality but "reuse". If you already have a webservice that you can import into caf core as External service, then wrap that service to an Entity service.

    1. For entity service, you can create the attributes that makes sense for your requirement. For e.g. if you create an entity service called Equipment. create 3 attributes - id, name and description. Make the id attribute as the primary key. The datasource is your external web service that you plan to use. So you'd need to map the id attribute to the min value of the webservice id (under input parameters). Also map name attribute from entity to the web service.

    2. Since any operation created on Entity mimics a "SELECT" SQL query on that entity, caf implements the "WHERE" clause as a Query filter. So if you are creating a new method in Applicaton Service, you'll need to invoke the entity service method with a Query Filter i.e. QueryFilter.getQueryFilter(id). If you want to pass multiple parameters, create a Query filter for each parameter.

    In your case, creating an Application Service operation is not recommended. You can directly use the findBy method on the EntityService.



    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member


      I have the same problem.I have a web service which takes an id(number) as an input and gives a title message(LongText) corresponding to that id as an output.

      I am using this ws in my entity service throw external service.In the entity service,id is declared as a key and title is declared as a normal field.Yhe mapping is like this:

      entity >input >id--

      external service>input-->id

      entity >output >title--

      external service>output-->title

      I have completed all the steps of using web services as external services how to guide.

      Now the problem is when i am executing the method findByID,it is asking a 36 characters fixed length id.

      How can i resove this problem.

      plz give me some solution.



Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.