Hi,
I am trying to serialize and deserialize a SDO containing a
non-containment reference. Here is the xsd corresponding to the SDO.
<xsd:import namespace="commonj.sdo/xml"
schemaLocation="sdoXML.xsd">
</xsd:import>
<xsd:complexType mixed="true" name="InvolvedPartyImpl">
<xsd:sequence>
<xsd:element minOccurs="0" name="involvedPartySurrogate"
type="domain:SurrogateDomain" />
<xsd:element minOccurs="0" name="organizationOrPerson"
type="domain:OrganizationOrPersonDomain" />
<xsd:element minOccurs="0" name="paymentPlan"
type="bons0:PaymentPlan" maxOccurs="1">
</xsd:element>
<xsd:element minOccurs="0" name="financialTransactions"
type="bons0:FinancialTransactions">
</xsd:element>
<xsd:element minOccurs="0" name="refInvolvedParty"
type="bons0:InvolvedPartyImpl" maxOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="PaymentPlan">
<xsd:sequence>
<xsd:element minOccurs="0" name="PaymentPlanName"
type="xsd:string">
</xsd:element>
<xsd:element minOccurs="0" name="PaymentPlanID"
type="xsd:int">
</xsd:element>
<xsd:element minOccurs="0" name="refInvolvedParty"
type="xsd:anyURI" sdoXML:propertyType="InvolvedPartyImpl">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="FinancialTransaction">
<xsd:sequence>
<xsd:element minOccurs="0" name="financialTransaction"
type="xsd:double">
</xsd:element>
<xsd:element minOccurs="0" name="financialTransactionID"
type="xsd:long">
</xsd:element>
<xsd:element minOccurs="0" name="refInvolvedParty"
type="xsd:anyURI" sdoXML:propertyType="InvolvedPartyImpl"
maxOccurs="1">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="FinancialTransactions">
<xsd:sequence>
<xsd:element minOccurs="0" name="financialTransaction"
type="bons0:FinancialTransaction" maxOccurs="unbounded">
</xsd:element>
</xsd:sequence>
</xsd:complexType>
As you can see the payment plan contains a reference to an involved party.
When the referenced involved party is present in the same data graph
as the payment plan, here is the serialized xml i am getting.
<?xml version="1.0" encoding="UTF-8"?>
<p:InvolvedPartyImpl xsi:type="p:InvolvedPartyImpl"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:p="http://www.abc.com/edm/entities">
<financialTransactions>
<financialTransaction>
<financialTransactionID>13</financialTransactionID>
</financialTransaction>
<financialTransaction>
<financialTransactionID>12</financialTransactionID>
</financialTransaction>
</financialTransactions>
<involvedPartySurrogate>23</involvedPartySurrogate>
<paymentPlan>
<PaymentPlanID>12</PaymentPlanID>
*<refInvolvedParty>
BusinessObject: [EMAIL PROTECTED]
(:mixed=[entities:involvedPartySurrogate=24],
involvedPartySurrogate=24)
</refInvolvedParty>*
</paymentPlan>
<refInvolvedParty>
<involvedPartySurrogate>24</involvedPartySurrogate>
</refInvolvedParty>
</p:InvolvedPartyImpl>
And I am having problems deserializing the reference involved party
obtained.
Could you let me know if there is any special trick to be applied while
serializing or deserializing a
non-containment reference and is it specific to any implementation?
Thanks
Santhosh