Am Freitag, den 28.12.2007, 18:49 -0800 schrieb rkannan: > I have a simple service method <foo> that takes an Integer array and returns > an Integer array. I am using Wrapped Doc/Lit style, with JAX-WS and JAXB. > The generated WSDL does not contain any wrapper for the array type (RPC > style generates wrapper like IntArray, StringArray but Doc/Lit does not).
The JAXB artifacts are the same for CXF and Metro, because we use the sample JAXB implementation. The JAX-WS artifacts, however, might be slightly different (although I think Metro does the same for what you are saying.) It might be best to create your objects using Metro[1] to see if there is a difference. [1] http://www.jroller.com/gmazza/entry/using_amazon_web_services_with (Step #5) Note there is an <jaxws:enableWrapperStyle/> option described in Step #4 of [1], I think it is presently not working in CXF but does work with Metro if that would help you. (I believe you can use the CXF libraries with Metro-generated client stubs/service skeletons.) > This is an issue as it will lead to problems in differentiating between null > and empty arrays. So how do I get wrappers automatically created for array > types in my WSDL while using Doc/Lit style? > > I went ahead with this WSDL and generated the stub classes. I found that > there is no setter method defined for List types. I think that is by design. Example 5-4 from the source code download from "SOA Using Java Web Services" (Hansen)[2] I think will explain the situation to you. [2] http://soabook.com/code.html, Look for file: /chap05/customjava/etc/schemacompiler_withcomments/SimpleOrder.java and see the comments at the very-near-end of the file. HTH, Glen
