开发者

make a parameter of type byte array nullable in an axis web service

开发者 https://www.devze.com 2022-12-10 14:38 出处:网络
i have a java method that is part of a开发者_开发问答n web service interface and that takes a byte array parameter like this

i have a java method that is part of a开发者_开发问答n web service interface and that takes a byte array parameter like this

public int computeSomeThind(byte[] data) {
  if(data != null) {
    // ... do what ever
  } else {
    return -1;
  }
}

When a generate the wsdl with axis 1.3 the data parameter will appear as not nullable. Is there a way to define this as nullable?


Is null really different that a byte[] of 0 length in this case?


As suggested by mhaller in his comment Byte[] seems to be the solution.

0

精彩评论

暂无评论...
验证码 换一张
取 消