--- In [email protected], "Hans" <[EMAIL PROTECTED]> wrote: > > Hi list, > > I use a webservice method that needs a collection of a certain type. > This type is an abstract class of which 2 implementations exist. If I > call this method and pass in an arraycollection with 2 instances (one > for each implementation), it occurs that the SOAP request being > created ignores the fact that it concerns a subclass. In other words > the only thing included in the webservice request are the fields from > the abstract class, and none of the fields of the subclass. > There is nothing wrong with the wsdl because when I test the same > thing with a java client, everything works perfectly (!) > > Here's an extract of the wsdl: >
You need to make a concrete class for ChangeableIntervalParameter that implements the IXMLSchemaInstance interface. That will allow you to hint to the SOAPEncoder the exact xsi:type you want. Then make a ChangeableSelectionParameter class that extends the ChangeableIntervalParameter and has get/set for each of the properties of the actual type you are trying to create. When you make up the parameters to pass into the web service, instantiate the ChangeableSelectionParameter class (along with a QName) and populate with the arguments and pass that into the web service. Since you have implemented the IXMLSchemaInstance, the SOAPEncoder will be able to correctly work out the type of the arguments and it will work. You need Flex 2.0.1 Hotfix 1 to do this, you can use the docs for Flex 3 to reference - http://livedocs.adobe.com/labs/flex3/langref/mx/rpc/xml/IXMLSchemaInstance.html Hehe, someone else helped me out with this just last week! Cheers -- dacf

