Return multi kinf of Object of Web Service in Java
<p>I am using web service in Java.Here is my problem:</p>

<pre><code>public Object execute(int servicecode)
{
    switch (servicecode)
    {
        case 1:
           return OBJECT_1;
        case 2:
           return OBJECT_2;
        case 3:
           return OBJECT_3;
    }
}
</code></pre>

<ul>
<li>My function returns OBJECT_1,OBJECT_2,OBJECT_3. I want client to understand:
<ul>
<li>case 1 Object=OBJECT_1</li>
<li>case 2 Object=OBJECT_2</li>
<li>case 3 Object=OBJECT_3</li>
</ul></li>
</ul>

<p>How can I do it in a Web Service? I tried to use inheritance in the Web Service but I can't get properties of OBJECT_1, OBJECT_2, OBJECT_3.</p>
