I am trying to implement the $count functionality in my OData V2 service, using Olingo.
I can't find any resources which explain how to do this - the Olingo documentation only explains how to do it for V4, and even so it's not clear. I have done lots of research but so far unsuccessfully.
Can someone point me to a place which explains this, or explain it for me ?
Many thanks!
You need to implement the "countEntitySet" or "countEntityLinks" method in your processor similar to the "readEntitySet" method.
In order to write the response you can use the method: EntityProvider.writeText(...) method and pass the number as a String.
Here is the example from the Olingo Test-Scenario: https://github.com/apache/olingo-odata2/blob/597465569fdd15976d0486711d4a38f93a7c6696/odata2-lib/odata-ref/src/main/java/org/apache/olingo/odata2/ref/processor/ListsProcessor.java#L226
Related
I understand that there is no right or wrong answer here.
I see a gRPC API which returns "google.protobuf.Any". The job of the API is to take a param, which says what information needs to be fetched, and returns one of "n" things.
From an API design perspective, it is a good practice to define an API like this?
The other option would be to define a return message with "oneof" construct, which in my opinion tightly binds what the API can return.
Please let me know your thoughts.
Thanks for your time.
rpc getInformation(InfomationRequestParams) returns (google.protobuf.Any);
Returning Any from an API is common. oneof is preferred if you have a strict set of options that aren't added to often, but isn't appropriate if anyone may want to extend what is sent. The decision is similar to whether you choose to use an enum or a string in an API.
It does seem weird to not wrap the Any with a message, since generally there is type-independent information. But that's more specific to what your API actually provides and so may be fine as-is.
The MS Graph API has the possibility to list the direct members of an AD group using
/groups/{id}/members
Is there a way to get both direct and indirect members, i.e. member of members of members and so on and so forth.
I would like to avoid the need to implement some recursive logic on the client if it can be done another way, possibly through the use of OData query parameters?
I have tried the following using $expand and $level, but unfortunately the 'members' navigation property doesn't exist on the child groups for some reason and I guess that's why they are not expanded.
https://graph.microsoft.com/v1.0/groups('{group-id}')?$expand=members($levels=max)
Unrelated to the question, could someone with the necessary SO permissions please make the ms-graph and the microsoftgraph tags synonyms?
Update: The feature request mentioned below is in beta now.
I found a feature request on uservoice.com for this, so it seems like it does not exist yet. If you came here looking for the solution, I encourage you to go and vote for the feature.
This is my first time using S#arp Architecture 2.0 in a project.
There is two folders in tasks project : Commands and CommandHandlers.
I shearch about it and tried to undestand by the cookbook project what do i have to put there. I am imagining that i have to do something like it was before: a "viewToModel" function and a SaveOrUpdate in the IRepository.
Somebody can explain the "Commands and CommandHandlers" or/and give me a good documentation about it?
Thanks a lot!
Have you seen the Cookbook wiki? Using commands?
From your questions, I understand you are after some sort of CRUD functionality, in which case going for a command and handler approach might be overkill, just load the entity in your controller, copy values from the form and save it. Using commands is more suited for a Task based UI and where there is some behavior you want on the entities.
I need to give a demo on the working of Soap and Rest(practical example). Could anyone help please and suggest an example using .net frame work or any other suitable ways.
Let me put it this way "I want to implement Soap and rest web services in asp.net. I need the required steps to do it"
Thanks in advance.
A simple example that I usually use is the calculator service. This is an example Restful implementation and this is the same one using SOAP.
Searching in internet would help you.
I wound this artticle that may help you in your presntation of pros/cons of the two.
http://geeknizer.com/rest-vs-soap-using-http-choosing-the-right-webservice-protocol/
or a nice presentation taken from here
http://www.slideshare.net/cesare.pautasso/rest-vs-soap-making-the-right-architectural-decision-1st-international-soa-symposium-amsterdam-october-2008-presentation
Hope it helps.
WCF is smart. He can make us go. We need him. REST / SOAP endpoints for a WCF service
Given the fact that you're about to do a presentation, I think you want examles in terms of use cases and not technically, right?
Here are a few examples:
Translation service
Currency converter
Is there a list of possible faultCode values for Flex's Fault object (mx.rpc.Fault; Flex SDK: 3.4)?
At least faultCodes for faults generated on the client side?
I'm thinking of something like the list of possible runtime errors, found at Adobe's RTE List, but for faultCodes (such as Client.Error.MessageSend, Server.Processing, etc).
Could very well be that I just don't understand my problem well enough to do a decent search, but I've come up with nothing all day. It may also be that there is only one or two client-side faultCode values. Seems like it would make sense that there wouldn't be a comprehensive list of server-side faultCode values, but maybe there's a list of BlazeDS/LiveCycle faultCodes?
Any help much appreciated.
So, it looks like the answer is pretty much "No". I guess this makes sense, I guess, since most server-side faults would come from the server. I figured there would be a list of standard fault types, at least, as part of BlazeDS and/or LCDS.
Here's a pretty good post about setting up exception handling in BlazeDS. Does a good job of explaining why the answer to this question is No, as well as providing a good way of handling exceptions in BlazeDS, which would give you a custom list of fault codes.
http://www.flexpasta.com/index.php/2008/05/16/exception-handling-with-blazeds-and-flex/
Maybe this may help:
There is what they called Fault Event(mx.rpc.events.FaultEvent)
its properties has:
var event:FaultEvent = new FaultEvent();
trace (event.message);
Try adding this in an array so that you could have ur list.
Hope it helps