Hi Aparnna,

On 23 Jan 2014, at 07:41, Aparnna Prasad <[email protected]> wrote:

> Hi Michael,
> 
> Following is a sample method signature
> 
> public TaskHeaderlDto getByProjectIdMatNoAndVersion(int projectID, String
> materialNo, String version)
> 
> All the three input fields are required to find the unique header record.
> 

Normally you should define an according Entity (e.g. TaskHeader) which than 
contains the field (projectId, materialNo, version) as key properties.
Then you can do calls like: 
"…/ReferenceScenario.svc/TaskHeader(projectID=3,materialNo=‘4711’,version=“19’)/“.

> I tried using the uriInfo.getCustomQueryOptions() and passed the inputs as
> a query String and is working. Again is this a right approach. Is there any
> better option?

And the example above really is working? 
Do you send the necessary values (projectId, materialNo, version) as URL query?

> 
> We also have some EJB's for execution of Business Rules. A few of these
> rules are to be executed from a UI5 view. And these rules requires a
> minimum of 4 parameters for execution. For passing mutiple inputs, do we
> have any option to pass something like an object containing all parameters?
> 

You could define an “FunctionImport” (see: 
“http://www.odata.org/documentation/uri-conventions/#AddressingServiceOperations";)
 which than could be called with the necessary parameters (like: 
“/OData.svc/ProductsByColor?color=’red’”) and internal then call your EJB.

> Regards,
> Aparnna Prasad

Kind regards,
Michael

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to