axis2 array of object that contains a list
I have to return an object using axis2 webservice. The object contains a list of other object. The WSDL shows up as xs:anyType. When retreiving the object from client it shows up as org.apache.axiom.om.i开发者_Go百科mpl.llom.OMElementImpl
how to use axis2 to retreive an object that contains a list
You cannot take a complex object, return it with a web service and expect the client to reconstruct a object perfectly identical to the original. Remember the wsdl is an abstraction of the web service implementation. Also, clients may be written in a language with a different feature set.
The trick is to have your web services return data types that are as simple as possible. Anything from elementary types to simple java beans based on elementary types will work well. In your case, return an array instead of a List.
I have mentionned Java because it sounded like you could be using this language. It may not be the case, but the general rules I have outlined still apply.
Phillippe A. is right.
Instead of lists of objects, you want to return arrays of objects.
精彩评论