Can we default value in bean so even after WSDL generation the value will be retained?

52 Views Asked by At

I have a property

private boolean submitRequests = true;

but when WSDL is generated the resulting bean does not retain the default "true" value. Is there a way or any annotation which can make it retain the default value?

1

There are 1 best solutions below

0
Shruti Rawat On

Got the answer...

@XmlElement(defaultValue = "true")
public void setSubmitRequests(boolean submitRequests) {
    this.submitRequests = submitRequests;
}

this will do it