[Design of JBoss Web Services] - Re: JBWS-1452 - WSDL To Java, Array unwrapping.
by jason.greene@jboss.com
The case in 732 is a contrived example that was made to have good coverage of jbossxb's handling of nulls and arrays.
In most cases, a document/literal wrapped wsdl will not wrap the array yet again in another element definition. Take a look at the wscompile output of testMethod(String[] request, int foo)
You should see something like this
| <complexType name="testMethod">
| <sequence>
| <element name = "request" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
| <element name="foo" type="xsd:int"/>
| </sequence>
| </complexType>
|
The only reason to create a wrapper element is to be able to have a distinction between a null array, and a null array element. Without the wrapper, as in above, this is not possible. Even so, for the purpose of simplifying the wsdl, most toolkits will make the sacrifice.
That said there is no reason to not do it for document/literal, so you can disable that check if you like.
-Jason
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001994#4001994
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001994