• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
XML serialization - missing data!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

XML serialization - missing data!


  • Subject: XML serialization - missing data!
  • From: Amedeo Mantica <email@hidden>
  • Date: Fri, 28 Jul 2006 16:28:46 +0200

Hello, I have two entities

PRODUCTS
BRANDS


PRODUCTS is the entity i need to serialize

PRODUCTS attribbutes  are:
name
genericProduct (a to one relation)
brand (a to one relation)

in product java class I have this

private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException {
NSXMLOutputStream xml_stream = (NSXMLOutputStream)stream;
xml_stream.writeObject(name(),"name");
xml_stream.writeObject(brand(),"brand");
    }

and also in the other entities:

brands:

private void writeObject(java.io.ObjectOutputStream stream) throws java.io.IOException {
NSXMLOutputStream xml_stream = (NSXMLOutputStream)stream;
xml_stream.writeObject(name(),"name");
    }




when I generate the XML following the methon in Practical WebObjects book i got XML whitout errors... but XML is missing data...

only a few products have brand.name exported
I got only an instance for brand.

(if I have more product with brand.name value set to "A" i got only an object with brand exported, others don't have brand exported)

<product>
<version>
5000
</version>
<EOEditingContext>
<version>
5000
</version>
</EOEditingContext>
<_EOIntegralKeyGlobalID>
<entityName>
product
</entityName>
<subEntityName>
product
</subEntityName>
<Integer>
<value>
1080
</value>
</Integer>
</_EOIntegralKeyGlobalID>
<EOEntityClassDescription>
<entityName>
product
</entityName>
</EOEntityClassDescription>
<name>
Spatola Damascato
</name>
<brand>
<version>
5000
</version>
<_EOIntegralKeyGlobalID>
<entityName>
brand
</entityName>
<subEntityName>
brand
</subEntityName>
<Integer>
<value>
7
</value>
</Integer>
</_EOIntegralKeyGlobalID>
<EOEntityClassDescription>
<entityName>
brand
</entityName>
</EOEntityClassDescription>
<name>
Antica-Signoria BRAND
</name>
</brand>
</product>

<product>
<version>
5000
</version>
<_EOIntegralKeyGlobalID>
<entityName>
product
</entityName>
<subEntityName>
product
</subEntityName>
<Integer>
<value>
4
</value>
</Integer>
</_EOIntegralKeyGlobalID>
<name>
Agua
</name>
<brand>
<version>
5000
</version>
<_EOIntegralKeyGlobalID>
<entityName>
brand
</entityName>
<subEntityName>
brand
</subEntityName>
<Integer>
<value>
4
</value>
</Integer>
</_EOIntegralKeyGlobalID>
<name>
I.V.C. BRAND
</name>
</brand>
</product>

<product>
<version>
5000
</version>
<_EOIntegralKeyGlobalID>
<entityName>
product
</entityName>
<subEntityName>
product
</subEntityName>
<Integer>
<value>
12
</value>
</Integer>
</_EOIntegralKeyGlobalID>
<name>
Astrale
</name>
</product>

<product>
<version>
5000
</version>
<_EOIntegralKeyGlobalID>
<entityName>
product
</entityName>
<subEntityName>
product
</subEntityName>
<Integer>
<value>
13
</value>
</Integer>
</_EOIntegralKeyGlobalID>
<name>
Veronese
</name>
</product>


any suggestion??

Thanks
Amedeo




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: XML serialization - missing data! - PLEASE HELP
      • From: Amedeo Mantica <email@hidden>
  • Prev by Date: Re: Newbie : How to display 2 differents records on the same line in a table
  • Next by Date: Notification how to
  • Previous by thread: Re: Newbie : How to display 2 differents records on the same line in a table
  • Next by thread: Re: XML serialization - missing data! - PLEASE HELP
  • Index(es):
    • Date
    • Thread