Title: Adding new variable to generated Java Objects, adds element/attribute to the WSDL response.
One way to do what you want is not to include a getter and setter for the variable you do not want to expose.
 
If you still need to set and get the variable value, you can just retrieve and update in your method names instead of get and set.
 
e.g.
 
private String name;
 
private int age;

public String getName() {

return name;

}

public void setName(String name) {

this.name = name;

}

public int retrieveAge() {

return age;

}

public void
 updateAge(int age) {

this.age = age;

}

name will be exposed in WSDL, but age won't.

-----Original Message-----
From: Jeremy Nix [mailto:[EMAIL PROTECTED]
Sent: 20 April 2005 8:46
To: [email protected]
Subject: Adding new variable to generated Java Objects, adds element/attribute to the WSDL response.

I generated my java objects using the WSDLtoJava utility.  I then added a new variable to one of my objects that I did not wish to make available WSDL environment.  It seems as if Axis used reflection to determine which getters/setters were available on my java object and then used that new variable in my WSDL response.  Is there some way that I can de-register a given field so that it is not interpreted as an element/attribute?

_______________________
Jeremy Nix
Senior Application Developer
Southwest Financial Services, LTD.
(513) 621-6699 x1158
www.sfsltd.com


__________________________________________________________________________________________________________________________________

This e-mail may be privileged and/or confidential, and the sender does not waive any related rights and obligations.
Any distribution, use or copying of this e-mail or the information it contains by other than an intended recipient is unauthorized.
If you received this e-mail in error, please advise me (by return e-mail or otherwise) immediately.  

Ce courrier �lectronique est confidentiel et prot�g�. L'exp�diteur ne renonce pas aux droits et obligations qui s'y rapportent.
Toute diffusion, utilisation ou copie de ce message ou des renseignements qu'il contient par une personne autre que le (les) destinataire(s) d�sign�(s) est interdite.
Si vous recevez ce courrier �lectronique par erreur, veuillez m'en aviser imm�diatement, par retour de courrier �lectronique ou par un autre moyen.

Reply via email to