Originally posted by Dario Rehman:
I noticed that the generated Java code doesn't contain the innermost complex types. Is this some bug in WSDL2Java?
Originally posted by Peer Reynders:
The behavior you are seeing is not a bug - its a feature. The the "missing" types converted to standard Java types - not their own Beans.
MyDocType maps to this:
So String2Of10ArrayOf2to7 can be found on ArrayOfStringArrays[0] through ArrayOfStringArrays[6]
And String2Of10 can be found on ArrayOfStringArrays[0][0] to ArrayOfStringArrays[0][1] up to
ArrayOfStringArrays[6][0] and ArrayOfStringArrays[6][1].
This is standard JAX-RPC WSDL-to-Java mapping. Whenever it sees a maxOccurs > 1 it will map to an array type (not an indexed property on a bean) and minOccurs other than "0" are ignored. Furthermore restrictions on the string length are ignored.
Originally posted by Peer Reynders:
String2Of10 doesn't appear as a separate class as it is basically a string. Do you want this to appear as a bean with a single string property?
String2Of10ArrayOf2to7 doesn't appear as a separate class as it is simply an array of strings. Do you want this as a bean with a single string array property or an indexed string property?
I suspect that Axis never bothered with JAX-RPC mappings files because it is just easier and more flexible to take the types that the wsdl-to-java generator produces and then write a converter to convert the generated classes to the desired object model classes. Ultimately the generated classes are just DTOs - devoid of any behavior; your object model may also choose to enforce constraints in classes that are separate from the classes the carry the data.
So if you want beans then simply write a converter - converters also tend to be very easy to unit test.
Axis does support bean mappings. However that would require that you to code you beans first and then fiddle with the wsdd until it leads to a WSDL that is "close enough" to the one you have - sounds like way too much work to me.[/QB]
Yeah, but does being a ninja come with a dental plan? And what about this tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
|