This content has been marked as final.
Show 2 replies
-
1. Re: Serializer results in stack overflow
thomas.diesler Nov 11, 2005 5:36 AM (in response to bogsolomon)With SOAP encoding you can have an ID attribute with SOAP encoded elements and use HREF that references them. With literal encoding this is not allowed.
Jason wrote
Literal bindings require the literal data be a 1 to 1 translation to valid schema (which has no native concept of representing a circular graph, and explicitly forbids them). If there is a need to represent circular data, then that is up to the developer to define custom elements or attributes in their schema to represent these link associations. So you could define something like
However it is your responsibility to transform the id fields to an object reference.<xs:complexType name="employeeType"> <xs:sequence> <xs:element name="id" type="xsd:int"/> <xs:element name="manager" type="xsd:int"/> </xs:sequence> </xs:complexType>
Bottome line: it is not supported with ws4ee, which only allows literal encoding -
2. Re: Serializer results in stack overflow
bogsolomon Nov 11, 2005 8:57 AM (in response to bogsolomon)Thank you very much. I have solved the problem by creating a custom serializer that adds an ID to the object as an attribute and then when the same object is meant to be serialized again just creates it as null with two attributes specifying that it is a reference and the ID. Not really a portable solution but it works very nicely.