0 Replies Latest reply on Mar 12, 2007 7:25 AM by Claus Dreyer

    JBossWS 1.2.0 and nillable types

    Claus Dreyer Newbie

      When returning a user defined object from a web service, e.g.

      @WebMethod(operationName="MyWebMethod")
      public MyReturnClass myWebMethod(...

      With JBossWS 1.0.x a variable in MyReturnClass of type Long would be defined with nillable="true" in the WSDL. However, if the variable was of type long then the nillable parameter was omitted. This reflects Java nicely IMHO.

      With version 1.2.0 of JBossWS this does not seem to be true any longer. The nillable="true" parameter is not added to the WSDL for Long.

      I can add the @XmlElement annotation and get the same effect, e.g.

      @XmlElement(nillable = true)
      Long myVariable;

      My concern is that I have to fill my code with annotation statements to inform that a particular variable can be null, and this is already true. Or have I misunderstood something?

      Best regards,
      Claus