3 Replies Latest reply on Jan 20, 2006 12:52 AM by thomas.diesler

    Configure JBoss (serialization) to return only non-null valu

    grp_eee

      Hi,

      We are using jboss 4.0.3 for our webservice implementation.
      We are using Java to WSDL development approach for webservices.
      (We define our service interface with java beans as our input and output parameters and use wscompile tool to generate wsdl from it.)

      I would like to know if it is possible to configure the by JAX-RPC(serialization) of JBoss to include only non-null values in the SOAP response.
      For example if the return type of my webservice is the Java Bean

      public class BackupPolicy implements Serializable
      {
       private Integer backuppolicyid;
       private String name;
      
      ............getter/setters..
      }

      The SOAP response that is returned when name property in BackupPolicy object is null :

      <?xml version="1.0" encoding="UTF-8"?>
      <ns1:createBackupPolicyResponse xmlns:ns1="http://www.ca.com/SMB/OPS/r1/types">
       <result>
       <backuppolicyid>1</backuppolicyid>
       <name xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="1"/>
       </result>
      </ns1:createBackupPolicyResponse>

      Can we configure JBoss to return only non-null
      values i.e

      <?xml version="1.0" encoding="UTF-8"?>
      <ns1:createBackupPolicyResponse xmlns:ns1="http://www.ca.com/SMB/OPS/r1/types">
       <result>
       <backuppolicyid>1</backuppolicyid>
       </result>
      </ns1:createBackupPolicyResponse>

      Thanks in advance.

      -Ram