You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Abhijit Dixit <ab...@123india.com> on 2002/06/28 21:30:05 UTC
Extra parameters in response
Hi,
I have a Error class which is sent as a SOAP response. Here's the
definition of the class ...
public class Error {
String data;
int code;
Error();
public String getdata(){return data;}
public void setdata(String data){this.data=new String("data")'}
public int getcode(){return code;}
public void setcode(int code){this.code=code;}
public int getValue(){return code;}
}
The getValue() is a function I use in my code just to test for the code. It
doesn't have a corresponding 'value' property. But now, when this class is
sent back as a response, the SOAP packet looks like this ...
<error xsi:type="ns1:error">
<code xsi:type="xsd:int">0</code>
<data xsi:type="xsd:string">Success</message>
<value xsi:type="xsd:int">0</value>
</error>
Why does the error message have the value parameter if it is not a property
of the actual class ? Is it because of the getValue() function ? If that is
so, why isn't value upper case in the response ?
Is there anyway I can avoid this. I don't want to return value.
Thanks,
Abhijit