Hi,
I have what I hope is a fairly simple problem, and I suspect I am just missing something
obvious. I have a web service with a method which returns a POJO containing Strings,
longs and booleans. I can access the variables directly if I set
@XmlAccessorType(XmlAccessType.FIELD), but I can't get the service to expose the
getters. Is this possible, as I want some logic in the getters.
Web Service
| @Stateless
| @WebContext(contextRoot="/web-services", secureWSDLAccess=false)
| @WebService(name="MobileUpdate", serviceName = "MobileUpdate")
| @SOAPBinding(style = SOAPBinding.Style.RPC)
| public class MobileUpdateService {
| @WebMethod
| public MobileConfigResponse getConfig( String msisdn ) {
| return new MobileConfigAction().act( msisdn );
| }
| }
|
Returned POJOs
| @XmlAccessorType(XmlAccessType.FIELD)
| public class MobileConfigResponse {
|
| protected String[] errors;
| protected String config;
| protected long id;
|
| MobileConfigResponse() {}
|
| public MobileConfigResponse( String[] _errors, String _config, long _id ) {
| errors = _errors;
| config = _config;
| id = _id;
| }
|
| public String[] getErrors){
| return errors;
| }
|
| public boolean isError() {
| return errors != null && errors.length > 0
| }
|
| public String getConfig() {
| return config;
| }
|
| public long getId() {
| return id;
| }
|
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060696#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...