I am using JAXWS webservices framework. I am positive that the java side 
is ok, since I can see the produced schema and WSDL and I see the 
contents of the requests Flex is dispatching.

Do you know by any chance how Flex SOAP impl. handles inheritance ? 
(extended types in schema). I do not see it supports the xsi:type 
approach, and I do not see that it uses any other way, so basically by 
looking on the SOAP requests produced by Flex you can not tell what the 
implementation of a class is being sent, if the reference is to a base 
class.

Furthermore I think that Flex has a bug, and it sends the contents of a 
derived object ONLY if the base class has not properties at all.

Regards,
Dima Gutzeit.

[EMAIL PROTECTED] wrote:
> What java webservice technology are you using?  We've had issues with 
> weblogic webservices not serializing or deserializing base class proprerties 
> on the java side, we've also had some fun with apache's axis, have you 
> confirmed the java side is well tested before trying to consume those 
> services from flex ?
>
> Grant
>
> ----- Original Message -----
> From: Dima Gutzeit [EMAIL PROTECTED]
> To: [email protected]
> Sent: 1/12/07 10:01 PM
> Subject: [flexcoders] Webservices request serialization issues.
>
>   
>> Hi,
>>
>> I am using Flex 2.0.1 based application to communicate with web services 
>> written in Java (JAXWS). 
>> System should send requests using complex objects with nested structure and 
>> it does it ok.
>>
>> The problem appears when I have inheritance in the object graph.
>>
>> I have base class X , two derived classes, Y and Z, and two more YA and ZA.
>> x -> y -> ya
>>
>> x -> z -> za
>>
>> X contains common fields such as ID and NAME.
>>
>> Object that I send contains reference to the base class X, but the instance 
>> of the objects is YA or ZA.
>>
>> When the request is being sent, I can see only the common properties taken 
>> from X, and none of the impl specific fields, although wsdl/schema defines 
>> those.
>>
>> When I change the reference type to Y or Z I get the same behavior, so the 
>> only way is to define reference to YA and ZA directly, which is not a nice 
>> way to go.
>>
>> Now the funny part that the situation is being solved if I move the common 
>> fields from x to y and z (duplicate the fields), and leave the X class empty 
>> !!!
>> But this approach stops working if I use array of objects, and not only one.
>>
>> Can anyone shed some light of the serialization logic in case of inheritance?
>>
>> One more thing, what is the way Flex deals with inheritance when reference 
>> is not the final impl, but to the base class ??? Other WS entities would use 
>> techniques such as "xsi:type" definitions in the dispatched XML ...
>>
>> For now I am solving it by adding field to each derived class, with the 
>> actual class name, catch it on the server side, and add xsi:type manually, 
>> but this way is not the one I would like to stick with ....
>>
>> Thanks in advance.
>>
>> Regards,
>> Dima Gutzeit.
>>     
>
>
>   

Reply via email to