0

i have webservice [JAX-WS] that contain this method :

 @WebMethod
    public List<String> getNumber() {
         List<String> s = new ArrayList<String>();
         s.add("test1");
         s.add("test2");
         s.add(null);
         return s; 
     }

also , i have webservice client that call above webservice.but when get List, size of list is 2. how can i pass null value from webservice to client ?

mehdi shahdoost
  • 1,469
  • 5
  • 17
  • 27
  • I think, it's not possible with JAXB. What XML should be generated for you test? Do you want to benefit from `xsi:nil="true"` (see example [here](http://stackoverflow.com/a/6831543/267197))? I am afraid that in this case you at least need to wrapyour list into response object, and use `@XmlElement(nillable=true)`. – dma_k Apr 15 '12 at 22:18
  • find my problem , this is weblgoic 12c issue , everything goes right on glassfish. – mehdi shahdoost Apr 16 '12 at 04:19
  • If you have some time, just post the answer. Perhaps somebody will also get into this trouble. – dma_k Apr 16 '12 at 08:20

0 Answers0