Re: Serializing non-containment reference

2008-06-16 Thread Frank Budinsky
Hi Santhosh,

My guess is your schema definition has errors.

You should have something like this on the  element:

xmlns:tns="... your models targetNamespace..."
xmlns:sdoXML="commonj.sdo/xml"

and then the the cross reference declared like this:

sdoXML:propertyType="tns:InvolvedPartyImpl"

Also, I don't believe you need this import:

 
 

since the annotation namespaces are automatically available.

Frank.

"Santhosh Adiga" <[EMAIL PROTECTED]> wrote on 06/16/2008 05:11:30 AM:

> Hi,
> 
>   I am trying to serialize and deserialize a SDO containing a
> non-containment reference. Here is the xsd corresponding to the SDO.
> 
>  schemaLocation="sdoXML.xsd">
> 
> 
> 
>  type="domain:SurrogateDomain" />
>  type="domain:OrganizationOrPersonDomain" />
>  type="bons0:PaymentPlan" maxOccurs="1">
> 
>  type="bons0:FinancialTransactions">
> 
>  type="bons0:InvolvedPartyImpl" maxOccurs="1">
> 
> 
> 
> 
> 
>  type="xsd:string">
> 
>  type="xsd:int">
> 
>  type="xsd:anyURI" 
sdoXML:propertyType="InvolvedPartyImpl">
> 
> 
> 
> 
> 
>  type="xsd:double">
> 
>  type="xsd:long">
> 
>  type="xsd:anyURI" 
sdoXML:propertyType="InvolvedPartyImpl"
> maxOccurs="1">
> 
> 
> 
> 
> 
>  type="bons0:FinancialTransaction" maxOccurs="unbounded">
> 
> 
> 
> 
> 
> 
> 
> 
> 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.
> 
> 
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:p="http://www.abc.com/edm/entities";>
> 
> 
> 13
> 
> 
> 12
> 
> 
> 23
> 
> 12
> *
> BusinessObject: [EMAIL PROTECTED]
> (:mixed=[entities:involvedPartySurrogate=24],
> involvedPartySurrogate=24)
> *
> 
> 
> 24
> 
> 
> 
> 
> 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



Serializing non-containment reference

2008-06-16 Thread Santhosh Adiga
Hi,

  I am trying to serialize and deserialize a SDO containing a
non-containment reference. Here is the xsd corresponding to the SDO.














































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.


http://www.w3.org/2001/XMLSchema-instance";
xmlns:p="http://www.abc.com/edm/entities";>


13


12


23

12
*
BusinessObject: [EMAIL PROTECTED]
(:mixed=[entities:involvedPartySurrogate=24],
involvedPartySurrogate=24)
*


24




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