Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 884059
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:41:44+00:00 2026-05-15T12:41:44+00:00

OK so I have a few operations for my REST Web Service. There is

  • 0

OK so I have a few operations for my REST Web Service. There is some overlap of entities between the different operations but based on what I’m doing some of the elements/attributes are not relevant.

Eg. When I request rates I need to get back:

<Property id=””>
  <Rooms>
    <Room>
      <Rates>
        <Rate></Rate>
      </Rates>
    </Room>
  </Rooms>
</Property>

But when I just want to get a list of rooms back – I only want:

<Property id=””>
   <Rooms>
     <Room>
     </Room>
   </Rooms>
</Property>

and my get rooms request only requires as input

<property id=””></property> 

But based on the full definition of property – when I generate my sample getroomsRequest xml structure its including everything as per the top sample.

Am I supposed to be declaring different named entities? Or is there a way to use a common entity but somehow exclude stuff when it is not relevant?

Thanks! Not sure what is possible/best practice.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T12:41:45+00:00Added an answer on May 15, 2026 at 12:41 pm

    The reason that you are starting to have difficulty is because you are trying to create a direct mapping between your domain concepts (property, room, rates) and your REST resources.

    In my opinion, REST resources should represent the use cases for your system, e.g. “Property/1/RoomRates”, “Property/1/Rooms”. The resources are more of a UI layer than a domain layer.

    Some REST frameworks have started to implement mechanisms that allow you to specify on the query string exactly which pieces of data need to be returned. Again, in my opinion, this is a really bad idea. It severely limits the usefulness of caches and it creates more coupling between the client and server.

    Do not have any fear of creating new resources in a REST system, even if it does not correlate to anything in your business layer. Most problems developers run into when designing REST based systems can be resolved by creating one or two new concepts as resources.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have a few operations where we are doing a large number of large
I have a ruby script that does a few perforce operations (through the scripting
I have a ASP.NET Web Forms application that internally makes many SOAP and REST
I have some long-running operations that number in the hundreds. At the moment they
I have developed an Android app. Now I want to perform a few operations
I have a process which iterates String instances. Each iteration does few operations on
So, I'm slowly working in some Python 3.0, but I still have a lot
I have an NSFetchedResultsController and a few operations updates managed objects on separate threads
I have few questions about ssis transction isolation levels. consider a scenario:I have an
i have few confusion regarding ORM(Object Relational Mapping) i am thinking about to use

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.