Re: [Dev] How to exclude nillable elements from the response of an Admin Service

2019-02-07 Thread Hasini Witharana
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  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.
>
> 
>
> For an existing Service provider when the getServiceProviders method is
> called the "element1" returns null. The response is shown below.
>
> 
>
>
> 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 *
> *(m) 0766435725 | (w) 0713850143 | (e) hasi...@wso2.com *
>
>

-- 
*Hasini Witharana | **Software Engineer | **WSO2 Inc *
*(m) 0766435725 | (w) 0713850143 | (e) hasi...@wso2.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to exclude nillable elements from the response of an Admin Service

2019-02-07 Thread Sagara Gunathunga
Check whether any of the following help you, please use any version after
Apache Axis2 1.7.

- https://issues.apache.org/jira/browse/AXIS2-4859
- https://issues.apache.org/jira/browse/AXIS2-5273
- https://issues.apache.org/jira/browse/AXIS2-3037

Thanks !
On Thu, Feb 7, 2019 at 7:06 PM Hasini Witharana  wrote:

> Hi All,
>
> I added the "@XmlElement"
>
> On Thu, Feb 7, 2019 at 7:03 PM Hasini Witharana  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.
>>
>> 
>>
>> For an existing Service provider when the getServiceProviders method is
>> called the "element1" returns null. The response is shown below.
>>
>> 
>>
>>
>> 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 *
>> *(m) 0766435725 | (w) 0713850143 | (e) hasi...@wso2.com
>> *
>>
>>
>
> --
> *Hasini Witharana | **Software Engineer | **WSO2 Inc *
> *(m) 0766435725 | (w) 0713850143 | (e) hasi...@wso2.com *
>
>

-- 
Sagara Gunathunga | Director | WSO2 Inc.
(m) +94712149951 | (w) +94 11 7435800 | (e) sag...@wso2.com
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


Re: [Dev] How to exclude nillable elements from the response of an Admin Service

2019-02-07 Thread Hasini Witharana
Hi All,

I added the "@XmlElement"

On Thu, Feb 7, 2019 at 7:03 PM Hasini Witharana  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.
>
> 
>
> For an existing Service provider when the getServiceProviders method is
> called the "element1" returns null. The response is shown below.
>
> 
>
>
> 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 *
> *(m) 0766435725 | (w) 0713850143 | (e) hasi...@wso2.com *
>
>

-- 
*Hasini Witharana | **Software Engineer | **WSO2 Inc *
*(m) 0766435725 | (w) 0713850143 | (e) hasi...@wso2.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev


[Dev] How to exclude nillable elements from the response of an Admin Service

2019-02-07 Thread Hasini Witharana
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.



For an existing Service provider when the getServiceProviders method is
called the "element1" returns null. The response is shown below.




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 *
*(m) 0766435725 | (w) 0713850143 | (e) hasi...@wso2.com *
___
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev