> 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

You need at least Flex 2.0.1 Hotfix 2.

The you need to create concrete classes for each of your types that
extend the abstract webservice types.

These classes need to implement the mx.rpc.xml.IXMLSchemaInstance
Interface.  This allows you to set the xsi:type that will allow your
web service call.

An example showing roughly how to do it:

-------- ChangeableParameter.as ------------
package classes.types
{
        import mx.rpc.xml.IXMLSchemaInstance;
        
        public class ChangeableParameterimplements IXMLSchemaInstance
        {
                private var _xsiType:QName;
                        
                public function ChangeableParameter() {
                }       
                
            public function get xsiType():QName {
                return _xsiType;
            }
            
            public function set xsiType(value:QName):void {
                _xsiType = value;
                return;
            }
        }
}



-------- ChangeableIntervalParameter.as ------------
package classes.types
{
        import mx.rpc.xml.IXMLSchemaInstance;

        public class Point extends ChangeableParameter implements
IXMLSchemaInstance
        {
                private var _minimum:Number;
                ....
                                
                public function ChangeableIntervalParameter() {
                }
                
                
            public function get minimum():Number {
                return _minimum;
            }
            
            public function set minimum(value:Number):void {
                _minimum = value;
                return;
            }           

                .....
        }
}



-------- WebService.as ------------
... 

                private function loadHandler(event:LoadEvent):void {
                        ....
                
                        // SearchShape - since this is an abstract type, we 
need to force
to the concrete PointN type using AS objects
                        var ChangeableIntervalParameterNS:Namespace = new
Namespace("ns1", "http://whereever/";);          
                        var params:ChangeableIntervalParameter = new
ChangeableIntervalParameter();
                        params.xsiType = new 
QName(ChangeableIntervalParameterNS,
"ChangeableIntervalParameter");
                        params.minimum = _Number(20);
                        ....
                        //Now call the web service with the args
                        var operation:AbstractOperation =
web.getOperation("NameOfWebServiceMethod");
                        operation.arguments = params;
                        operation.send();

...



Might have ran into this problem a few days ago and got help off
others with it!  That should get you started I think.

Cheers

-- 
dacf

Reply via email to