views:

22

answers:

0

Hi Guys I have an XSD which describes the data that is going to be sent back in response to a request. For example, my service may be focused on requesting client details. The XSD in question describes what data items are going to be sent back and one of these data items is the details of the organisation that the client works for. In this scenario an organisation can have many clients, hence the client service is sending back organisation data as part of its response. In this case, it makes sense to send back this parent data since there is a good chance that the consumer will want to utilise the organisation's details in conjunction with the clients details.

The problem is that we also have an organisation service that can be called directly. What this means is that a consumer may retrieve a list of all organisations prior to requesting a client (hence they wont need the organisations details when requesting the client) and in other scenarios they wont have any organisation details and will want to receive the organisation details. In the latter case, the service is acting as an aggregation service pulling an organisations details from the org service and putting it in the response that is sent back.

My question is that in the case where we sometimes want the data and sometimes don’t is there any standards which sound a service saying "you have requested this core data items, what supporting data items would you like to receive in response". The XSD itself supports this concept because one would describe the organisation as being optional. I know i could provide extra parameters that say pointing like "RequestClientDetails(bool shouldIncludeOrganisationDetails)", but i thought that there may be a more standards based approach.

Cheers Anthony