Hi All, Sorry for the previous reply.
I have added "@XmlElement( name = "element1")" annotation on top of the attribute "element1" and its get method. According to [1], this annotation should exclude null elements. [2] [3] and [4] are some resources that is useful for the solution. Still the nillable elements are not excluded from the response. [1] - https://dzone.com/articles/binding-json-xml-handling-null [2] - https://stackoverflow.com/questions/25665279/axis-1-4-how-to-exclude-nilllable-elements [3] - https://java-user.axis.apache.narkive.com/krE98CcC/jaxb-util-creating-omelement-based-on-annotations [4] - https://markmail.org/search/?q=list%3Aorg.apache.ws.axis-user+omit+null#query:list%3Aorg.apache.ws.axis-user%20omit%20null+page:1+mid:f6isx6k4tnnpuy4n+state:results Thank You. Hasini On Thu, Feb 7, 2019 at 7:03 PM Hasini Witharana <hasi...@wso2.com> wrote: > Hi All, > > I have added a new attribute "element1" to SAMLSSOServiceProviderDTO. > Admin service IdentitySAMLSSOConfigService has been changed by that > addition. "element1" is represented in the WSDL as follows. > > <xs:element minOccurs="0" name="element1" nillable="true" type="xs:string"/> > > For an existing Service provider when the getServiceProviders method is > called the "element1" returns null. The response is shown below. > > <ax2429:element1 xsi:nil="true"/> > > > For the backward compatibility when an existing client call the Admin > Service, the null values should not be present. Is there a way to omit such > empty elements when the admin service is called? > > Thank You. > Hasini > -- > *Hasini Witharana | **Software Engineer | **WSO2 Inc <https://wso2.com/>* > *(m) 0766435725 | (w) 0713850143 | (e) hasi...@wso2.com <hasi...@wso2.com>* > > -- *Hasini Witharana | **Software Engineer | **WSO2 Inc <https://wso2.com/>* *(m) 0766435725 | (w) 0713850143 | (e) hasi...@wso2.com <hasi...@wso2.com>*
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev