title: JAX-WS: How to Exclude a "member/field" in a Response Object (WS Response) that is inherited?
body: <p>I have a WebService that returns as the result of the Invokation of the Web-Service a ResponseObject called "<code>CustomerResponse</code>". When I implement this object "from scratch" everything works fine: My implementation in this case only contains all the needed "Simple Types" like Strings, Integers but NO Object references/associations.</p>
  
  <p>However what I wanted  to do is, "reuse" existing Objects. I have in my domain-model a "<code>Customer</code>" Object that is used in the Application itself. Instead of stupidly more or less cloning the <code>Customer</code> into the "CustomerReponse" object (by manually typing again all the members/fields), I wanted to base the <code>CutomerResponse</code> object on the <code>Customer</code> Object by extension: </p>
  
  <pre><code>class CustomerResponse extends Customer
  </code></pre>
  
  <p>==> The Problem is that now <code>CustomerResponse</code> contains some "internal" fields that were inherited from the <code>Customer</code> Object (like DatabaseID, Security-Stuff) that I do not want to expose via the Web-Service. Furthermore (and thats currently the main problem") <code>Customer</code> also contains a lot of "object references/associations" to other objects like <code>Address</code>, <code>Orders</code>, <code>History</code> that I do not want to expose via the Webservice either. (It seems that Apache CXF "evaluates" the whole Objectgraph and tries to include them in the ResponseObject...)</p>
  
  <p>==> Is it possible to "Extend" WebService Response Objects based on existing Objects and somehow <strong>exclude</strong> some "members/fields" of the extended supertyp? (So I want to exclude some members (like the DatabseID) and all of the "object associations" like (Address/Orders/Histroy)..
  How can I acomplish this, with what annotations and procedures?</p>
  
  <p>Thank you very much!!
  Jan</p>