You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by ae...@rbc.com on 2005/04/21 10:36:03 UTC

RE: 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:Jeremy.Nix@sfsltd.com]
Sent: 20 April 2005 8:46 
To: axis-user@ws.apache.org
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 
 <file://www.sfsltd.com> 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.