Hi:
        When I un-serialize a static sdo object from ObjectInputStream, I
got a dynamic sdo object;
        It's a surprise , and will cause some potential problem, etc, when I
use static sdo with RMI. 
        Does any one knows the reason , Or Where I use the static sdo
un-correctly?
        My test program is very simple, it just serialize a static sdo to a
byte[] and un-serialize from the byte[];  For convenience, the test program,
schema, ant build to generate static sdo is attached in the mail.

Thanks for any suggestion


<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"; targetNamespace="http://test/choice"; xmlns:ns="http://test/choice";>
<xs:element name="A">
	<xs:complexType>
		<xs:sequence>
			<xs:element name="a" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
</xs:element>
</xs:schema>

Attachment: TrySerializer.java
Description: Binary data

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE project [<!ENTITY buildfile SYSTEM "file:./build-user.xml">]>
<!-- WARNING: Eclipse autogenerated file. 
              Any modifications will be overwritten.
              Please edit build-user.xml instead.
-->
<project basedir="." default="generate-sdo" name="TryStaticSDO">
    &buildfile;
    <path id="project.classpath">
        <pathelement location="bin"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/sample-sdo-1.1.1.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/stax-api-1.0.1.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/backport-util-concurrent-3.0.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/wstx-asl-3.2.1.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/common-2.2.3.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/ecore-2.2.3.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/ecore-change-2.2.3.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/ecore-xmi-2.2.3.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/xsd-2.2.3.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/tuscany-sdo-api-r2.1-1.1.1.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/tuscany-sdo-lib-1.1.1.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/tuscany-sdo-impl-1.1.1.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/codegen-2.2.3.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/codegen-ecore-2.2.3.jar"/>
        <pathelement location="D:/tools/java/apache-tuscany/tuscany-sdo-1.1.1/lib/tuscany-sdo-tools-1.1.1.jar"/>
    </path>
    <target name="init">
        <mkdir dir="bin"/>
    </target>
    <target name="generate-sdo" depends="init">
        <java classname="org.apache.tuscany.sdo.generate.XSD2JavaGenerator" fork="true">
            <arg value="-targetDirectory"/>
            <arg value="target/sdo-source"/>
            <!--
            <arg value="-javaPackage"/>
            <arg value="helloworld"/>
            <arg value="-prefix"/>
            <arg value="Helloworld"/>
            -->
            <arg value="-noNotification"/>
            <arg value="-noContainment"/>
            <arg value="-noUnsettable"/>
            <arg value="simple.xsd"/>

            <classpath refid="project.classpath"/>
        </java>
    </target>
</project>

Reply via email to