summaryrefslogtreecommitdiffstats
path: root/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test
diff options
context:
space:
mode:
Diffstat (limited to 'sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test')
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/.cdtbuild59
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs9
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xml22
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xsd35
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Customer.xsd50
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Order.xsd67
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48601.xsd46
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xml31
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xsd42
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xml30
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xsd49
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xml.txt42
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xsd.txt29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Atom1.0.xsd205
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xml29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xsd102
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Catalog.xsd34
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Customer.xsd47
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Makefile.am33
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xml27
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xsd103
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Order.xsd59
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Readme.txt108
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/SdoGenerate.cpp169
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/StockQuoteService.wsdl176
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style1.xsd72
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style2.xsd74
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style3.xsd74
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style4.xsd80
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingSchema.xsd103
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingUsingSchema.xml67
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/axis.xsd40
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xml27
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xsd79
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46633.txt8
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46634_out.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46693.xsd176
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.txt6
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.xsd32
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.txt31
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.xsd59
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47293.txt27
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48602.xsd29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xml29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633_xml.txt10
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b.xsd26
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b_xsd.txt31
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xml29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xsd36
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xml.txt36
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xsd.txt26
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xml30
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xml.txt46
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xsd.txt28
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/badelement.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups.xsd44
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups_xsd.txt29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename.xsd44
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename_xsd.txt29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug2.txt9
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug45933-output.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xml174
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xsd84
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xml.txt424
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xsd.txt58
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xml41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xsd64
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/include.xsd69
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok1.xsd34
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok2.xsd33
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok3.xsd32
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.txt1
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.xsd_safe.txt53
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-outxml.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/buniqueread-out.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator.xsd32
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2.wsdl90
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2a.wsdl88
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/carotest3.txt36
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-in.xml29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-out.xml2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata.xsd39
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-in.xml29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out-win.xml8
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out.xml9
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone.xsd33
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company.xsd50
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xml30
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xsd49
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companyabs.xsd65
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companyref.xsd67
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companysubs.xsd64
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload-output.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload2-output.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload3-output.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cssave-output.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cssave2-output.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/datetest.txt4
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/defaults.txt10
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xml27
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xsd48
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq.xsd40
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq_expected.xml4
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/employee.xsd45
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs1.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs2.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs3.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xml30
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xsd49
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/extension.xsd58
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xml49
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xsd92
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gCustomer.xsd50
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xml21
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xsd58
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g3.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/getproptest.txt8
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham1.xsd40
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham2.xsd39
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham3.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup.xsd45
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup_xsd.txt25
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup.xsd45
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup_xsd.txt29
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate.xsd37
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate_xsd.txt26
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix.xsd37
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix_xsd.txt26
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwrongname.xsd38
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/inc1.txt22
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/inc2.txt21
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include.xsd34
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include1.xsd38
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include2.xsd37
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/includeother3.xsd34
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira1112expected.xml9
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira490.txt53
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira705.xsd31
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira705_out.txt5
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_animaltypes.xsd39
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle.xsd28
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle_out.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle.xsd28
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle_out.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_splitJungle_out.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xml32
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xsd40
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xml.txt70
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xsd.txt28
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/loadload-output.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/main.cpp206
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/maintest.txt188
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/many.xml33
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/many.xsd21
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/matttest1.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/merle1.txt10
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my-core.xsd40
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my-implementation-local-java.xsd43
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my.xsd31
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/noschema.xml2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/notns.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xml30
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xsd43
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nulltest.txt91
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/oddchars.txt22
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xml32
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xsd53
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xml32
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xsd28
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNSout.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openseq.txt3
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/order1.txt19
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/order2.txt19
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/overlappingtypes.xsd57
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/partial.xml33
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/person.xsd34
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xml40
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xsd42
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/qualified.xml2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/querytest.txt17
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/saveopen-output.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-sca.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-webservice.xsd40
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-ws.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-core.xsd233
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-dll.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-java.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-local-java.xsd43
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-cpp.xsd68
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-java.xsd44
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-wsdl.xsd43
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-java.xsd43
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-xsd.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca.xsd41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario1.txt10
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario2.txt8
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario3.txt22
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario4.txt108
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario5.txt8
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.cpp9322
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.h219
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest2.cpp2064
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sequence.txt45
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/setmany.txt24
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/setnull.txt42
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/showdefault1.txt15
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/showdefault2.txt18
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.txt8
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xml21
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xsd23
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock.wsdl407
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock.xml45
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock_wsdl.txt47
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock_xml.txt127
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/include3.xsd34
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother.xsd34
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother1.xsd38
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother2.xsd37
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/include3.xsd35
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother.xsd34
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother1.xsd38
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother2.xsd37
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test2/includeother3.xsd35
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testabstract.txt5
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testerrors.txt5
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testinc2.txt21
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testopen.txt24
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testopen3.xml21
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testorder.txt19
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/teststyles.txt93
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testsubsload.txt7
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testutils.txt100
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.xml22
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/travel.txt146
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.out.xml.txt2
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xml21
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xsd44
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/types.xsd34
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/userdata.txt10
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/utils.cpp553
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_in.xml60
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_out.txt41
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract.xsd44
-rw-r--r--sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract_expected.xml4
248 files changed, 22707 insertions, 0 deletions
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/.cdtbuild b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/.cdtbuild
new file mode 100644
index 0000000000..17ebd43324
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/.cdtbuild
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?fileVersion 3.0.0?>
+
+<ManagedProjectBuildInfo>
+<project id="tuscany_sdo_test.cdt.managedbuild.target.gnu.exe.841259234" name="Executable (Gnu)" projectType="cdt.managedbuild.target.gnu.exe">
+<configuration artifactName="tuscany_sdo_test" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.exe.debug.1698024418" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.953243590" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.exe.debug.907958268" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug.829396762" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.debug">
+<option id="gnu.cpp.compiler.option.preprocessor.def.1484983546" superClass="gnu.cpp.compiler.option.preprocessor.def" valueType="definedSymbols">
+<listOptionValue builtIn="false" value="_DEBUG"/>
+</option>
+<option id="gnu.cpp.compiler.option.include.paths.1537573101" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${project_loc}"/>
+<listOptionValue builtIn="false" value="${project_loc}/../src"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.exe.debug.1017750405" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.debug"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug.655773583" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.debug">
+<option id="gnu.cpp.link.option.libs.684950781" superClass="gnu.cpp.link.option.libs" valueType="libs">
+<listOptionValue builtIn="false" value="tuscany_sdo"/>
+<listOptionValue builtIn="false" value="xml2"/>
+</option>
+<option id="gnu.cpp.link.option.paths.507838253" superClass="gnu.cpp.link.option.paths" valueType="stringList">
+<listOptionValue builtIn="false" value="${project_loc}/../src/Debug"/>
+<listOptionValue builtIn="false" value="${LIBXML2_LIB}"/>
+</option>
+</tool>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.exe.debug.680127870" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.debug"/>
+<macros/>
+</toolChain>
+</configuration>
+<configuration artifactName="tuscany_sdo_test" cleanCommand="rm -rf" description="" errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser" id="cdt.managedbuild.config.gnu.exe.release.1720042110" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
+<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.1008721532" name="GCC Tool Chain" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.compiler.exe.release.1386443308" name="GCC C Compiler" superClass="cdt.managedbuild.tool.gnu.c.compiler.exe.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release.666703052" name="GCC C++ Compiler" superClass="cdt.managedbuild.tool.gnu.cpp.compiler.exe.release">
+<option id="gnu.cpp.compiler.option.include.paths.1488475926" superClass="gnu.cpp.compiler.option.include.paths" valueType="includePath">
+<listOptionValue builtIn="false" value="${project_loc}/../src"/>
+<listOptionValue builtIn="false" value="${project_loc}"/>
+</option>
+</tool>
+<tool command="gcc" id="cdt.managedbuild.tool.gnu.c.linker.exe.release.87016949" name="GCC C Linker" superClass="cdt.managedbuild.tool.gnu.c.linker.exe.release"/>
+<tool command="g++" id="cdt.managedbuild.tool.gnu.cpp.linker.exe.release.4247100" name="GCC C++ Linker" superClass="cdt.managedbuild.tool.gnu.cpp.linker.exe.release">
+<option id="gnu.cpp.link.option.libs.73989122" superClass="gnu.cpp.link.option.libs" valueType="libs">
+<listOptionValue builtIn="false" value="xml2"/>
+<listOptionValue builtIn="false" value="tuscany_sdo"/>
+</option>
+<option id="gnu.cpp.link.option.paths.984022714" superClass="gnu.cpp.link.option.paths" valueType="stringList">
+<listOptionValue builtIn="false" value="${project_loc}/../src/Debug"/>
+<listOptionValue builtIn="false" value="${LIBXML2_LIB}"/>
+</option>
+</tool>
+<tool command="as" id="cdt.managedbuild.tool.gnu.assembler.exe.release.937369355" name="GCC Assembler" superClass="cdt.managedbuild.tool.gnu.assembler.exe.release"/>
+<macros/>
+</toolChain>
+</configuration>
+<macros/>
+</project>
+</ManagedProjectBuildInfo>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs
new file mode 100644
index 0000000000..0c77f0af0f
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/.settings/org.eclipse.cdt.managedbuilder.core.prefs
@@ -0,0 +1,9 @@
+#Wed Feb 15 16:37:24 GMT 2006
+eclipse.preferences.version=1
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.debug.1698024418=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentInclude/cdt.managedbuild.config.gnu.exe.release.1720042110=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="CPATH" operation\="remove"/>\n<variable name\="CPLUS_INCLUDE_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.debug.1698024418=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/buildEnvironmentLibrary/cdt.managedbuild.config.gnu.exe.release.1720042110=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable name\="LIBRARY_PATH" operation\="remove"/>\n</environment>\n
+environment/project=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment/>\n
+environment/project/cdt.managedbuild.config.gnu.exe.debug.1698024418=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable delimiter\="" name\="LIBXML2_LIB" operation\="replace" value\="/usr/lib"/>\n</environment>\n
+environment/project/cdt.managedbuild.config.gnu.exe.release.1720042110=<?xml version\="1.0" encoding\="UTF-8"?>\n<environment>\n<variable delimiter\="" name\="LIBXML2_LIB" operation\="replace" value\="/usr/lib"/>\n</environment>\n
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xml
new file mode 100644
index 0000000000..43f4e46e1b
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<catalog xmlns="catalogNS" xsi:type="CatalogType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><item xmlns="orderNS"><itemId>1</itemId><description>A Partridge in a Pear Tree</description><price>1.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>2</itemId><description>Turtle Doves</description><price>2.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>3</itemId><description>French Hens</description><price>3.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>4</itemId><description>Calling Birds</description><price>4.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>5</itemId><description>Golden Rings</description><price>5.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>6</itemId><description>Geese a-laying</description><price>6.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>7</itemId><description>Swans a-swimming</description><price>7.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>8</itemId><description>Maids a-milking</description><price>8.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>9</itemId><description>Ladies dancing</description><price>9.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>10</itemId><description>Lords a-leaping</description><price>10.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>11</itemId><description>Pipers piping</description><price>11.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item><item><itemId>12</itemId><description>Drummers drumming</description><price>12.99</price><quantity>0</quantity><warehouseId>1</warehouseId></item></catalog>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xsd
new file mode 100644
index 0000000000..f8f1cb9d47
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Catalog.xsd
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:cat="catalogNS" xmlns:ord="orderNS" targetNamespace="catalogNS">
+
+ <include schemaLocation="Order.xsd"/>
+
+ <element name="catalog" type="cat:CatalogType"/>
+
+ <complexType name="CatalogType">
+ <sequence>
+ <element maxOccurs="unbounded" ref="ord:item"/>
+ </sequence>
+ </complexType>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Customer.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Customer.xsd
new file mode 100644
index 0000000000..948dd07e85
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Customer.xsd
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:cust="customerNS" targetNamespace="customerNS">
+ <element name="customer" type="cust:CustomerType">
+ <complexType name="CustomerType">
+ <sequence>
+ <element name="customerId" type="ID"/>
+ <element name="name" type="string"/>
+ <element name="shipping" type="cust:AddressType">
+ <complexType name="AddressType">
+ <element name="street" type="string"/>
+ <element name="city" type="string"/>
+ <element name="state" type="string"/>
+ <element name="zip" type="string"/>
+ </complexType>
+ </element>
+ <element name="payment" ref="cust:payment"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="payment" type="cust:PaymentType">
+ <complexType name="PaymentType">
+ <element name="paymentId" type="ID"/>
+ <element name="accountNo" type="string"/>
+ <element name="bank" type="string"/>
+ <element name="securityCode" type="string"/>
+ <element name="amount" type="string"/>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Order.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Order.xsd
new file mode 100644
index 0000000000..b11fce2e60
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/47293Order.xsd
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+xmlns:ord="orderNS" xmlns:cust="customerNS" targetNamespace="orderNS">
+
+ <include schemaLocation="./Customer.xsd"/>
+
+ <element name="orders" type="ord:OrdersType">
+ <complexType name="OrdersType">
+ <sequence>
+ <element name="order" maxOccurs="unbounded" type="ord:OrderType"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="order" type="ord:OrderType">
+ <complexType name="OrderType">
+ <sequence>
+ <element name="orderId" type="ID"/>
+ <element name="status" type="ord:OrderStatus"/>
+ <element name="item" maxOccurs="unbounded" ref="ord:item"/>
+ <element ref="cust:customer"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="item">
+ <complexType>
+ <element name="itemId" type="integer"/>
+ <element name="description" type="string"/>
+ <element name="price" type="string"/>
+ <element name="quantity" type="integer"/>
+ <element name="warehouseId" type="integer"/>
+ </complexType>
+ </element>
+
+ <simpleType name="OrderStatus">
+ <restriction base="string">
+ <enumeration value="NONE"/>
+ <enumeration value="RECEIVED"/>
+ <enumeration value="INVOICED"/>
+ <enumeration value="DISPATCHED"/>
+ <enumeration value="COMPLETED"/>
+ <enumeration value="CANCELLED"/>
+ </restriction>
+ </simpleType>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48601.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48601.xsd
new file mode 100644
index 0000000000..9e0b117520
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48601.xsd
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+<xs:complexType name="product">
+ <xs:sequence>
+ <xs:element name="brand" type="xs:string"/>
+ <xs:element name="size" type="available_sizes"/>
+ </xs:sequence>
+</xs:complexType>
+
+<xs:simpleType name='available_sizes'>
+ <xs:union>
+ <xs:simpleType>
+ <xs:restriction base='nonNegativeInteger'/>
+ </xs:simpleType>
+ <xs:simpleType>
+ <xs:restriction base='string'>
+ <xs:enumeration value='large'/>
+ <xs:enumeration value='small'/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:union>
+</xs:simpleType>
+
+</xs:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xml
new file mode 100644
index 0000000000..0197503c98
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<name
+ xmlns="http://www.wrox.com/name"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchem-Instance"
+ xsi:schemaLocation="http://www.wrox.com/name name.xsd">
+ <first>John</first>
+ <middle>Fitzgerald</middle>
+ <last>Doe</last>
+ <ages>1 2 3</ages>
+</name>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xsd
new file mode 100644
index 0000000000..45678b9a30
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48686.xsd
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.wrox.com/name"
+ xmlns:tns="http://www.wrox.com/name">
+
+ <element name="name">
+ <complexType>
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ <element name="ages">
+ <simpleType>
+ <list itemType="positiveInteger"/>
+ </simpleType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xml
new file mode 100644
index 0000000000..97ab07c448
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<formalname
+ xmlns="TNS"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchem-Instance"
+ xsi:schemaLocation="http://www.wrox.com/name name.xsd"
+ title="Mr.">
+ <last>Doe</last>
+</formalname>
+
+
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xsd
new file mode 100644
index 0000000000..fa2bf9ef75
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="TNS"
+ xmlns:tns="TNS">
+
+ <complexType name="FormalNameType">
+ <complexContent>
+ <restriction base="tns:NameType">
+ <sequence>
+ <element ref="tns:last"/>
+ </sequence>
+ </restriction>
+ </complexContent>
+ </complexType>
+
+
+ <complexType name="NameType">
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ </sequence>
+ <attribute name="title" type="string"/>
+ </complexType>
+
+ <element name="formalname" type="tns:FormalNameType"/>
+ <element name="last" type="string"/>
+
+</schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xml.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xml.txt
new file mode 100644
index 0000000000..d7b9d4b8d4
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xml.txt
@@ -0,0 +1,42 @@
+***** TYPES AFTER RESOLVE*********************************
+Type:TNS#FormalNameType
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+Type:TNS#NameType
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+Type:TNS#RootType
+Property:formalname of type FormalNameType
+Property:last of type String
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+*******************************END TYPES******************
+===== DataObject contents =====
+first:string:
+
+middle:string:
+
+last:string:Doe
+
+title:string:Mr.
+
+===== End DataObject =====
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xsd.txt
new file mode 100644
index 0000000000..822a05ec7f
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/48736_xsd.txt
@@ -0,0 +1,29 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:TNS#FormalNameType
+Property:last of type String
+Type:TNS#NameType
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+Type:TNS#RootType
+Property:formalname of type FormalNameType
+Property:last of type String
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Atom1.0.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Atom1.0.xsd
new file mode 100644
index 0000000000..a421b56c69
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Atom1.0.xsd
@@ -0,0 +1,205 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema targetNamespace="http://www.w3.org/2005/Atom"
+ xmlns="http://www.w3.org/2005/Atom" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd" />
+ <xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="xhtml1.xsd" />
+
+ <xs:element name="feed" type="feedType"/>
+ <xs:element name="entry" type="entryType"/>
+
+ <xs:complexType name="feedType">
+ <xs:complexContent>
+ <xs:extension base="sourceType">
+ <xs:sequence>
+ <xs:element name="entry" type="entryType" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attributeGroup ref="commonAttributes" />
+ </xs:extension>
+ </xs:complexContent>
+ </xs:complexType>
+
+ <xs:complexType name="entryType">
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="author" type="personConstruct" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="category" type="categoryType" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="content" type="contentType" minOccurs="0" />
+ <xs:element name="contributor" type="personConstruct" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="id" type="idType" />
+ <xs:element name="link" type="linkType" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="published" type="dateConstruct" minOccurs="0" />
+ <xs:element name="rights" type="textConstruct" minOccurs="0" />
+ <xs:element name="source" type="sourceType" minOccurs="0" />
+ <xs:element name="summary" type="textConstruct" maxOccurs="0" />
+ <xs:element name="title" type="textConstruct" />
+ <xs:element name="updated" type="dateConstruct" />
+ <xs:element name="extension" type="extensionType" minOccurs="0" maxOccurs="unbounded" />
+ </xs:choice>
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:complexType>
+
+ <xs:complexType name="sourceType">
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="author" type="personConstruct" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="category" type="categoryType" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="contributor" type="personConstruct" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="generator" type="generatorType" minOccurs="0" />
+ <xs:element name="icon" type="iconType" minOccurs="0" />
+ <xs:element name="id" type="idType" />
+ <xs:element name="link" type="linkType" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="logo" type="logoType" minOccurs="0" />
+ <xs:element name="rights" type="textConstruct" minOccurs="0" />
+ <xs:element name="subtitle" type="textConstruct" minOccurs="0" />
+ <xs:element name="title" type="textConstruct" />
+ <xs:element name="updated" type="dateConstruct" />
+ <xs:element name="extension" type="extensionType" minOccurs="0" maxOccurs="unbounded" />
+ </xs:choice>
+ </xs:complexType>
+
+ <xs:complexType name="personConstruct">
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="name" type="xs:string" />
+ <xs:element name="uri" type="uriType" minOccurs="0" />
+ <xs:element name="email" type="emailType" minOccurs="0" />
+ <xs:element name="extension" type="extensionType" minOccurs="0" maxOccurs="unbounded" />
+ </xs:choice>
+ </xs:complexType>
+
+ <xs:complexType name="categoryType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="term" type="xs:string" use="required" />
+ <xs:attribute name="scheme" type="uriType" />
+ <xs:attribute name="label" type="xs:string" />
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ <!-- TODO: undefinedContent - beyond string? -->
+ </xs:complexType>
+
+ <xs:complexType name="generatorType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="uri" type="uriType" />
+ <xs:attribute name="version" type="xs:string" />
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:complexType name="iconType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:complexType name="idType">
+ <xs:simpleContent>
+ <xs:extension base="uriType">
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:complexType name="logoType">
+ <xs:simpleContent>
+ <xs:extension base="uriType">
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:complexType name="contentType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="type" type="xs:string" />
+ <xs:attribute name="src" type="uriType" minOccurs="0" />
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:complexType>
+
+ <xs:complexType name="linkType">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="href" type="uriType" use="required" />
+ <xs:attribute name="rel" type="uriType" /> <!-- { atomNCName | atomUri }? -->
+ <xs:attribute name="type" type="mediaType" />
+ <xs:attribute name="hreflang" type="languageTagType" />
+ <xs:attribute name="title" type="xs:string" />
+ <xs:attribute name="length" type="xs:string" />
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:simpleType name="languageTagType">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[A-Za-z]{1,8}(-[A-Za-z0-9]{1,8})*" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="mediaType">
+ <xs:restriction base="xs:string">
+ <xs:pattern value=".+/.+" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="emailType">
+ <xs:restriction base="xs:string">
+ <xs:pattern value=".+@.+" />
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:complexType name="textConstruct" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:attribute name="type" type="xs:string" />
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:complexType>
+
+ <xs:complexType name="dateConstruct">
+ <xs:simpleContent>
+ <xs:extension base="xs:dateTime">
+ <xs:attributeGroup ref="commonAttributes"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+
+ <xs:simpleType name="uriType" type="xs:string" />
+
+ <xs:complexType name="extensionType" mixed="true">
+ <xs:sequence>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+ </xs:sequence>
+ <xs:anyAttribute />
+ </xs:complexType>
+
+ <xs:attributeGroup name="commonAttributes">
+ <xs:attribute ref="xml:base" />
+ <xs:attribute ref="xml:lang" />
+ <xs:anyAttribute/>
+ </xs:attributeGroup>
+
+</xs:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xml
new file mode 100644
index 0000000000..180b050bf5
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<Holiday xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="TravelBookingSchema.xsd">
+ <Flight flightNo="BA243">
+ <Departure>NCE</Departure>
+ <Arrival>PAR</Arrival>
+ <ThisJustAintPartOfTheSchema>DATA</ThisJustAintPartOfTheSchema>
+ </Flight>
+</Holiday>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xsd
new file mode 100644
index 0000000000..dd1f296a3a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/BadElement.xsd
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="Holiday">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Flight" maxOccurs="unbounded" minOccurs="1"/>
+ <xsd:element ref="Hotel" maxOccurs="unbounded" minOccurs="1"/>
+ <xsd:element ref="Excursion"/>
+ <xsd:element ref="Client"/>
+ <xsd:element ref="Party"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Flight">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Departure" type="xsd:string"/>
+ <xsd:element name="Arrival" type="xsd:string"/>
+ </xsd:sequence>
+ <xsd:attribute name="flightNo" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Hotel">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Name"/>
+ <xsd:element name="Phone" type="xsd:string"/>
+ <xsd:element ref="Room"/>
+ </xsd:sequence>
+ <xsd:attribute name="cardsAccepted" default="false" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Room">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="booked" use="required" type="xsd:boolean"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Party">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Person" maxOccurs="unbounded" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Person">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Name"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Client">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Name"/>
+ <xsd:element name="Address" type="xsd:string"/>
+ <xsd:element name="CreditCard" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Excursion">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Title" type="xsd:string"/>
+ <xsd:element name="Cost" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Name" type="xsd:string"/>
+</xsd:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Catalog.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Catalog.xsd
new file mode 100644
index 0000000000..2c3708285a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Catalog.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:cat="catalogNS" targetNamespace="catalogNS">
+
+ <include schemaLocation="./Order.xsd"/>
+
+ <element name="catalog" type="cat:CatalogType"/>
+
+ <complexType name="CatalogType">
+ <sequence>
+ <element maxOccurs="unbounded" ref="ord:item"/>
+ </sequence>
+ </complexType>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Customer.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Customer.xsd
new file mode 100644
index 0000000000..1f21545592
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Customer.xsd
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:cust="customerNS" targetNamespace="customerNS">
+ <element name="customer" type="cust:CustomerType">
+ <complexType name="CustomerType">
+ <sequence>
+ <element name="customerId" type="ID"/>
+ <element name="name" type="string"/>
+ <element name="shipping" type="cust:AddressType">
+ <complexType name="AddressType">
+ <element name="street" type="string"/>
+ <element name="city" type="string"/>
+ <element name="state" type="string"/>
+ <element name="zip" type="string"/>
+ </complexType>
+ </element>
+ <element name="payment" type="cust:PaymentType">
+ <complexType name="PaymentType">
+ <element name="accountNo" type="string"/>
+ <element name="bank" type="string"/>
+ <element name="securityCode" type="string"/>
+ <element name="amount" type="float"/>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Makefile.am b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Makefile.am
new file mode 100644
index 0000000000..060580dfbb
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Makefile.am
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+noinst_PROGRAMS = tuscany_sdo_test
+SUBDIRS =
+TESTS=tuscany_sdo_test
+AM_CPPFLAGS = $(CPPFLAGS)
+tuscany_sdo_test_SOURCES = sdotest.cpp sdotest2.cpp utils.cpp main.cpp
+
+EXTRA_DIST = *.xsd *.xml *.txt *.wsdl test/*.* test2/*.* t2/*.* g/*.* bugs/1/*.*
+noinst_HEADERS=sdotest.h
+
+tuscany_sdo_test_LDADD = \
+ -L$(top_builddir)/runtime/core/src/commonj/sdo -ltuscany_sdo \
+ -L${LIBXML2_LIB} -lxml2
+
+
+INCLUDES = -I$(top_builddir)/runtime/core/test \
+ -I$(top_builddir)/runtime/core/src
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xml
new file mode 100644
index 0000000000..d7b95510ad
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<Holiday xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="TravelBookingSchema.xsd">
+ <Flight flightNo="BA243">
+ <Departure>ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╔╩╦╠═╬¤ðÐÊËÈıÍÎÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ </Departure>
+ <Arrival>Pound:£ Dollar:$ Euro:Ç or █</Arrival>
+ </Flight>
+</Holiday>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xsd
new file mode 100644
index 0000000000..2f2d53c5a8
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/OddChars.xsd
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="Holiday">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Flight" maxOccurs="unbounded" minOccurs="1"/>
+ <xsd:element ref="Hotel" maxOccurs="unbounded" minOccurs="1"/>
+ <xsd:element ref="Excursion"/>
+ <xsd:element ref="Client"/>
+ <xsd:element ref="Party"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Flight">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Departure" type="xsd:string"/>
+ <xsd:element name="Arrival" type="xsd:string"/>
+ </xsd:sequence>
+ <xsd:attribute name="flightNo" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Hotel">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Name"/>
+ <xsd:element name="Phone" type="xsd:string"/>
+ <xsd:element ref="Room"/>
+ </xsd:sequence>
+ <xsd:attribute name="cardsAccepted" default="false" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Room">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="booked" use="required" type="xsd:boolean"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Party">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Person" maxOccurs="unbounded" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Person">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Name"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Client">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Name"/>
+ <xsd:element name="Address" type="xsd:string"/>
+ <xsd:element name="CreditCard" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Excursion">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Title" type="xsd:string"/>
+ <xsd:element name="Cost" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Name" type="xsd:string"/>
+</xsd:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Order.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Order.xsd
new file mode 100644
index 0000000000..d87f690236
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Order.xsd
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+xmlns:ord="orderNS" xmlns:cust="customerNS" targetNamespace="orderNS">
+
+<include schemaLocation="./Customer.xsd"/>
+
+<element name="order" type="ord:OrderType">
+ <complexType name="OrderType">
+ <sequence>
+ <element name="orderId" type="ID"/>
+ <element name="status" type="ord:OrderStatus"/>
+ <element name="item" maxOccurs="unbounded" ref="ord:item"/>
+ <element ref="cust:customer"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="item">
+ <complexType>
+ <element name="itemId" type="integer"/>
+ <element name="description" type="string"/>
+ <element name="price" type="string"/>
+ <element name="quantity" type="integer"/>
+ <element name="warehouseId" type="integer"/>
+ </complexType>
+ </element>
+
+ <simpleType name="OrderStatus">
+ <restriction base="string">
+ <enumeration value="NONE"/>
+ <enumeration value="RECEIVED"/>
+ <enumeration value="INVOICED"/>
+ <enumeration value="DISPATCHED"/>
+ <enumeration value="COMPLETED"/>
+ <enumeration value="CANCELLED"/>
+ </restriction>
+ </simpleType>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Readme.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Readme.txt
new file mode 100644
index 0000000000..326131a78c
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Readme.txt
@@ -0,0 +1,108 @@
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.48736_xml.txt
+
+===============================================================
+
+The following files are licensed as above. They do not contain the
+licence header text as they are to used to test generated output
+and are therefore classed as binary files:
+
+
+48736_xsd.txt
+b46633.txt
+b46634_out.txt
+b47137.txt
+b47137b.txt
+b47293.txt
+b48633_xml.txt
+b48633b_xsd.txt
+b48636_xml.txt
+b48636_xsd.txt
+b48686_xml.txt
+b48686_xsd.txt
+badelement.txt
+bothgroups_xsd.txt
+bothgroupssamename_xsd.txt
+bug2.txt
+bug45933-output.txt
+bug48300_xml.txt
+bug48300_xsd.txt
+bunique-out.txt
+bunique-out.xsd_safe.txt
+bunique-outxml.txt
+buniqueread-out.txt
+carotest3.txt
+csload-output.txt
+csload2-output.txt
+csload3-output.txt
+cssave-output.txt
+cssave2-output.txt
+datetest.txt
+defaults.txt
+doctest.txt
+emptycs1.txt
+emptycs2.txt
+emptycs3.txt
+getproptest.txt
+groupingroup_xsd.txt
+grouprefingroup_xsd.txt
+grouptoolate_xsd.txt
+groupwithprefix_xsd.txt
+inc1.txt
+inc2.txt
+jira490.txt
+jira705_out.txt
+list1_xml.txt
+list1_xsd.txt
+loadload-output.txt
+maintest.txt
+matttest1.txt
+merle1.txt
+notns.txt
+nulltest.txt
+oddchars.txt
+openloadNSout.txt
+openseq.txt
+order1.txt
+order2.txt
+querytest.txt
+saveopen-output.txt
+scenario1.txt
+scenario2.txt
+scenario3.txt
+scenario4.txt
+scenario5.txt
+sequence.txt
+setmany.txt
+setnull.txt
+showdefault1.txt
+showdefault2.txt
+simple.txt
+stock_wsdl.txt
+stock_xml.txt
+testabstract.txt
+testerrors.txt
+testinc2.txt
+testopen.txt
+testorder.txt
+teststyles.txt
+testsubsload.txt
+testutils.txt
+testwsdl.txt
+travel.txt
+userdata.txt
+xhtml_out.txt
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/SdoGenerate.cpp b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/SdoGenerate.cpp
new file mode 100644
index 0000000000..7edb3e22f2
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/SdoGenerate.cpp
@@ -0,0 +1,169 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+/* work in progress on generation of structures from sdos*/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#pragma warning(disable:4786)
+
+#include <iostream>
+using namespace std;
+
+
+
+#include "sdotest.h"
+
+
+
+using namespace commonj::sdo;
+
+
+char* sdotest::convert(const char* uri)
+{
+ char* newval = (char*)malloc(strlen(uri) + 1);
+ strcpy(newval,uri);
+
+ char* c;
+ while ((c = strchr(newval,'.')) != 0)
+ {
+ char * tmp = (char*)malloc(strlen(newval) + 5);
+ strncpy(tmp,newval, c - newval);
+ tmp[c-newval] = 0;
+ strcat(tmp,"<dot>");
+ strcat(tmp,c+1);
+ free(newval);
+ newval = tmp;
+ }
+ return newval;
+}
+
+
+void sdotest::generate(DataFactoryPtr fac)
+{
+ try {
+
+ TypeList tl = fac->getTypes();
+
+
+ cout << "// Generated structures " << endl;
+
+ for (unsigned int i=0;i<tl.size();i++)
+ {
+
+ if (!strcmp(tl[i].getURI(),"commonj.sdo")) continue;
+
+ char *uri = convert(tl[i].getURI());
+
+ cout << "typedef struct _";
+ if (uri) cout << uri << "_";
+ cout << tl[i].getName();
+
+ cout << "{" << endl;
+
+
+ PropertyList pl = tl[i].getProperties();
+ for (unsigned int j=0;j<pl.size();j++)
+ {
+ if (pl[j].isMany())
+ {
+ cout << "struct _";
+ char *v = convert(pl[j].getType().getURI());
+ if (v) cout << v << "_";
+ cout << pl[j].getType().getName();
+ cout << "List *" << pl[j].getName() << ";" << endl;
+ if (v) free(v);
+ }
+ else
+ {
+ if (pl[j].getType().isDataType())
+ {
+ switch (pl[j].getTypeEnum())
+ {
+ case Type::BooleanType:
+
+ cout << "bool " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::ByteType:
+ cout << "char " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::BytesType:
+ cout << "char* " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::CharacterType:
+ cout << "wchar " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::DateType:
+ cout << "time_t " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::DoubleType:
+ cout << "long double " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::FloatType:
+ cout << "float " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::IntegerType:
+ cout << "long " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::LongType:
+ cout << "int64_t " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::ShortType:
+ cout << "short " << pl[j].getName() << ";" << endl;
+ break;
+ case Type::StringType:
+ case Type::UriType:
+ cout << "wchar_t* " << pl[j].getName() << ";" << endl;
+ break;
+ default:
+ cout << "// unknown primitive: " << pl[j].getName() << endl;
+ break;
+ }
+ }
+ else
+ {
+ cout << "struct _";
+ char *v = convert(pl[j].getType().getURI());
+ if (v) cout << v << "_";
+ cout << pl[j].getType().getName();
+ cout << " *" << pl[j].getName() << ";" << endl;
+ if (v) free(v);
+ }
+ }
+ }
+
+ cout << "} ";
+ if (uri) cout << uri << "_";
+ cout << tl[i].getName() << ";" << endl;
+ if (uri) free(uri);
+
+ }
+
+ cout << "// generated Accessors" << endl;
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in Generation" << endl;
+ cout << e << endl;
+ }
+}
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/StockQuoteService.wsdl b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/StockQuoteService.wsdl
new file mode 100644
index 0000000000..1ecdea337e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/StockQuoteService.wsdl
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:s0="http://swanandmokashi.com"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ targetNamespace="http://swanandmokashi.com"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified"
+ targetNamespace="http://swanandmokashi.com"
+ xmlns:s="http://www.w3.org/2001/XMLSchema">
+ <s:element name="GetQuotes">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="QuoteTicker" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetQuotesResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="GetQuotesResult" type="s0:ArrayOfQuote" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfQuote">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded"
+ name="Quote" type="s0:Quote" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="Quote">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="CompanyName" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="StockTicker" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="StockQuote" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="LastUpdated" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Change"
+ type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="OpenPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="DayHighPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="DayLowPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Volume"
+ type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="MarketCap" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="YearRange" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="ArrayOfQuote" nillable="true"
+ type="s0:ArrayOfQuote" />
+ </s:schema>
+ </types>
+ <message name="GetQuotesSoapIn">
+ <part name="parameters" element="s0:GetQuotes" />
+ </message>
+ <message name="GetQuotesSoapOut">
+ <part name="parameters" element="s0:GetQuotesResponse" />
+ </message>
+ <message name="GetQuotesHttpGetIn">
+ <part name="QuoteTicker" type="s:string" />
+ </message>
+ <message name="GetQuotesHttpGetOut">
+ <part name="Body" element="s0:ArrayOfQuote" />
+ </message>
+ <message name="GetQuotesHttpPostIn">
+ <part name="QuoteTicker" type="s:string" />
+ </message>
+ <message name="GetQuotesHttpPostOut">
+ <part name="Body" element="s0:ArrayOfQuote" />
+ </message>
+ <portType name="StockQuotesSoap">
+ <operation name="GetStockQuotes">
+ <input name="GetQuotes" message="s0:GetQuotesSoapIn" />
+ <output name="GetQuotes" message="s0:GetQuotesSoapOut" />
+ </operation>
+ </portType>
+ <portType name="StockQuotesHttpGet">
+ <operation name="GetStockQuotes">
+ <input name="GetQuotes" message="s0:GetQuotesHttpGetIn" />
+ <output name="GetQuotes" message="s0:GetQuotesHttpGetOut" />
+ </operation>
+ </portType>
+ <portType name="StockQuotesHttpPost">
+ <operation name="GetStockQuotes">
+ <input name="GetQuotes" message="s0:GetQuotesHttpPostIn" />
+ <output name="GetQuotes" message="s0:GetQuotesHttpPostOut" />
+ </operation>
+ </portType>
+ <binding name="StockQuotesSoap" type="s0:StockQuotesSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+ style="document" />
+ <operation name="GetStockQuotes">
+ <soap:operation
+ soapAction="http://swanandmokashi.com/GetQuotes" style="document" />
+ <input name="GetQuotes">
+ <soap:body use="literal" />
+ </input>
+ <output name="GetQuotes">
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="StockQuotesHttpGet" type="s0:StockQuotesHttpGet">
+ <http:binding verb="GET" />
+ <operation name="GetStockQuotes">
+ <http:operation location="/GetQuotes" />
+ <input name="GetQuotes">
+ <http:urlEncoded />
+ </input>
+ <output name="GetQuotes">
+ <mime:mimeXml part="Body" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="StockQuotesHttpPost" type="s0:StockQuotesHttpPost">
+ <http:binding verb="POST" />
+ <operation name="GetStockQuotes">
+ <http:operation location="/GetQuotes" />
+ <input name="GetQuotes">
+ <mime:content type="application/x-www-form-urlencoded" />
+ </input>
+ <output name="GetQuotes">
+ <mime:mimeXml part="Body" />
+ </output>
+ </operation>
+ </binding>
+ <service name="StockQuotes">
+ <port name="StockQuotesSoap" binding="s0:StockQuotesSoap">
+ <soap:address
+ location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </port>
+ <port name="StockQuotesHttpGet"
+ binding="s0:StockQuotesHttpGet">
+ <http:address
+ location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </port>
+ <port name="StockQuotesHttpPost"
+ binding="s0:StockQuotesHttpPost">
+ <http:address
+ location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </port>
+ </service>
+</definitions>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style1.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style1.xsd
new file mode 100644
index 0000000000..25d800a02c
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style1.xsd
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+xmlns:lib="libraryNS" targetNamespace="libraryNS">
+
+ <element name="character">
+ <complexType>
+ <element name="name" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="author">
+ <complexType>
+ <element name="name" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="isbn">
+ <complexType>
+ <element name="value" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="title">
+ <complexType>
+ <element name="value" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="available">
+ <complexType>
+ <element name="isInPrint" type="boolean"/>
+ </complexType>
+ </element>
+
+<element name="library">
+ <complexType >
+ <sequence>
+ <element name="book" maxOccurs="unbounded">
+ <complexType>
+ <sequence>
+ <element ref="isbn"/>
+ <element ref="title"/>
+ <element ref="author" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="character" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute ref="id"/>
+ <attribute ref="available"/>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ </schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style2.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style2.xsd
new file mode 100644
index 0000000000..a6aaf51013
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style2.xsd
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+xmlns:lib="libraryNS" targetNamespace="libraryNS">
+
+ <element name="character">
+ <complexType>
+ <element name="name" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="author">
+ <complexType>
+ <element name="name" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="isbn">
+ <complexType>
+ <element name="value" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="title">
+ <complexType>
+ <element name="value" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="available">
+ <complexType>
+ <element name="isInPrint" type="boolean"/>
+ </complexType>
+ </element>
+
+<element name="book">
+ <complexType>
+ <sequence>
+ <element ref="isbn"/>
+ <element ref="title"/>
+ <element ref="author" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="character" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute ref="id"/>
+ <attribute ref="available"/>
+ </complexType>
+</element>
+
+ <element name="library">
+ <complexType >
+ <sequence>
+ <element name="book" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style3.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style3.xsd
new file mode 100644
index 0000000000..62db1fa13e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style3.xsd
@@ -0,0 +1,74 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+xmlns:lib="libraryNS" targetNamespace="libraryNS">
+
+
+ <element name="character">
+ <complexType>
+ <element name="name" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="author">
+ <complexType>
+ <element name="name" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="isbn">
+ <complexType>
+ <element name="value" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="title">
+ <complexType>
+ <element name="value" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="available">
+ <complexType>
+ <element name="isInPrint" type="boolean"/>
+ </complexType>
+ </element>
+
+ <complexType name="bookType" >
+ <sequence>
+ <element ref="isbn"/>
+ <element ref="title"/>
+ <element ref="author" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="character" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute ref="id"/>
+ <attribute ref="available"/>
+ </complexType>
+
+
+ <element name="library">
+ <complexType >
+ <sequence>
+ <element name="book" type="lib:bookType" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style4.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style4.xsd
new file mode 100644
index 0000000000..ab4bd6ef46
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/Style4.xsd
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+xmlns:lib="libraryNS" targetNamespace="libraryNS">
+
+ <group name="bookGroup">
+ <sequence>
+ <element name="book">
+ <complexType >
+ <sequence>
+ <element ref="isbn"/>
+ <element ref="title"/>
+ <element ref="author" minOccurs="0" maxOccurs="unbounded"/>
+ <element ref="character" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute ref="id"/>
+ <attribute ref="available"/>
+ </complexType>
+ </element>
+ </sequence>
+ </group>
+
+
+ <element name="character">
+ <complexType>
+ <element name="name" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="author">
+ <complexType>
+ <element name="name" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="isbn">
+ <complexType>
+ <element name="value" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="title">
+ <complexType>
+ <element name="value" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="available">
+ <complexType>
+ <element name="isInPrint" type="boolean"/>
+ </complexType>
+ </element>
+
+ <element name="library">
+ <complexType >
+ <sequence>
+ <group ref="lib:bookGroup" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingSchema.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingSchema.xsd
new file mode 100644
index 0000000000..2f2d53c5a8
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingSchema.xsd
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="Holiday">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Flight" maxOccurs="unbounded" minOccurs="1"/>
+ <xsd:element ref="Hotel" maxOccurs="unbounded" minOccurs="1"/>
+ <xsd:element ref="Excursion"/>
+ <xsd:element ref="Client"/>
+ <xsd:element ref="Party"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Flight">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Departure" type="xsd:string"/>
+ <xsd:element name="Arrival" type="xsd:string"/>
+ </xsd:sequence>
+ <xsd:attribute name="flightNo" type="xsd:string" use="required"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Hotel">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Name"/>
+ <xsd:element name="Phone" type="xsd:string"/>
+ <xsd:element ref="Room"/>
+ </xsd:sequence>
+ <xsd:attribute name="cardsAccepted" default="false" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Room">
+ <xsd:complexType>
+ <xsd:simpleContent>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="booked" use="required" type="xsd:boolean"/>
+ </xsd:extension>
+ </xsd:simpleContent>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Party">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Person" maxOccurs="unbounded" minOccurs="1"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Person">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Name"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Client">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="Name"/>
+ <xsd:element name="Address" type="xsd:string"/>
+ <xsd:element name="CreditCard" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Excursion">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="Title" type="xsd:string"/>
+ <xsd:element name="Cost" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="Name" type="xsd:string"/>
+</xsd:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingUsingSchema.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingUsingSchema.xml
new file mode 100644
index 0000000000..d4a292083d
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/TravelBookingUsingSchema.xml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<Holiday xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:noNamespaceSchemaLocation="TravelBookingSchema.xsd">
+ <Flight flightNo="BA243">
+ <Departure>LHR</Departure>
+ <Arrival>SNG</Arrival>
+ </Flight>
+ <Flight flightNo="SG561">
+ <Departure>SNG</Departure>
+ <Arrival>LHR</Arrival>
+ </Flight>
+ <Hotel cardsAccepted="true">
+ <Name>Excelsior</Name>
+ <Phone>222-3333</Phone>
+ <Room booked="true">303</Room>
+ </Hotel>
+ <Hotel>
+ <Name>Seedy Lodge</Name>
+ <Phone>888-9999</Phone>
+ <Room booked="true">14</Room>
+ </Hotel>
+ <Hotel cardsAccepted="true">
+ <Name>Hilton</Name>
+ <Phone>444-5555</Phone>
+ <Room booked="false">456</Room>
+ <foo>foo</foo>
+ </Hotel>
+ <Excursion>
+ <Title>Bird Baths of Singapore</Title>
+ <Cost>50</Cost>
+ </Excursion>
+ <Client>
+ <Name>Steve</Name>
+ <Address>134 Shirley Road</Address>
+ <CreditCard>1234-8908-6543-900</CreditCard>
+ </Client>
+ <Party>
+ <Person>
+ <Name>John</Name>
+ </Person>
+ <Person>
+ <Name>Jane</Name>
+ </Person>
+ <Person>
+ <Name>Bill</Name>
+ </Person>
+ </Party>
+</Holiday>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/axis.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/axis.xsd
new file mode 100644
index 0000000000..8832ae1afd
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/axis.xsd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml" xmlns:tns="axis" targetNamespace="axis">
+<xsd:element name="ItemSearch" >
+ <xsd:complexType >
+ <xsd:sequence>
+<xsd:element name="SubscriptionId" type="xsd:string" minOccurs="0" />
+<xsd:element name="AssociateTag" type="xsd:string" minOccurs="0" />
+<xsd:element name="XMLEscaping" type="xsd:string" minOccurs="0" />
+<xsd:element name="Validate" type="xsd:string" minOccurs="0" />
+<xsd:element name="Shared" type="tns:ItemSearchRequest" minOccurs="0" />
+<xsd:element name="Request" type="tns:ItemSearchRequest" minOccurs="0" maxOccurs="unbounded" />
+</xsd:sequence>
+</xsd:complexType>
+</xsd:element>
+ <xsd:complexType name="ItemSearchRequest">
+ <xsd:sequence>
+<xsd:element name="Keywords" type="xsd:string" minOccurs="0" />
+<xsd:element name="SearchIndex" type="xsd:string" minOccurs="0" />
+</xsd:sequence>
+</xsd:complexType>
+</xsd:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xml
new file mode 100644
index 0000000000..5d6d2d7336
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<companyType xmlns="companyNS" xsi:type="CompanyType"
+xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MegaCorp" employeeOfTheMonth="#/CEO">
+<departments name="Shoe">
+<employees name="Sarah Jones"/>
+</departments>
+<CEO name="Fred Smith"/>
+</companyType>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xsd
new file mode 100644
index 0000000000..263f8bae30
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46617b.xsd
@@ -0,0 +1,79 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml"
+xmlns:tns="companyNS" targetNamespace="companyNS">
+
+<xsd:element name="employeeType" type="tns:EmployeeType"/>
+<xsd:complexType name="EmployeeType">
+<xsd:sequence>
+<xsd:element name="SN" type="xsd:String" minOccurs="0"/>
+<xsd:element name="manager" type="xsd:boolean" minOccurs="0"/>
+</xsd:sequence>
+<xsd:attribute name="name" type="xsd:String"/>
+</xsd:complexType>
+
+<xsd:element name="departmentType" type="tns:DepartmentType"/>
+<xsd:complexType name="DepartmentType">
+<xsd:sequence>
+<xsd:element name="location" type="xsd:String" minOccurs="0"/>
+<xsd:element name="number" type="xsd:integer" minOccurs="0"/>
+<xsd:element name="employees" type="tns:EmployeeType" minOccurs="0" maxOccurs="unbounded"/>
+</xsd:sequence>
+<xsd:attribute name="name" type="xsd:String"/>
+</xsd:complexType>
+
+<xsd:element name="companyType" type="tns:CompanyType"/>
+<xsd:complexType name="CompanyType" mixed="true">
+<xsd:choice maxOccurs="unbounded">
+<xsd:element name="departments" type="tns:DepartmentType" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="string" type="xsd:String" minOccurs="0"/>
+<xsd:element name="bool" type="xsd:boolean" minOccurs="0"/>
+<xsd:element name="byte" type="xsd:byte" minOccurs="0"/>
+<xsd:element name="bytes" type="xsd:hexBinary" minOccurs="0"/>
+<xsd:element name="char" type="xsd:string" minOccurs="0"/>
+<xsd:element name="date" type="xsd:dateTime" minOccurs="0"/>
+<xsd:element name="double" type="xsd:double" minOccurs="0"/>
+<xsd:element name="float" type="xsd:float" minOccurs="0"/>
+<xsd:element name="int" type="xsd:integer" minOccurs="0"/>
+<xsd:element name="long" type="xsd:long" minOccurs="0"/>
+<xsd:element name="short" type="xsd:short" minOccurs="0"/>
+<xsd:element name="uri" type="xsd:anyURI" minOccurs="0"/>
+<xsd:element name="Mstring" type="xsd:String" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mbool" type="xsd:boolean" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mbyte" type="xsd:byte" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mbytes" type="xsd:hexBinary" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mchar" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mdate" type="xsd:dateTime" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mdouble" type="xsd:double" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mfloat" type="xsd:float" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mint" type="xsd:integer" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mlong" type="xsd:long" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Mshort" type="xsd:short" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="Muri" type="xsd:anyURI" minOccurs="0" maxOccurs="unbounded"/>
+</xsd:choice>
+
+<xsd:element name="CEO" type="tns:EmployeeType" minOccurs="0"/>
+<xsd:element name="changeSummary" type="sdo:ChangeSummaryType"/>
+<xsd:attribute name="name" type="xsd:String"/>
+<xsd:attribute name="employeeOfTheMonth" sdoxml:propertyType="tns:EmployeeType" type="xsd:IDREF"/>
+</xsd:complexType>
+</xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46633.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46633.txt
new file mode 100644
index 0000000000..da34a5196e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46633.txt
@@ -0,0 +1,8 @@
+A modified of type myspace#Department
+Property employees[(null)] was unset before the change
+Property ints[(null)] was unset before the change
+Property bool was unset before the change
+A modified of type myspace#Department
+Property employees[(null)] was unset before the change
+Property ints[(null)] was unset before the change
+Property bool was unset before the change
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46634_out.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46634_out.txt
new file mode 100644
index 0000000000..5e6b6dd560
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46634_out.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<company xsi:type="tns2:CompanyType" xmlns:tns2="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MegaCorp"><departments name="Advanced Technologies" location="NY" number="123"><employees><name>Jane Doe</name><SN xsi:nil="true"/></employees></departments></company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46693.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46693.xsd
new file mode 100644
index 0000000000..deb00d0473
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b46693.xsd
@@ -0,0 +1,176 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:s0="http://swanandmokashi.com"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ targetNamespace="http://swanandmokashi.com"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+ <types>
+ <s:schema elementFormDefault="qualified"
+ targetNamespace="http://swanandmokashi.com">
+ <s:element name="GetQuotes">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="QuoteTicker" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetQuotesResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="GetQuotesResult" type="s0:ArrayOfQuote" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:complexType name="ArrayOfQuote">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="unbounded"
+ name="Quote" type="s0:Quote" />
+ </s:sequence>
+ </s:complexType>
+ <s:complexType name="Quote">
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="CompanyName" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="StockTicker" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="StockQuote" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="LastUpdated" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Change"
+ type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="OpenPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="DayHighPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="DayLowPrice" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1" name="Volume"
+ type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="MarketCap" type="s:string" />
+ <s:element minOccurs="0" maxOccurs="1"
+ name="YearRange" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ <s:element name="ArrayOfQuote" nillable="true"
+ type="s0:ArrayOfQuote" />
+ </s:schema>
+ </types>
+ <message name="GetQuotesSoapIn">
+ <part name="parameters" element="s0:GetQuotes" />
+ </message>
+ <message name="GetQuotesSoapOut">
+ <part name="parameters" element="s0:GetQuotesResponse" />
+ </message>
+ <message name="GetQuotesHttpGetIn">
+ <part name="QuoteTicker" type="s:string" />
+ </message>
+ <message name="GetQuotesHttpGetOut">
+ <part name="Body" element="s0:ArrayOfQuote" />
+ </message>
+ <message name="GetQuotesHttpPostIn">
+ <part name="QuoteTicker" type="s:string" />
+ </message>
+ <message name="GetQuotesHttpPostOut">
+ <part name="Body" element="s0:ArrayOfQuote" />
+ </message>
+ <portType name="StockQuotesSoap">
+ <operation name="GetStockQuotes">
+ <input name="GetQuotes" message="s0:GetQuotesSoapIn" />
+ <output name="GetQuotes" message="s0:GetQuotesSoapOut" />
+ </operation>
+ </portType>
+ <portType name="StockQuotesHttpGet">
+ <operation name="GetStockQuotes">
+ <input name="GetQuotes" message="s0:GetQuotesHttpGetIn" />
+ <output name="GetQuotes" message="s0:GetQuotesHttpGetOut" />
+ </operation>
+ </portType>
+ <portType name="StockQuotesHttpPost">
+ <operation name="GetStockQuotes">
+ <input name="GetQuotes" message="s0:GetQuotesHttpPostIn" />
+ <output name="GetQuotes" message="s0:GetQuotesHttpPostOut" />
+ </operation>
+ </portType>
+ <binding name="StockQuotesSoap" type="s0:StockQuotesSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+ style="document" />
+ <operation name="GetStockQuotes">
+ <soap:operation
+ soapAction="http://swanandmokashi.com/GetQuotes" style="document" />
+ <input name="GetQuotes">
+ <soap:body use="literal" />
+ </input>
+ <output name="GetQuotes">
+ <soap:body use="literal" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="StockQuotesHttpGet" type="s0:StockQuotesHttpGet">
+ <http:binding verb="GET" />
+ <operation name="GetStockQuotes">
+ <http:operation location="/GetQuotes" />
+ <input name="GetQuotes">
+ <http:urlEncoded />
+ </input>
+ <output name="GetQuotes">
+ <mime:mimeXml part="Body" />
+ </output>
+ </operation>
+ </binding>
+ <binding name="StockQuotesHttpPost" type="s0:StockQuotesHttpPost">
+ <http:binding verb="POST" />
+ <operation name="GetStockQuotes">
+ <http:operation location="/GetQuotes" />
+ <input name="GetQuotes">
+ <mime:content type="application/x-www-form-urlencoded" />
+ </input>
+ <output name="GetQuotes">
+ <mime:mimeXml part="Body" />
+ </output>
+ </operation>
+ </binding>
+ <service name="StockQuotes">
+ <port name="StockQuotesSoap" binding="s0:StockQuotesSoap">
+ <soap:address
+ location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </port>
+ <port name="StockQuotesHttpGet"
+ binding="s0:StockQuotesHttpGet">
+ <http:address
+ location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </port>
+ <port name="StockQuotesHttpPost"
+ binding="s0:StockQuotesHttpPost">
+ <http:address
+ location="http://www.swanandmokashi.com/HomePage/WebServices/StockQuotes.asmx" />
+ </port>
+ </service>
+</definitions>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.txt
new file mode 100644
index 0000000000..d525bd7776
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.txt
@@ -0,0 +1,6 @@
+Property:value
+Property:isPermaLink
+Property:value
+Value:Hello
+Property:isPermaLink
+Value:true
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.xsd
new file mode 100644
index 0000000000..dbeba3fd22
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137.xsd
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema version="1.1.0"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="guid" minOccurs="0" maxOccurs="1">
+ <xs:complexType>
+ <xs:extension base="xs:string">
+ <xs:attribute name="isPermaLink" use="optional" type="xs:boolean">
+ </xs:attribute>
+ </xs:extension>
+ </xs:complexType>
+ </xs:element>
+</xs:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.txt
new file mode 100644
index 0000000000..202a17fc21
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.txt
@@ -0,0 +1,31 @@
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:companyNS#CompanyType
+Type:companyNS#DepartmentType
+Type:companyNS#EmployeeType
+Type:companyNS#RootType
+Type:companyNS#guid
+Property:departments
+Property:guid
+Property:name
+Property:employeeOfTheMonth
+Property:departments
+Property:guid
+guid Value:Wilbur
+guid isPermaLink:Property:name
+Property:employeeOfTheMonth
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.xsd
new file mode 100644
index 0000000000..f78ce703f3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47137b.xsd
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:element name="guid" minOccurs="0" maxOccurs="1">
+ <xsd:complexType>
+ <xsd:extension base="xsd:string">
+ <xsd:attribute name="isPermaLink" use="optional" type="xsd:boolean">
+ </xsd:attribute>
+ </xsd:extension>
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="cs" type="sdo:ChangeSummaryType"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" sdoxml:propertyType="company:EmployeeType"/>
+ </xsd:complexType>
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47293.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47293.txt
new file mode 100644
index 0000000000..9d571da67c
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b47293.txt
@@ -0,0 +1,27 @@
+Type:catalogNS#CatalogTypeType:catalogNS#RootTypeType:commonj.sdo#BigDecimalType:commonj.sdo#BigIntegerType:commonj.sdo#BooleanType:commonj.sdo#ByteType:commonj.sdo#BytesType:commonj.sdo#ChangeSummaryType:commonj.sdo#CharacterType:commonj.sdo#DataObjectType:commonj.sdo#DateType:commonj.sdo#DoubleType:commonj.sdo#FloatType:commonj.sdo#IntegerType:commonj.sdo#LongType:commonj.sdo#OpenDataObjectType:commonj.sdo#ShortType:commonj.sdo#StringType:commonj.sdo#URIType:customerNS#AddressTypeType:customerNS#CustomerTypeType:customerNS#PaymentTypeType:customerNS#RootTypeType:orderNS#OrderStatusType:orderNS#OrderTypeType:orderNS#RootTypeType:orderNS#itemType:catalogNS#CatalogType
+Type:catalogNS#RootType
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:customerNS#AddressType
+Type:customerNS#CustomerType
+Type:customerNS#PaymentType
+Type:customerNS#RootType
+Type:orderNS#OrderStatus
+Type:orderNS#OrderType
+Type:orderNS#RootType
+Type:orderNS#item
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48602.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48602.xsd
new file mode 100644
index 0000000000..859068d11d
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48602.xsd
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
+ <xs:element name="address" type="Address"/>
+<xs:complexType name="Address">
+ <xs:sequence>
+<xs:element name="name" type="string"/>
+</xs:sequence>
+</xs:complexType >
+</xs:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xml
new file mode 100644
index 0000000000..201b90fcc1
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<name
+ xmlns="http://www.wrox.com/name"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"
+ xsi:schemaLocation="http://www.wrox.com/name name.xsd"
+ title="Mr.">
+ <first>John</first>
+ <middle>Fitzgerald</middle>
+ <last>Doe</last>
+</name>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xsd
new file mode 100644
index 0000000000..ad3b1acb92
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.wrox.com/name"
+ xmlns:tns="http://www.wrox.com/name"
+ elementFormDefault="qualified">
+
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+
+ <complexType name="NameType">
+ <sequence>
+ <element ref="tns:first"/>
+ <element ref="tns:middle"/>
+ <element ref="tns:last"/>
+ </sequence>
+ <attribute name="title" type="string"/>
+ </complexType>
+
+ <element name="name" type="tns:NameType"/>
+</schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633_xml.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633_xml.txt
new file mode 100644
index 0000000000..7c0425d298
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633_xml.txt
@@ -0,0 +1,10 @@
+===== DataObject contents =====
+first:string:John
+
+middle:string:Fitzgerald
+
+last:string:Doe
+
+title:string:Mr.
+
+===== End DataObject =====
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b.xsd
new file mode 100644
index 0000000000..f2ddbca89f
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b.xsd
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="TNS"
+ xmlns:v="TNS">
+<element name="version" type="string"/>
+</schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b_xsd.txt
new file mode 100644
index 0000000000..0836fda6cd
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48633b_xsd.txt
@@ -0,0 +1,31 @@
+***** TESTANY ******************************************
+Type:TNS#RootType
+Property:version of type String
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#NameType
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+Type:http://www.wrox.com/name#RootType
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:name of type NameType
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xml
new file mode 100644
index 0000000000..50e4d9c017
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<name
+ xmlns="http://www.wrox.com/name"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.wrox.com/name name8.xsd"
+ title="Mr.">
+ <first>John</first>
+ <middle>Fitzgerald</middle>
+ <last>Doe</last>
+</name>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xsd
new file mode 100644
index 0000000000..b14da69279
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636.xsd
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wrox.com/name"
+xmlns:target="http://www.wrox.com/name" elementFormDefault="qualified">
+ <group name="NameGroup">
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ </sequence>
+ </group>
+ <element name="name">
+ <complexType>
+ <group ref="target:NameGroup"/>
+ <attribute name="title" type="string"/>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xml.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xml.txt
new file mode 100644
index 0000000000..4b5b55ced7
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xml.txt
@@ -0,0 +1,36 @@
+***** TYPES AFTER RESOLVE*********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+*******************************END TYPES******************
+===== DataObject contents =====
+first:string:John
+
+middle:string:Fitzgerald
+
+last:string:Doe
+
+title:string:Mr.
+
+===== End DataObject =====
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xsd.txt
new file mode 100644
index 0000000000..81ccaee474
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48636_xsd.txt
@@ -0,0 +1,26 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xml
new file mode 100644
index 0000000000..d4dc9e1852
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<name
+ xmlns="http://www.wrox.com/name"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchem-Instance"
+ xsi:schemaLocation="http://www.wrox.com/name name.xsd">
+ <first>John</first>
+ <middle>Fitzgerald</middle>
+ <last>Doe</last>
+ <ages>1 2 3</ages>
+</name>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xsd
new file mode 100644
index 0000000000..3845d69471
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.wrox.com/name"
+ xmlns:tns="http://www.wrox.com/name">
+
+ <element name="name">
+ <complexType>
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ <element name="ages">
+ <simpleType>
+ <list itemType="positiveInteger"/>
+ </simpleType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xml.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xml.txt
new file mode 100644
index 0000000000..f4899d810e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xml.txt
@@ -0,0 +1,46 @@
+***** TYPES AFTER RESOLVE*********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#ages
+Property:values (many) of type Integer
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:ages (many) of type ages
+*******************************END TYPES******************
+===== DataObject contents =====
+first:string:John
+
+middle:string:Fitzgerald
+
+last:string:Doe
+
+ages: list dataObject[0]=
+===== DataObject contents =====
+values: list integer[0]=1
+
+integer[1]=2
+
+integer[2]=3
+
+===== End DataObject =====
+
+===== End DataObject =====
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xsd.txt
new file mode 100644
index 0000000000..df670b8066
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/b48686_xsd.txt
@@ -0,0 +1,28 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#ages
+Property:values (many) of type Integer
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:ages (many) of type ages
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/badelement.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/badelement.txt
new file mode 100644
index 0000000000..f9ddc1e3b1
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/badelement.txt
@@ -0,0 +1,2 @@
+BADELEMENT correctly found errors:
+Parser found unknown element ThisJustAintPartOfTheSchema
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups.xsd
new file mode 100644
index 0000000000..36d1b8f047
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups.xsd
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wrox.com/name"
+xmlns:target="http://www.wrox.com/name" elementFormDefault="qualified">
+ <group name="NameGroup">
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ </sequence>
+ </group>
+ <attributeGroup name="NameAttributeGroup">
+ <attribute name="firstattribute" type="string"/>
+ <attribute name="secondattribute" type="string"/>
+ <attribute name="thirdattribute" type="string"/>
+ </attributeGroup>
+ <element name="name">
+ <complexType>
+ <group ref="target:NameGroup"/>
+ <attribute name="title" type="string"/>
+ <attributeGroup ref="target:NameAttributeGroup"/>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups_xsd.txt
new file mode 100644
index 0000000000..5d92da21c5
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroups_xsd.txt
@@ -0,0 +1,29 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+Property:firstattribute of type String
+Property:secondattribute of type String
+Property:thirdattribute of type String
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename.xsd
new file mode 100644
index 0000000000..0ccdf615f0
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename.xsd
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wrox.com/name"
+xmlns:target="http://www.wrox.com/name" elementFormDefault="qualified">
+ <group name="NameGroup">
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ </sequence>
+ </group>
+ <attributeGroup name="NameGroup">
+ <attribute name="firstattribute" type="string"/>
+ <attribute name="secondattribute" type="string"/>
+ <attribute name="thirdattribute" type="string"/>
+ </attributeGroup>
+ <element name="name">
+ <complexType>
+ <group ref="target:NameGroup"/>
+ <attribute name="title" type="string"/>
+ <attributeGroup ref="target:NameGroup"/>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename_xsd.txt
new file mode 100644
index 0000000000..5d92da21c5
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bothgroupssamename_xsd.txt
@@ -0,0 +1,29 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+Property:firstattribute of type String
+Property:secondattribute of type String
+Property:thirdattribute of type String
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug2.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug2.txt
new file mode 100644
index 0000000000..aae01a0c9c
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug2.txt
@@ -0,0 +1,9 @@
+MObject Property companies
+Property:name:Acme
+End of MObject Property companies
+MObject Property companies
+End of MObject Property companies
+Change summary should have no entries...
+MObject Property companies
+End of MObject Property companies
+Change summary should have no entries...
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug45933-output.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug45933-output.txt
new file mode 100644
index 0000000000..d1ad084eea
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug45933-output.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:company xsi:type="tns:CompanyType" xmlns:tns="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Bug45933"><sdo:changeSummary xmlns:sdo="commonj.sdo"><company sdo:ref="#/"><bools>false</bools></company></sdo:changeSummary></tns:company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xml
new file mode 100644
index 0000000000..e4b79cdf2f
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xml
@@ -0,0 +1,174 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<template:template xmlns:template="http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/" name="CTShop" version="1.0.0">
+ <description>This is my online shop</description>
+ <displayName>The CT Shop</displayName>
+ <templateType>php</templateType>
+ <verifiers/>
+ <globalHelperArguments>
+ </globalHelperArguments>
+ <unboundTemplateParameters name="name" expert="false" multiplicity="1..1">
+ <description>
+ <description>Name for the shop</description>
+ <displayName>Shop Name</displayName>
+ </description>
+ <verifiers>
+ </verifiers>
+ <constraints>
+ </constraints>
+ <defaults>
+ <description></description>
+ <displayName>CT Shop</displayName>
+ <data>CT Shop</data>
+ </defaults>
+ </unboundTemplateParameters>
+ <unboundTemplateParameters name="branding" expert="false" multiplicity="1..1">
+ <description>
+ <description>Colour of background for Shop</description>
+ <displayName>Branding</displayName>
+ </description>
+ <verifiers>
+ </verifiers>
+ <constraints>
+ <description></description>
+ <displayName>Olive</displayName>
+ <data>Olive</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>Lime</displayName>
+ <data>Lime</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>Gray</displayName>
+ <data>Gray</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>Teal</displayName>
+ <data>Teal</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>Silver</displayName>
+ <data>Silver</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>White</displayName>
+ <data>White</data>
+ </constraints>
+ <defaults>
+ <description></description>
+ <displayName>Olive</displayName>
+ <data>Olive</data>
+ </defaults>
+ </unboundTemplateParameters>
+ <unboundTemplateParameters name="catalog" expert="false" multiplicity="1..1">
+ <description>
+ <description>Product Catalog for the shop</description>
+ <displayName>Product Catalog</displayName>
+ </description>
+ <verifiers>
+ </verifiers>
+ <constraints>
+ </constraints>
+ <factory kind="php" name="CatalogFactory">
+ </factory>
+ <defaults>
+ <description></description>
+ <displayName>Catalog</displayName>
+ <data>Catalog</data>
+ </defaults>
+ </unboundTemplateParameters>
+ <unboundTemplateParameters name="cart" expert="false" multiplicity="1..1">
+ <description>
+ <description>Shopping cart for the shop</description>
+ <displayName>Shopping Cart</displayName>
+ </description>
+ <verifiers>
+ </verifiers>
+ <constraints>
+ <description></description>
+ <displayName>Cart</displayName>
+ <data>Cart</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>GCCart</displayName>
+ <data>GCCart</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>MyCart</displayName>
+ <data>MyCart</data>
+ </constraints>
+ <factory kind="php" name="CartFactory">
+ </factory>
+ <defaults>
+ <description></description>
+ <displayName>Cart</displayName>
+ <data>Cart</data>
+ </defaults>
+ </unboundTemplateParameters>
+ <unboundTemplateParameters name="payment" expert="false" multiplicity="1..1">
+ <description>
+ <description>Payment Modules for the shop</description>
+ <displayName>Payment Module</displayName>
+ </description>
+ <verifiers>
+ </verifiers>
+ <constraints>
+ <description></description>
+ <displayName>MyPayPal</displayName>
+ <data>MyPayPal</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>PayPal</displayName>
+ <data>PayPal</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>USPayPal</displayName>
+ <data>USPayPal</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>MyStormPay</displayName>
+ <data>MyStormPay</data>
+ </constraints>
+ <constraints>
+ <description></description>
+ <displayName>StormPay</displayName>
+ <data>StormPay</data>
+ </constraints>
+ <factory kind="php" name="PaymentFactory">
+ </factory>
+ <defaults>
+ <description></description>
+ <displayName>PayPal</displayName>
+ <data>PayPal</data>
+ </defaults>
+ </unboundTemplateParameters>
+ </template:template> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xsd
new file mode 100644
index 0000000000..e0e69eebf1
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300.xsd
@@ -0,0 +1,84 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:template="http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/"
+ targetNamespace="http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/">
+
+ <element name="template" type="template:TemplateType">
+ <complexType name="TemplateType">
+ <sequence>
+ <element name="displayName" type="string"/>
+ <element name="templateType" type="string"/>
+ <element name="description" type="string"/>
+ <element name="expert" type="string"/>
+ <element name="icon" type="string"/>
+ <element name="verifiers" minOccurs="0" maxOccurs="unbounded" type="string"/>
+ <element name="globalHelperArguments" minOccurs="0" maxOccurs="unbounded" type="string"/>
+ <element name="unboundTemplateParameters" minOccurs="0" maxOccurs="unbounded" ref="template:unboundTemplateParameter"/>
+ <attribute name="name" type="string"/>
+ <attribute name="version" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="unboundTemplateParameter">
+ <complexType>
+ <element name="description" minOccurs="0" maxOccurs="1" ref="template:description"/>
+ <element name="verifiers" minOccurs="0" maxOccurs="unbounded" type="string"/>
+ <element name="constraints" minOccurs="0" maxOccurs="unbounded" ref="template:value"/>
+ <element name="factory" minOccurs="0" maxOccurs="1" ref="template:factory"/>
+ <element name="defaults" minOccurs="0" maxOccurs="unbounded" ref="template:value"/>
+ <attribute name="name" type="string"/>
+ <attribute name="expert" type="string"/>
+ <attribute name="multiplicity" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="description">
+ <complexType>
+ <element name="description" type="string"/>
+ <element name="displayName" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="factory">
+ <complexType>
+ <attribute name="kind" type="string"/>
+ <attribute name="name" type="string"/>
+ </complexType>
+ </element>
+
+ <element name="valueprovider">
+ <complexType>
+ <element name="values" minOccurs="0" maxOccurs="unbounded" ref="template:value"/>
+ </complexType>
+ </element>
+
+ <element name="value">
+ <complexType>
+ <element name="description" type="string"/>
+ <element name="displayName" type="string"/>
+ <element name="data" type="string"/>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xml.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xml.txt
new file mode 100644
index 0000000000..d8b1345d0d
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xml.txt
@@ -0,0 +1,424 @@
+***** TYPES AFTER RESOLVE*********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#RootType
+Property:template of type TemplateType
+Property:unboundTemplateParameter of type unboundTemplateParameter
+Property:description of type description
+Property:factory of type factory
+Property:valueprovider of type valueprovider
+Property:value of type value
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#TemplateType
+Property:displayName of type String
+Property:templateType of type String
+Property:description of type String
+Property:expert of type String
+Property:icon of type String
+Property:verifiers (many) of type String
+Property:globalHelperArguments (many) of type String
+Property:unboundTemplateParameters (many) of type unboundTemplateParameter
+Property:name of type String
+Property:version of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#description
+Property:description of type String
+Property:displayName of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#factory
+Property:kind of type String
+Property:name of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#unboundTemplateParameter
+Property:description of type description
+Property:verifiers (many) of type String
+Property:constraints (many) of type value
+Property:factory of type factory
+Property:defaults (many) of type value
+Property:name of type String
+Property:expert of type String
+Property:multiplicity of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#value
+Property:description of type String
+Property:displayName of type String
+Property:data of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#valueprovider
+Property:values (many) of type value
+*******************************END TYPES******************
+===== DataObject contents =====
+displayName:string:The CT Shop
+
+templateType:string:php
+
+description:string:This is my online shop
+
+expert:string:
+
+icon:string:
+
+verifiers: list string[0]=
+
+globalHelperArguments: list string[0]=
+
+
+unboundTemplateParameters: list dataObject[0]=
+===== DataObject contents =====
+description:dataObject
+===== DataObject contents =====
+description:string:Name for the shop
+
+displayName:string:Shop Name
+
+===== End DataObject =====
+
+verifiers: list string[0]=
+
+
+constraints: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:
+
+data:string:
+
+===== End DataObject =====
+
+factory:dataObject
+ - null or unset
+
+defaults: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:CT Shop
+
+data:string:CT Shop
+
+===== End DataObject =====
+
+name:string:name
+
+expert:string:false
+
+multiplicity:string:1..1
+
+===== End DataObject =====
+
+dataObject[1]=
+===== DataObject contents =====
+description:dataObject
+===== DataObject contents =====
+description:string:Colour of background for Shop
+
+displayName:string:Branding
+
+===== End DataObject =====
+
+verifiers: list string[0]=
+
+
+constraints: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:Olive
+
+data:string:Olive
+
+===== End DataObject =====
+
+dataObject[1]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:Lime
+
+data:string:Lime
+
+===== End DataObject =====
+
+dataObject[2]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:Gray
+
+data:string:Gray
+
+===== End DataObject =====
+
+dataObject[3]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:Teal
+
+data:string:Teal
+
+===== End DataObject =====
+
+dataObject[4]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:Silver
+
+data:string:Silver
+
+===== End DataObject =====
+
+dataObject[5]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:White
+
+data:string:White
+
+===== End DataObject =====
+
+factory:dataObject
+ - null or unset
+
+defaults: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:Olive
+
+data:string:Olive
+
+===== End DataObject =====
+
+name:string:branding
+
+expert:string:false
+
+multiplicity:string:1..1
+
+===== End DataObject =====
+
+dataObject[2]=
+===== DataObject contents =====
+description:dataObject
+===== DataObject contents =====
+description:string:Product Catalog for the shop
+
+displayName:string:Product Catalog
+
+===== End DataObject =====
+
+verifiers: list string[0]=
+
+
+constraints: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:
+
+data:string:
+
+===== End DataObject =====
+
+factory:dataObject
+===== DataObject contents =====
+kind:string:php
+
+name:string:CatalogFactory
+
+===== End DataObject =====
+
+defaults: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:Catalog
+
+data:string:Catalog
+
+===== End DataObject =====
+
+name:string:catalog
+
+expert:string:false
+
+multiplicity:string:1..1
+
+===== End DataObject =====
+
+dataObject[3]=
+===== DataObject contents =====
+description:dataObject
+===== DataObject contents =====
+description:string:Shopping cart for the shop
+
+displayName:string:Shopping Cart
+
+===== End DataObject =====
+
+verifiers: list string[0]=
+
+
+constraints: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:Cart
+
+data:string:Cart
+
+===== End DataObject =====
+
+dataObject[1]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:GCCart
+
+data:string:GCCart
+
+===== End DataObject =====
+
+dataObject[2]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:MyCart
+
+data:string:MyCart
+
+===== End DataObject =====
+
+factory:dataObject
+===== DataObject contents =====
+kind:string:php
+
+name:string:CartFactory
+
+===== End DataObject =====
+
+defaults: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:Cart
+
+data:string:Cart
+
+===== End DataObject =====
+
+name:string:cart
+
+expert:string:false
+
+multiplicity:string:1..1
+
+===== End DataObject =====
+
+dataObject[4]=
+===== DataObject contents =====
+description:dataObject
+===== DataObject contents =====
+description:string:Payment Modules for the shop
+
+displayName:string:Payment Module
+
+===== End DataObject =====
+
+verifiers: list string[0]=
+
+
+constraints: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:MyPayPal
+
+data:string:MyPayPal
+
+===== End DataObject =====
+
+dataObject[1]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:PayPal
+
+data:string:PayPal
+
+===== End DataObject =====
+
+dataObject[2]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:USPayPal
+
+data:string:USPayPal
+
+===== End DataObject =====
+
+dataObject[3]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:MyStormPay
+
+data:string:MyStormPay
+
+===== End DataObject =====
+
+dataObject[4]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:StormPay
+
+data:string:StormPay
+
+===== End DataObject =====
+
+factory:dataObject
+===== DataObject contents =====
+kind:string:php
+
+name:string:PaymentFactory
+
+===== End DataObject =====
+
+defaults: list dataObject[0]=
+===== DataObject contents =====
+description:string:
+
+displayName:string:PayPal
+
+data:string:PayPal
+
+===== End DataObject =====
+
+name:string:payment
+
+expert:string:false
+
+multiplicity:string:1..1
+
+===== End DataObject =====
+
+name:string:CTShop
+
+version:string:1.0.0
+
+===== End DataObject =====
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xsd.txt
new file mode 100644
index 0000000000..38d7c904f0
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bug48300_xsd.txt
@@ -0,0 +1,58 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#RootType
+Property:template of type TemplateType
+Property:unboundTemplateParameter of type unboundTemplateParameter
+Property:description of type description
+Property:factory of type factory
+Property:valueprovider of type valueprovider
+Property:value of type value
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#TemplateType
+Property:displayName of type String
+Property:templateType of type String
+Property:description of type String
+Property:expert of type String
+Property:icon of type String
+Property:verifiers (many) of type String
+Property:globalHelperArguments (many) of type String
+Property:unboundTemplateParameters (many) of type unboundTemplateParameter
+Property:name of type String
+Property:version of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#description
+Property:description of type String
+Property:displayName of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#factory
+Property:kind of type String
+Property:name of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#unboundTemplateParameter
+Property:description of type description
+Property:verifiers (many) of type String
+Property:constraints (many) of type value
+Property:factory of type factory
+Property:defaults (many) of type value
+Property:name of type String
+Property:expert of type String
+Property:multiplicity of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#value
+Property:description of type String
+Property:displayName of type String
+Property:data of type String
+Type:http://www.ibm.com/xmlns/prod/ct/ctdl-template/v1.0.0/#valueprovider
+Property:values (many) of type value
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xml
new file mode 100644
index 0000000000..7fd3b119e6
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<mci:company xmlns:mci="http://www.mycompanyinc.com"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.mycompanyinc.com company.xsd"
+ version="0.0.1">
+ <mci:employees>
+ <mci:employee>
+ <mci:id>1</mci:id>
+ <mci:name>Mary Kay</mci:name>
+ </mci:employee>
+ </mci:employees>
+ <mci:departments>
+ <mci:department>
+ <mci:id>3</mci:id>
+ <mci:name>Sales</mci:name>
+ <mci:employeesList>
+ <mci:ids>1</mci:ids>
+ </mci:employeesList>
+ </mci:department>
+ </mci:departments>
+</mci:company> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xsd
new file mode 100644
index 0000000000..f5fd88a424
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/company.xsd
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xsd:schema targetNamespace="http://www.mycompanyinc.com"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:mci="http://www.mycompanyinc.com" elementFormDefault="qualified"
+ version="0.0.1">
+ <xsd:complexType name="employeesListType">
+ <xsd:sequence>
+ <xsd:element name="ids" type="xsd:string" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="employeeType">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:string" />
+ <xsd:element name="name" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="departmentType">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:string" />
+ <xsd:element name="name" type="xsd:string" />
+ <xsd:element name="employeesList" type="mci:employeesListType" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="employeesType">
+ <xsd:sequence>
+ <xsd:element name="employee" type="mci:employeeType" maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="departmentsType">
+ <xsd:sequence>
+ <xsd:element name="department" type="mci:departmentType" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="companyType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="mci:employeesType" />
+ <xsd:element name="departments" type="mci:departmentsType" />
+ </xsd:sequence>
+ <xsd:attribute name="version" type="xsd:string" use="required" />
+ </xsd:complexType>
+ <xsd:element name="company" type="mci:companyType" />
+</xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/include.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/include.xsd
new file mode 100644
index 0000000000..16089cecae
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/include.xsd
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xsd:schema targetNamespace="http://www.mycompanyinc.com"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:mci="http://www.mycompanyinc.com" elementFormDefault="qualified"
+ version="0.0.1">
+
+ <xsd:include schemaLocation="c:/absolute-drivel/ok1.xsd" />
+ <xsd:include schemaLocation="ok2.xsd" />
+ <xsd:include schemaLocation="c:\\absolute-tosh\\ok3.xsd" />
+
+ <xsd:complexType name="employeesListType">
+ <xsd:sequence>
+ <xsd:element name="ids" type="xsd:string" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="employeeType">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:string" />
+ <xsd:element name="name" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="departmentType">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:string" />
+ <xsd:element name="name" type="xsd:string" />
+ <xsd:element name="employeesList" type="mci:employeesListType" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="employeesType">
+ <xsd:sequence>
+ <xsd:element name="employee" type="mci:employeeType" maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="departmentsType">
+ <xsd:sequence>
+ <xsd:element name="department" type="mci:departmentType" minOccurs="0"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+ <xsd:complexType name="companyType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="mci:employeesType" />
+ <xsd:element name="departments" type="mci:departmentsType" />
+ </xsd:sequence>
+ <xsd:attribute name="version" type="xsd:string" use="required" />
+ </xsd:complexType>
+ <xsd:element name="company" type="mci:companyType" />
+</xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok1.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok1.xsd
new file mode 100644
index 0000000000..d24e5c39e7
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok1.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+
+<xsd:schema targetNamespace="http://www.mycompanyinc.com"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:mci="http://www.mycompanyinc.com" elementFormDefault="qualified"
+ version="0.0.1">
+
+ <xsd:complexType name="ok1">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:string" />
+ <xsd:element name="name" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok2.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok2.xsd
new file mode 100644
index 0000000000..3d90cbdec3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok2.xsd
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xsd:schema targetNamespace="http://www.mycompanyinc.com"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:mci="http://www.mycompanyinc.com" elementFormDefault="qualified"
+ version="0.0.1">
+
+ <xsd:complexType name="ok2">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:string" />
+ <xsd:element name="name" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok3.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok3.xsd
new file mode 100644
index 0000000000..45d5db2ed4
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bugs/1/ok3.xsd
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xsd:schema targetNamespace="http://www.mycompanyinc.com"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:mci="http://www.mycompanyinc.com" elementFormDefault="qualified"
+ version="0.0.1">
+
+ <xsd:complexType name="ok3">
+ <xsd:sequence>
+ <xsd:element name="id" type="xsd:string" />
+ <xsd:element name="name" type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+</xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.txt
new file mode 100644
index 0000000000..da1aabead7
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.txt
@@ -0,0 +1 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml" xmlns:tns1="nottest" xmlns:tns="test" targetNamespace="test"><xsd:element name="duplicate" type="tns1:Duplicate"/><xsd:complexType name="tns1:Duplicate"><xsd:sequence><xsd:element name="ob" type="tns:Object" minOccurs="0"/></xsd:sequence><xsd:attribute name="id" type="xsd:integer"/></xsd:complexType><xsd:element name="duplicate" type="Duplicate"/><xsd:complexType name="Duplicate"><xsd:sequence><xsd:element name="ob" type="tns:Object" minOccurs="0"/></xsd:sequence><xsd:attribute name="id" type="xsd:integer"/></xsd:complexType><xsd:element name="object" type="Object"/><xsd:complexType name="Object"/><xsd:element name="root" type="Root"/><xsd:complexType name="Root"><xsd:sequence><xsd:element name="duplicate" type="tns:Duplicate" minOccurs="0"/><xsd:element name="duplicate2" type="tns1:Duplicate" minOccurs="0"/><xsd:element name="unique" type="tns:Unique" minOccurs="0"/><xsd:element name="duplicatelist" type="tns:Duplicate" minOccurs="0" maxOccurs="unbounded"/><xsd:element name="duplicatelist2" type="tns1:Duplicate" minOccurs="0" maxOccurs="unbounded"/><xsd:element name="uniquelist" type="tns:Unique" minOccurs="0" maxOccurs="unbounded"/></xsd:sequence></xsd:complexType><xsd:element name="unique" type="Unique"/><xsd:complexType name="Unique"><xsd:sequence><xsd:element name="ob" type="tns:Object" minOccurs="0"/></xsd:sequence><xsd:attribute name="id" type="xsd:integer"/></xsd:complexType></xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.xsd_safe.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.xsd_safe.txt
new file mode 100644
index 0000000000..1b4c6bb7da
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-out.xsd_safe.txt
@@ -0,0 +1,53 @@
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml"
+xmlns:tns1="nottest" xmlns:tns="test" targetNamespace="test">
+
+<xsd:element name="duplicate" type="tns1:Duplicate"/>
+
+<xsd:complexType name="tns1:Duplicate">
+
+<xsd:sequence>
+<xsd:element name="ob" type="tns:Object" minOccurs="0"/>
+</xsd:sequence>
+
+<xsd:attribute name="id" type="xsd:integer"/>
+
+</xsd:complexType>
+
+<xsd:element name="duplicate" type="Duplicate"/>
+
+<xsd:complexType name="Duplicate">
+<xsd:sequence>
+<xsd:element name="ob" type="tns:Object" minOccurs="0"/>
+</xsd:sequence>
+
+<xsd:attribute name="id" type="xsd:integer"/>
+
+</xsd:complexType>
+
+<xsd:element name="object" type="Object"/>
+
+<xsd:complexType name="Object"/>
+
+<xsd:element name="root" type="Root"/>
+
+<xsd:complexType name="Root">
+<xsd:sequence>
+<xsd:element name="duplicate" type="tns:Duplicate" minOccurs="0"/>
+<xsd:element name="duplicate2" type="tns1:Duplicate" minOccurs="0"/>
+<xsd:element name="unique" type="tns:Unique" minOccurs="0"/>
+<xsd:element name="duplicatelist" type="tns:Duplicate" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="duplicatelist2" type="tns1:Duplicate" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:element name="uniquelist" type="tns:Unique" minOccurs="0" maxOccurs="unbounded"/>
+</xsd:sequence>
+</xsd:complexType>
+
+<xsd:element name="unique" type="Unique"/>
+
+<xsd:complexType name="Unique">
+<xsd:sequence>
+<xsd:element name="ob" type="tns:Object" minOccurs="0"/>
+</xsd:sequence>
+<xsd:attribute name="id" type="xsd:integer"/>
+</xsd:complexType>
+
+</xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-outxml.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-outxml.txt
new file mode 100644
index 0000000000..a4cd4f3705
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/bunique-outxml.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rooty xsi:type="tns2:Root" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns3="nottest" xmlns:tns2="test"><duplicate id="1"><ob/></duplicate><duplicate2 id="3"/><unique id="5"><ob/></unique><duplicatelist id="2"><ob/></duplicatelist><duplicatelist2 id="4"/><uniquelist id="6"/></rooty>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/buniqueread-out.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/buniqueread-out.txt
new file mode 100644
index 0000000000..a4cd4f3705
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/buniqueread-out.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<rooty xsi:type="tns2:Root" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns3="nottest" xmlns:tns2="test"><duplicate id="1"><ob/></duplicate><duplicate2 id="3"/><unique id="5"><ob/></unique><duplicatelist id="2"><ob/></duplicatelist><duplicatelist2 id="4"/><uniquelist id="6"/></rooty>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator.xsd
new file mode 100644
index 0000000000..a5a26de117
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator.xsd
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:calc="http://example.org/CalculatorTypes"
+ targetNamespace="http://example.org/CalculatorTypes">
+ <xsd:complexType name="AddArguments">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:float"/>
+ <xsd:element name="b" type="xsd:float"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2.wsdl b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2.wsdl
new file mode 100644
index 0000000000..88b5b80b3d
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2.wsdl
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<definitions name="Calculator"
+ targetNamespace="http://example.org/Calculator"
+ xmlns:calc="http://example.org/CalculatorTypes"
+ xmlns:tns="http://example.org/Calculator"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+<!-- This is how it's done with an import -->
+<types>
+ <xsd:schema targetNamespace="http://example.org/Calculator">
+ <xsd:import namespace="http://example.org/CalculatorTypes" schemaLocation="calculator.xsd"/>
+ </xsd:schema>
+</types>
+
+
+<!-- This is how it's done without an import
+<types>
+ <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://example.org/Calculator">
+ <xsd:complexType name="AddArguments">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:float"/>
+ <xsd:element name="b" type="xsd:float"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+</types>
+-->
+
+<message name="getCalculatorRequest">
+ <part name="arguments" type="calc:AddArguments"/>
+</message>
+<message name="getCalculatorResponse">
+ <part name="result" type="xsd:float"/>
+</message>
+
+<portType name="CalculatorPortType">
+ <operation name="add2">
+ <input message="tns:getCalculatorRequest"/>
+ <output message="tns:getCalculatorResponse"/>
+ </operation>
+</portType>
+
+<binding name="CalculatorBinding" type="tns:CalculatorPortType">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="add2">
+ <soap:operation soapAction="urn:example-org-calculator#add2"/>
+ <input>
+ <soap:body use="encoded" namespace="urn:example-org-calculator"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="urn:example-org-calculator"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+</binding>
+
+<service name="CalculatorService">
+ <port name="CalculatorPort" binding="CalculatorBinding">
+ <soap:address location="http://localhost/PHP%20Playground/SoapExtension/ComplexCalculator/calculator_server.php"/>
+ </port>
+</service>
+</definitions> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2a.wsdl b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2a.wsdl
new file mode 100644
index 0000000000..f2f008bf6e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/calculator2a.wsdl
@@ -0,0 +1,88 @@
+<?xml version ="1.0" encoding ="UTF-8" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<definitions name="Calculator"
+ targetNamespace="http://example.org/Calculator"
+ xmlns:calc="http://example.org/CalculatorTypes"
+ xmlns:tns="http://example.org/Calculator"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns="http://schemas.xmlsoap.org/wsdl/">
+
+<!-- This is how it's done with an import
+<types>
+ <xsd:schema targetNamespace="http://example.org/Calculator">
+ <import namespace="http://example.org/CalculatorTypes" schemaLocation="calculator.xsd"/>
+ </xsd:schema>
+</types>
+-->
+
+<!-- This is how it's done without an import -->
+<types>
+ <xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://example.org/Calculator">
+ <xsd:complexType name="AddArguments">
+ <xsd:sequence>
+ <xsd:element name="a" type="xsd:float"/>
+ <xsd:element name="b" type="xsd:float"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+</types>
+
+<message name="getCalculatorRequest">
+ <part name="arguments" type="calc:AddArguments"/>
+</message>
+<message name="getCalculatorResponse">
+ <part name="result" type="xsd:float"/>
+</message>
+
+<portType name="CalculatorPortType">
+ <operation name="add2">
+ <input message="tns:getCalculatorRequest"/>
+ <output message="tns:getCalculatorResponse"/>
+ </operation>
+</portType>
+
+<binding name="CalculatorBinding" type="tns:CalculatorPortType">
+ <soap:binding style="rpc"
+ transport="http://schemas.xmlsoap.org/soap/http"/>
+ <operation name="add2">
+ <soap:operation soapAction="urn:example-org-calculator#add2"/>
+ <input>
+ <soap:body use="encoded" namespace="urn:example-org-calculator"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </input>
+ <output>
+ <soap:body use="encoded" namespace="urn:example-org-calculator"
+ encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
+ </output>
+ </operation>
+</binding>
+
+<service name="CalculatorService">
+ <port name="CalculatorPort" binding="CalculatorBinding">
+ <soap:address location="http://localhost/PHP%20Playground/SoapExtension/ComplexCalculator/calculator_server.php"/>
+ </port>
+</service>
+</definitions> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/carotest3.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/carotest3.txt
new file mode 100644
index 0000000000..cb5e4ed9b3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/carotest3.txt
@@ -0,0 +1,36 @@
+======================================
+======================================
+======================================
+I am Item 1 of string
+======================================
+======================================
+I am Item 1 of string
+I am the first free text
+======================================
+======================================
+I am Item 1 of string
+I am the first free text
+I am Item 2 of string
+======================================
+======================================
+I am Item 1 of string
+I am free text which has been modified
+I am Item 2 of string
+======================================
+======================================
+I am Item 1 of string
+I am free text which has been modified
+I am Item 2 of string
+
+======================================
+======================================
+I am Item 1 of string
+I am free text which has been modified
+I am Item 2 of string
+department1
+======================================
+Element zero, length 1: 1
+Element one, length 2: 2
+Element two, length 3: 3
+Element three,length 4: 4
+Element four, length 5: 5
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-in.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-in.xml
new file mode 100644
index 0000000000..1a749ecafe
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-in.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<tns:test xmlns:tns="http://www.example.org/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <entry1>
+ <data>xxx<![CDATA[<?xml version="1.0"encoding="UTF-8"?><MOREXML>....</MOREXML>]]>aaaa<![CDATA[>>>>>>>>>]]></data>
+ <fred>abcdefg</fred>
+ <fred><![CDATA[>>>>>>>>>]]></fred>
+ <fred>xxx<![CDATA[<?xml version="1.0"encoding="UTF-8"?><MOREXML>....</MOREXML>]]>aaaa<![CDATA[>>>>>>>>>]]></fred>
+ <jim>xxx<![CDATA[<?xml version="1.0"encoding="UTF-8"?><MOREXML>....</MOREXML>]]>aaaa<![CDATA[>>>>>>>>>]]></jim>
+ </entry1>
+</tns:test>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-out.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-out.xml
new file mode 100644
index 0000000000..e6db2fbda0
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata-out.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:test xmlns:tns="http://www.example.org/test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><entry1><data>xxx<![CDATA[<?xml version="1.0"encoding="UTF-8"?><MOREXML>....</MOREXML>]]>aaaa<![CDATA[>>>>>>>>>]]></data><fred>abcdefg</fred><fred><![CDATA[>>>>>>>>>]]></fred><fred>xxx<![CDATA[<?xml version="1.0"encoding="UTF-8"?><MOREXML>....</MOREXML>]]>aaaa<![CDATA[>>>>>>>>>]]></fred><jim>xxx<![CDATA[<?xml version="1.0"encoding="UTF-8"?><MOREXML>....</MOREXML>]]>aaaa<![CDATA[>>>>>>>>>]]></jim></entry1></tns:test>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata.xsd
new file mode 100644
index 0000000000..5a7ff60c63
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cdata.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.example.org/test"
+ xmlns:tns="http://www.example.org/test">
+
+ <complexType name="TestType">
+ <sequence>
+ <element name="entry1">
+ <complexType>
+ <sequence>
+ <element name="data" type="string"/>
+ <element name="fred" type="string" maxOccurs="unbounded"/>
+ <any namespace="##any" processContents="lax"/>
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+
+ <element name="test" type="tns:TestType"/>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-in.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-in.xml
new file mode 100644
index 0000000000..192c26d15e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-in.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<Clone xmlns="http://www.example.org/test"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.example.org/test clone.xsd ">
+ abc
+ <test>test</test>
+ def
+ <tests>test</tests>
+ <tests>tests again</tests>
+ ghi
+</Clone>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out-win.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out-win.xml
new file mode 100644
index 0000000000..ee538bc438
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out-win.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:Clone xmlns:tns="http://www.example.org/test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ abc
+ <test>test</test>
+ def
+ <tests>test</tests>
+ <tests>tests again</tests>
+ ghi</tns:Clone>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out.xml
new file mode 100644
index 0000000000..5f711e11f5
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone-out.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:Clone xmlns:tns="http://www.example.org/test" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ abc
+ <test>test</test>
+ def
+ <tests>test</tests>
+ <tests>tests again</tests>
+ ghi
+</tns:Clone>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone.xsd
new file mode 100644
index 0000000000..72c7110cb3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/clone.xsd
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+xmlns:tns="http://www.example.org/test"
+targetNamespace="http://www.example.org/test">
+
+<complexType name="CloneType" mixed="true">
+ <sequence>
+ <element name="test" type="string"/>
+ <any namespace="##any"/>
+ </sequence>
+</complexType>
+
+<element name="Clone" type="tns:CloneType"/>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company.xsd
new file mode 100644
index 0000000000..d165367196
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company.xsd
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="cs" type="sdo:ChangeSummaryType"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" sdoxml:propertyType="company:EmployeeType"/>
+ </xsd:complexType>
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xml
new file mode 100644
index 0000000000..3680df3ccf
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <!-- This XML has an employee with an SN of nil, which should appear in the SDO as NULL
+ -->
+ <company xmlns="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MegaCorp" employeeOfTheMonth="#/departments.0/employees.1">
+<departments name="Advanced Technologies" location="NY" number="123">
+<employees>
+<name>Jane Doe</name>
+<SN xsi:nil="true" />
+</employees>
+</departments>
+</company> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xsd
new file mode 100644
index 0000000000..9af4d3e721
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/company_with_nillable_SN.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- This XSD recasts the properties of employee to elements in order to allow the SN property to be nillable -->
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF"
+sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ <xsd:complexType name="EmployeeType">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="SN" type="xsd:ID" nillable="true"/>
+ <xsd:element name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companyabs.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companyabs.xsd
new file mode 100644
index 0000000000..d9fa48be8c
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companyabs.xsd
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:element name="Publication" type="company:PublicationType" abstract="true"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ <xsd:element ref="company:Publication" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="cs" type="sdo:ChangeSummaryType"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" sdoxml:propertyType="company:EmployeeType"/>
+ </xsd:complexType>
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ <xsd:complexType name="BookType">
+ <xsd:restriction base="company:PublicationType" />
+ <xsd:element name="author" type="xsd:string" maxOccurs="1"/>
+ </xsd:complexType>
+ <xsd:complexType name="MagazineType">
+ <xsd:restriction base="company:PublicationType" />
+ <xsd:element name="editor" type="xsd:string" maxOccurs="1"/>
+ </xsd:complexType>
+ <xsd:complexType name="PublicationType" abstract="true" >
+ <xsd:element name="title" type="xsd:string" maxOccurs="1"/>
+ </xsd:complexType>
+ <xsd:element name="Book" type="company:BookType" substitutionGroup="company:Publication" />
+ <xsd:element name="Magazine" type="company:MagazineType" substitutionGroup="company:Publication" />
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companyref.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companyref.xsd
new file mode 100644
index 0000000000..1f706fca8f
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companyref.xsd
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+ elementFormDefault="qualified">
+
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ <xsd:element name="my.Publication" ref="publication" sdo:name="MyPublication" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="cs" type="sdo:ChangeSummaryType"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" sdoxml:propertyType="company:EmployeeType"/>
+ </xsd:complexType>
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ <xsd:complexType name="BookType">
+ <xsd:restriction base="company:PublicationType" />
+ <xsd:element name="author" type="xsd:string" maxOccurs="1"/>
+ </xsd:complexType>
+ <xsd:complexType name="MagazineType">
+ <xsd:restriction base="company:PublicationType" />
+ <xsd:element name="editor" type="xsd:string" maxOccurs="1"/>
+ </xsd:complexType>
+ <xsd:complexType name="PublicationType">
+ <xsd:element name="title" type="xsd:string" maxOccurs="1"/>
+ </xsd:complexType>
+ <xsd:element name="my.book" sdo:name="MyBook" type="company:BookType" substitutionGroup="Publication" />
+ <xsd:element name="my.magazine" sdo:name="MyMagazine" type="company:MagazineType" substitutionGroup="company:Publication" />
+ <xsd:element name="my.publication" sdo:name="MyPublication" type="company:PublicationType"/>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companysubs.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companysubs.xsd
new file mode 100644
index 0000000000..3e16090350
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/companysubs.xsd
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ <xsd:element name="Publication" type="company:PublicationType" maxOccurs="1"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="cs" type="sdo:ChangeSummaryType"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" sdoxml:propertyType="company:EmployeeType"/>
+ </xsd:complexType>
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ <xsd:complexType name="BookType">
+ <xsd:restriction base="company:PublicationType" />
+ <xsd:element name="author" type="xsd:string" maxOccurs="1"/>
+ </xsd:complexType>
+ <xsd:complexType name="MagazineType">
+ <xsd:restriction base="company:PublicationType" />
+ <xsd:element name="editor" type="xsd:string" maxOccurs="1"/>
+ </xsd:complexType>
+ <xsd:complexType name="PublicationType">
+ <xsd:element name="title" type="xsd:string" maxOccurs="1"/>
+ </xsd:complexType>
+ <xsd:element name="Book" type="company:BookType" substitutionGroup="Publication" />
+ <xsd:element name="Magazine" type="company:MagazineType" substitutionGroup="company:Publication" />
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload-output.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload-output.txt
new file mode 100644
index 0000000000..bdd05c0a32
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload-output.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<company xsi:type="tns2:CompanyType" xmlns:tns2="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MegaCorp" employeeOfTheMonth="E0004"><sdo:changeSummary xmlns:sdo="commonj.sdo" logging="true"><create>#/departments.0/employees.2</create><delete>#/departments.0/employees.1</delete><create>#/departments.0/employees.3</create><create>#/departments.0/employees.4</create><company sdo:ref="#/" employeeOfTheMonth="" name="ACME" employeeOfTheMonth="#/departments.0/employees.1"/><departments sdo:ref="#/departments.0"><employees sdo:ref="#/departments.0/employees.0"/><employees name="Mary Smith" SN="E0002" manager="true"/><employees sdo:ref="#/departments.0/employees.1"/></departments></sdo:changeSummary><departments name="Advanced Technologies" location="NY" number="123"><employees name="John Jones" SN="E0001"/><employees name="Jane Doe" SN="E0003"/><employees name="Al Smith" SN="E0004" manager="true"/><employees name="Bill Withers" SN="E0005"/><employees name="Mary Smith" SN="E0002" manager="true"/></departments></company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload2-output.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload2-output.txt
new file mode 100644
index 0000000000..1094229a7f
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload2-output.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<company xsi:type="tns2:CompanyType" xmlns:tns2="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MegaCorp" employeeOfTheMonth="E0005"><sdo:changeSummary xmlns:sdo="commonj.sdo" logging="true"><delete>#/departments.0/employees.1</delete><delete>#/departments.0/employees.1</delete><delete>#/departments.0/employees.1</delete><delete>#/departments.1/employees.4</delete><delete>#/departments.1/employees.3</delete><delete>#/departments.1/employees.2</delete><delete>#/departments.1/employees.1</delete><delete>#/departments.1/employees.0</delete><delete>#/departments.1</delete><create>#/departments.0/employees.2</create><company sdo:ref="#/" employeeOfTheMonth="" name="Eastleigh Borough Council"><departments sdo:ref="#/departments.0"/><departments name="Tax Collection" location="Winchester" number="666"><employees name="Arch Meanie" SN="D0001" manager="false"/><employees name="Boris the Spider" SN="D0002" manager="true"/><employees name="Cash Hoarder" SN="D0003" manager="false"/><employees name="Dean Giyatoss" SN="D0004" manager="false"/><employees name="Ebenezer Scrooge" SN="D0005" manager="false"/></departments></company><departments sdo:ref="#/departments.0"><employees sdo:ref="#/departments.0/employees.0"/><employees name="Bridget Jones" SN="E0002" manager="true"/><employees name="Colin Thorne" SN="E0003" manager="false"/><employees name="Donald Trump" SN="E0004" manager="false"/><employees sdo:ref="#/departments.0/employees.1"/></departments></sdo:changeSummary><departments name="Waste Disposal" location="Botley" number="123"><employees name="Alphonse Dodet" SN="E0001"/><employees name="Eddy the eagle" SN="E0005"/><employees name="Colin Thorne" SN="E0003"/></departments></company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload3-output.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload3-output.txt
new file mode 100644
index 0000000000..1094229a7f
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/csload3-output.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<company xsi:type="tns2:CompanyType" xmlns:tns2="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MegaCorp" employeeOfTheMonth="E0005"><sdo:changeSummary xmlns:sdo="commonj.sdo" logging="true"><delete>#/departments.0/employees.1</delete><delete>#/departments.0/employees.1</delete><delete>#/departments.0/employees.1</delete><delete>#/departments.1/employees.4</delete><delete>#/departments.1/employees.3</delete><delete>#/departments.1/employees.2</delete><delete>#/departments.1/employees.1</delete><delete>#/departments.1/employees.0</delete><delete>#/departments.1</delete><create>#/departments.0/employees.2</create><company sdo:ref="#/" employeeOfTheMonth="" name="Eastleigh Borough Council"><departments sdo:ref="#/departments.0"/><departments name="Tax Collection" location="Winchester" number="666"><employees name="Arch Meanie" SN="D0001" manager="false"/><employees name="Boris the Spider" SN="D0002" manager="true"/><employees name="Cash Hoarder" SN="D0003" manager="false"/><employees name="Dean Giyatoss" SN="D0004" manager="false"/><employees name="Ebenezer Scrooge" SN="D0005" manager="false"/></departments></company><departments sdo:ref="#/departments.0"><employees sdo:ref="#/departments.0/employees.0"/><employees name="Bridget Jones" SN="E0002" manager="true"/><employees name="Colin Thorne" SN="E0003" manager="false"/><employees name="Donald Trump" SN="E0004" manager="false"/><employees sdo:ref="#/departments.0/employees.1"/></departments></sdo:changeSummary><departments name="Waste Disposal" location="Botley" number="123"><employees name="Alphonse Dodet" SN="E0001"/><employees name="Eddy the eagle" SN="E0005"/><employees name="Colin Thorne" SN="E0003"/></departments></company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cssave-output.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cssave-output.txt
new file mode 100644
index 0000000000..7e6f5789c3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cssave-output.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:company xmlns:tns="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MegaCorp" employeeOfTheMonth="E0004"><sdo:changeSummary xmlns:sdo="commonj.sdo"><create>#/departments.0/employees.2</create><delete>#/departments.0/employees.1</delete><create>#/departments.0/employees.3</create><create>#/departments.0/employees.4</create><departments sdo:ref="#/departments.0"><employees sdo:ref="#/departments.0/employees.0"/><employees name="Mary Smith" SN="E0002" manager="true"/><employees sdo:ref="#/departments.0/employees.1"/></departments><company sdo:ref="#/" name="ACME" employeeOfTheMonth="#/departments.0/employees.1"/></sdo:changeSummary><departments name="Advanced Technologies" location="NY" number="123"><employees name="John Jones" SN="E0001"/><employees name="Jane Doe" SN="E0003"/><employees name="Al Smith" SN="E0004" manager="true"/><employees name="Bill Withers" SN="E0005"/><employees name="Mary Smith" SN="E0002" manager="true"/></departments></tns:company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cssave2-output.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cssave2-output.txt
new file mode 100644
index 0000000000..5549be0a44
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/cssave2-output.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:company xmlns:tns="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MegaCorp" employeeOfTheMonth="E0005"><sdo:changeSummary xmlns:sdo="commonj.sdo"><delete>#/departments.0/employees.1</delete><delete>#/departments.0/employees.1</delete><delete>#/departments.0/employees.1</delete><delete>#/departments.1/employees.4</delete><delete>#/departments.1/employees.3</delete><delete>#/departments.1/employees.2</delete><delete>#/departments.1/employees.1</delete><delete>#/departments.1/employees.0</delete><delete>#/departments.1</delete><create>#/departments.0/employees.2</create><departments sdo:ref="#/departments.0"><employees sdo:ref="#/departments.0/employees.0"/><employees name="Bridget Jones" SN="E0002" manager="true"/><employees name="Colin Thorne" SN="E0003" manager="false"/><employees name="Donald Trump" SN="E0004" manager="false"/><employees sdo:ref="#/departments.0/employees.1"/></departments><company sdo:ref="#/" name="Eastleigh Borough Council" employeeOfTheMonth=""><departments sdo:ref="#/departments.0"/><departments name="Tax Collection" location="Winchester" number="666"><employees name="Arch Meanie" SN="D0001" manager="false"/><employees name="Boris the Spider" SN="D0002" manager="true"/><employees name="Cash Hoarder" SN="D0003" manager="false"/><employees name="Dean Giyatoss" SN="D0004" manager="false"/><employees name="Ebenezer Scrooge" SN="D0005" manager="false"/></departments></company></sdo:changeSummary><departments name="Waste Disposal" location="Botley" number="123"><employees name="Alphonse Dodet" SN="E0001"/><employees name="Eddy the eagle" SN="E0005"/><employees name="Colin Thorne" SN="E0003"/></departments></tns:company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/datetest.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/datetest.txt
new file mode 100644
index 0000000000..3da923ea55
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/datetest.txt
@@ -0,0 +1,4 @@
+Name of the company is DateTest
+Set start of the company is 1000
+Review number:0 was:2000
+Review number:1 was:4000
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/defaults.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/defaults.txt
new file mode 100644
index 0000000000..1cdba8ea05
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/defaults.txt
@@ -0,0 +1,10 @@
+Boolean default is true: 1
+Byte default is d: 100
+Character default is e: 101
+Short default is 300: 300
+Long default is 400: 400
+Expected index out of range OK
+Float default is 600: 600.000
+LongDouble default is 700: 700.000
+String default is HELP: HELP
+Bytes default is HELP: HELP
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.txt
new file mode 100644
index 0000000000..b08b52a605
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.txt
@@ -0,0 +1,2 @@
+RootURI=companyNS
+RootName=company
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xml
new file mode 100644
index 0000000000..0e1a4e1a7e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<company xmlns="companyNS" name="MegaCorp" employeeOfTheMonth="#/departments.0/employees.1">
+<departments name="Advanced Technologies" location="NY" number="123">
+<employees name="John Jones" SN="E0001" />
+<employees name="Jane Doe" SN="E0003" />
+<employees name="Al Smith" SN="E0004" manager="true" />
+</departments>
+</company> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xsd
new file mode 100644
index 0000000000..0c953a6348
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/doctest.xsd
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF"
+sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+</xsd:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq.xsd
new file mode 100644
index 0000000000..11fcdd956e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq.xsd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema targetNamespace="test"
+ xmlns="test" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+ <xs:element name="x" type="xT"/>
+
+ <xs:complexType name="xT">
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="a" type="aT" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="b" type="xs:string" />
+ </xs:choice>
+ </xs:complexType>
+
+ <xs:complexType name="aT">
+ <xs:choice maxOccurs="unbounded">
+ <xs:element name="a1" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
+ <xs:element name="a2" type="xs:string" minOccurs="0" maxOccurs="unbounded" />
+ </xs:choice>
+ </xs:complexType>
+
+</xs:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq_expected.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq_expected.xml
new file mode 100644
index 0000000000..bb44dd330f
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/elementFormDefaultQualifiedSeq_expected.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<a xsi:type="tns2:aT" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns2="test">
+ <tns2:a1>test data</tns2:a1>
+</a>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/employee.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/employee.xsd
new file mode 100644
index 0000000000..e2eec63eea
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/employee.xsd
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+<xs:element name="employee" type="fullpersoninfo"/>
+
+<xs:complexType name="personinfo">
+ <xs:sequence>
+ <xs:element name="firstname" type="xs:string"/>
+ <xs:element name="lastname" type="xs:string"/>
+ </xs:sequence>
+</xs:complexType>
+
+<xs:complexType name="fullpersoninfo">
+ <xs:complexContent>
+ <xs:extension base="personinfo">
+ <xs:sequence>
+ <xs:element name="address" type="xs:string"/>
+ <xs:element name="city" type="xs:string"/>
+ <xs:element name="country" type="xs:string"/>
+ </xs:sequence>
+ </xs:extension>
+ </xs:complexContent>
+</xs:complexType>
+
+</xs:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs1.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs1.txt
new file mode 100644
index 0000000000..7ab37e28a5
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs1.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:company xmlns:tns="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME" employeeOfTheMonth="E0002"><sdo:changeSummary xmlns:sdo="commonj.sdo"/><departments name="Advanced Technologies" location="NY" number="123"><employees name="John Jones" SN="E0001"/><employees name="Mary Smith" SN="E0002" manager="true"/><employees name="Jane Doe" SN="E0003"/></departments></tns:company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs2.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs2.txt
new file mode 100644
index 0000000000..8e4fe720e5
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs2.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:company xmlns:tns="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME" employeeOfTheMonth="E0002"><sdo:changeSummary xmlns:sdo="commonj.sdo" logging="true"/><departments name="Advanced Technologies" location="NY" number="123"><employees name="John Jones" SN="E0001"/><employees name="Mary Smith" SN="E0002" manager="true"/><employees name="Jane Doe" SN="E0003"/></departments></tns:company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs3.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs3.txt
new file mode 100644
index 0000000000..4195c4aeb8
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/emptycs3.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:company xmlns:tns="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME" employeeOfTheMonth="E0002"><sdo:changeSummary xmlns:sdo="commonj.sdo"><create>#/departments.0/employees.3</create><departments sdo:ref="#/departments.0"><employees sdo:ref="#/departments.0/employees.0"/><employees sdo:ref="#/departments.0/employees.1"/><employees sdo:ref="#/departments.0/employees.2"/></departments></sdo:changeSummary><departments name="Advanced Technologies" location="NY" number="123"><employees name="John Jones" SN="E0001"/><employees name="Mary Smith" SN="E0002" manager="true"/><employees name="Jane Doe" SN="E0003"/><employees name="Al Smith" SN="E0004" manager="true"/></departments></tns:company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xml
new file mode 100644
index 0000000000..3680df3ccf
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <!-- This XML has an employee with an SN of nil, which should appear in the SDO as NULL
+ -->
+ <company xmlns="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="MegaCorp" employeeOfTheMonth="#/departments.0/employees.1">
+<departments name="Advanced Technologies" location="NY" number="123">
+<employees>
+<name>Jane Doe</name>
+<SN xsi:nil="true" />
+</employees>
+</departments>
+</company> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xsd
new file mode 100644
index 0000000000..6246be5efa
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/error1.xsd
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!-- This XSD recasts the properties of employee to elements in order to allow the SN property to be nillable -->
+<xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF"
+sdoxml:propertyType="company:EmployeeType"/> </xsd:complexType>
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ <xsd:complexType name="EmployeeType">
+ <xsd:element name="name" type="xsd:string"/>
+ <xsd:element name="SN" type="xsd:ID" nillable="true"/>
+ <xsd:element name="manager" type="xsd:boolean"/>
+
+</xsd:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/extension.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/extension.xsd
new file mode 100644
index 0000000000..7e6b336516
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/extension.xsd
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<!--
+ This example simplified version of W3C XML schema primer
+ with added UK postcode
+ http://www.w3.org/TR/xmlschema-0/#DerivExt
+ -->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="" >
+
+ <complexType name="Address">
+ <sequence>
+ <element name="name" type="string"/>
+ <element name="street" type="string"/>
+ <element name="city" type="string"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="USAddress">
+ <complexContent>
+ <extension base="Address">
+ <sequence>
+ <element name="zip" type="positiveInteger"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <complexType name="UKAddress">
+ <complexContent>
+ <extension base="Address">
+ <sequence>
+ <element name="postcode" type="string"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xml
new file mode 100644
index 0000000000..6abc3787ae
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--447-->
+<RootElement33 xmlns="http://www.apache.org/tuscany/interop"
+ xmlns:tns="http://www.apache.org/tuscany/interop"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.apache.org/tuscany/interop fidelity.xsd">
+
+ <ComplexTypeAttributesTest Attribute="Attribute"
+ AttributeWithDefaultValue="AttributeWithDefaultValueDefaultValue"
+ AttributeWithFixedValue="AttributeWithFixedValueFixedValue"
+ AttributeWithSDOAliasName="AttributeWithSDOAliasName"
+ AttributeWithSDODataType="AttributeWithSDODataType"
+ AttributeWithSDOName="AttributeWithSDODataType"
+ AttributeWithSDOPropertySDOOppositePropertyType="idvalue0"
+ AttributeWithSDOPropertyType="idvalue0"
+ AttributeWithSDOString="AttributeWithSDOString"
+ AttributeReference="AttributeReference"/>
+
+ <!--450-->
+ <ElementOfSimpleTypeWithSDOPropertyType>idvalue0</ElementOfSimpleTypeWithSDOPropertyType>
+ <ElementOfSimpleTypeWithSDOOppositePropertyType>idvalue0</ElementOfSimpleTypeWithSDOOppositePropertyType>
+
+ <!--445-->
+ <ComplexTypeOpenContent>
+ <tns:ElementSubstitutionGroupExtends>
+ <ElementInSubstitutionGroupBase>ElementInSubstitutionGroupBase</ElementInSubstitutionGroupBase>
+ <ElementInSubstitutionGroupExtends>ElementInSubstitutionGroupExtends</ElementInSubstitutionGroupExtends>
+ </tns:ElementSubstitutionGroupExtends>
+ </ComplexTypeOpenContent>
+
+</RootElement33> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xsd
new file mode 100644
index 0000000000..e57ba569d3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/fidelity.xsd
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<!--447-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.apache.org/tuscany/interop"
+ xmlns:tns="http://www.apache.org/tuscany/interop"
+ xmlns:sdo="commonj.sdo">
+
+ <!--488-->
+ <simpleType name="SimpleTypeWithNameType">
+ <restriction base="string"/>
+ </simpleType>
+ <element name="RootElement6" type="tns:SimpleTypeWithNameType"/>
+
+ <!--445-->
+ <complexType name="ComplexTypeOpenContentType">
+ <sequence>
+ <any namespace="##any"/>
+ </sequence>
+ </complexType>
+
+ <attribute name="AttributeReference" type="string"/>
+
+ <complexType name="ComplexTypeAttributesTestType">
+ <sequence>
+ </sequence>
+ <attribute name="Attribute" type="string"/>
+ <attribute name="AttributeWithSDOName" sdo:name="AttributeWithSDONameSDOName" type="string"/>
+ <attribute name="AttributeWithSDOAliasName" sdo:aliasName="AttributeWithSDOAliasNameSDOAliasName" type="string"/>
+ <attribute name="AttributeWithDefaultValue" type="string" default="AttributeWithDefaultValueDefaultValue"/>
+ <attribute name="AttributeWithFixedValue" type="string" fixed="AttributeWithFixedValueFixedValue"/>
+ <attribute ref="tns:AttributeReference"/>
+ <attribute name="AttributeWithSDOString" type="string" sdo:string="true"/>
+ <attribute name="AttributeWithSDOPropertyType" type="IDREF" sdo:propertyType="tns:SimpleTypeWithNameType"/>
+ <attribute name="AttributeWithSDOPropertySDOOppositePropertyType" type="IDREF" sdo:propertyType="tns:SimpleTypeWithNameType" sdo:oppositeProperty="tns:AttributeWithSDOPropertyType"/>
+ <attribute name="AttributeWithSDODataType" sdo:dataType="string" type="string"/>
+ </complexType>
+
+ <element name="RootElement33">
+ <complexType>
+ <sequence>
+ <element name="ComplexTypeAttributesTest" type="tns:ComplexTypeAttributesTestType"/>
+
+ <!--450-->
+ <element name="ElementOfSimpleTypeWithSDOPropertyType" type="IDREF" sdo:propertyType="tns:SimpleTypeWithNameType"/>
+ <element name="ElementOfSimpleTypeWithSDOOppositePropertyType" type="IDREF" sdo:propertyType="tns:SimpleTypeWithNameType" sdo:oppositeProperty="tns:ElementOfSimpleTypeWithSDOPropertyType"/>
+
+ <!--445-->
+ <element name="ComplexTypeOpenContent" type="tns:ComplexTypeOpenContentType"/>
+
+ </sequence>
+ </complexType>
+ </element>
+
+ <!--449-->
+
+ <complexType name="ComplexTypeSubstitutionGroupBaseType">
+ <sequence>
+ <element name="ElementInSubstitutionGroupBase" type="string"/>
+ </sequence>
+ </complexType>
+ <element name="ElementSubstitutionGroupBase" type="tns:ComplexTypeSubstitutionGroupBaseType"/>
+
+ <complexType name="ComplexTypeSubstitutionGroupExtendsType">
+ <complexContent>
+ <extension base="tns:ComplexTypeSubstitutionGroupBaseType">
+ <sequence>
+ <element name="ElementInSubstitutionGroupExtends" type="string"/>
+ </sequence>
+ </extension>
+ </complexContent>
+ </complexType>
+ <element name="ElementSubstitutionGroupExtends" type="tns:ComplexTypeSubstitutionGroupExtendsType" substitutionGroup="tns:ElementSubstitutionGroupBase"/>
+
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gCustomer.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gCustomer.xsd
new file mode 100644
index 0000000000..055d758ca4
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gCustomer.xsd
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ xmlns:cust="customerNS" targetNamespace="customerNS">
+ <element name="customer" type="cust:CustomerType">
+ <complexType name="CustomerType">
+ <sequence>
+ <element name="customerId" type="ID"/>
+ <element name="name" type="string"/>
+ <element name="shipping" type="cust:AddressType">
+ <complexType name="AddressType">
+ <element name="street" type="string"/>
+ <element name="city" type="string"/>
+ <element name="state" type="string"/>
+ <element name="zip" type="string"/>
+ </complexType>
+ </element>
+ <element name="payment" ref="cust:payment"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="payment" type="cust:PaymentType">
+ <complexType name="PaymentType">
+ <element name="paymentId" type="ID"/>
+ <element name="accountNo" type="string"/>
+ <element name="bank" type="string"/>
+ <element name="securityCode" type="string"/>
+ <element name="amount" type="float"/>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xml
new file mode 100644
index 0000000000..91a31c45f2
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<order xmlns="orderNS" xsi:type="OrderType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><orderId>1132323800</orderId><status>NONE</status><item><itemId>12</itemId><description>Drummers drumming</description><price>12.99</price><quantity>1</quantity><warehouseId>1</warehouseId></item><item><itemId>3</itemId><description>French Hens</description><price>3.99</price><quantity>2</quantity><warehouseId>1</warehouseId></item><customer xmlns="customerNS"><customerId>1</customerId><name>Graham Charters</name><shipping><street>24 Big Street</street><city>Big City</city><state>Big State</state><zip>Up Your Coat</zip></shipping><payment><accountNo>234234234243</accountNo><bank>Big</bank><securityCode>234</securityCode><amount>2.097e+001</amount></payment></customer></order>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xsd
new file mode 100644
index 0000000000..33683b1c62
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g/gOrder.xsd
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+xmlns:ord="orderNS" xmlns:cust="customerNS" targetNamespace="orderNS">
+
+ <include schemaLocation="./Customer.xsd"/>
+
+ <element name="order" type="ord:OrderType">
+ <complexType name="OrderType">
+ <sequence>
+ <element name="orderId" type="ID"/>
+ <element name="status" type="ord:OrderStatus"/>
+ <element name="item" maxOccurs="unbounded" ref="ord:item"/>
+ <element ref="cust:customer"/>
+ </sequence>
+ </complexType>
+ </element>
+
+ <element name="item">
+ <complexType>
+ <element name="itemId" type="integer"/>
+ <element name="description" type="string"/>
+ <element name="price" type="string"/>
+ <element name="quantity" type="integer"/>
+ <element name="warehouseId" type="integer"/>
+ </complexType>
+ </element>
+
+ <simpleType name="OrderStatus">
+ <restriction base="string">
+ <enumeration value="NONE"/>
+ <enumeration value="RECEIVED"/>
+ <enumeration value="INVOICED"/>
+ <enumeration value="DISPATCHED"/>
+ <enumeration value="COMPLETED"/>
+ <enumeration value="CANCELLED"/>
+ </restriction>
+ </simpleType>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g3.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g3.xsd
new file mode 100644
index 0000000000..4ed8b44fc2
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/g3.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:element name="quotes">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="quote"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="quote">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="phrase"/>
+ <xs:element ref="author"/>
+ </xs:sequence>
+ <xs:attribute name="year" use="required" type="xs:integer"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="phrase" type="xs:string"/>
+ <xs:element name="author" type="xs:string"/>
+</xs:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/getproptest.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/getproptest.txt
new file mode 100644
index 0000000000..f6bea1325d
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/getproptest.txt
@@ -0,0 +1,8 @@
+Companys name property is: name
+Companys dept property is:departments
+Departments empl property is:employees
+Departments empl property is:employees
+Employees name property is:name
+Normal exception caught
+Normal exception caught
+Normal exception caught
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham1.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham1.xsd
new file mode 100644
index 0000000000..9c07e4b75d
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham1.xsd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:element name="quotes">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="quote"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="quote">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="phrase"/>
+ <xs:element ref="author"/>
+ </xs:sequence>
+ <xs:attribute name="year" use="required" type="xs:integer"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="phrase" type="xs:string"/>
+ <xs:element name="author" type="xs:string"/>
+</xs:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham2.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham2.xsd
new file mode 100644
index 0000000000..0148a42e41
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham2.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+xmlns:quotes="quotesNS" targetNamespace="quotesNS">
+<xs:element name="quotes">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="quote"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="quote" >
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="phrase" type="xs:string"/>
+ <xs:element name="author" type="xs:string"/>
+ </xs:sequence>
+ <xs:attribute name="year" use="required" type="xs:integer"/>
+ </xs:complexType>
+ </xs:element>
+</xs:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham3.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham3.xsd
new file mode 100644
index 0000000000..969a6f8eb0
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/graham3.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
+>
+<!--
+xmlns:quotes="quotesNS" targetNamespace="quotesNS"
+-->
+<xs:element name="quotes">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="quote" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="phrase" type="xs:string"/>
+ <xs:element name="author" type="xs:string"/>
+ </xs:sequence>
+ <xs:attribute name="year" use="required" type="xs:integer"/>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup.xsd
new file mode 100644
index 0000000000..3e4a1a7d3a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup.xsd
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wrox.com/name"
+xmlns:target="http://www.wrox.com/name" elementFormDefault="qualified">
+ <group name="NameGroup">
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ <group name="NameGroup2">
+ <sequence>
+ <element name="first2" type="string"/>
+ <element name="middle2" type="string"/>
+ <element name="last2" type="string"/>
+ </sequence>
+ </group>
+ </sequence>
+ </group>
+ <element name="name">
+ <complexType>
+ <group ref="NameGroup"/>
+ <group ref="NameGroup2"/>
+ <attribute name="title" type="string"/>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup_xsd.txt
new file mode 100644
index 0000000000..7eba22a274
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupingroup_xsd.txt
@@ -0,0 +1,25 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup.xsd
new file mode 100644
index 0000000000..8e8a7aded6
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup.xsd
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wrox.com/name"
+xmlns:target="http://www.wrox.com/name" elementFormDefault="qualified">
+ <group name="NameGroup2">
+ <sequence>
+ <element name="first2" type="string"/>
+ <element name="middle2" type="string"/>
+ <element name="last2" type="string"/>
+ </sequence>
+ </group>
+ <group name="NameGroup">
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ <group ref="target:NameGroup2"/>
+ </sequence>
+ </group>
+ <element name="name">
+ <complexType>
+ <group ref="target:NameGroup"/>
+ <attribute name="title" type="string"/>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup_xsd.txt
new file mode 100644
index 0000000000..f879c8adb2
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouprefingroup_xsd.txt
@@ -0,0 +1,29 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:first2 of type String
+Property:middle2 of type String
+Property:last2 of type String
+Property:title of type String
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate.xsd
new file mode 100644
index 0000000000..1e1b5c5678
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate.xsd
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wrox.com/name"
+xmlns:target="http://www.wrox.com/name" elementFormDefault="qualified">
+ <element name="name">
+ <complexType>
+ <group ref="target:NameGroup"/>
+ <attribute name="title" type="string"/>
+ </complexType>
+ </element>
+ <group name="NameGroup">
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ </sequence>
+ </group>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate_xsd.txt
new file mode 100644
index 0000000000..81ccaee474
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/grouptoolate_xsd.txt
@@ -0,0 +1,26 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix.xsd
new file mode 100644
index 0000000000..fc61269d42
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix.xsd
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wrox.com/name"
+xmlns:target="http://www.wrox.com/name" elementFormDefault="qualified">
+ <group name="NameGroup">
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ </sequence>
+ </group>
+ <element name="name">
+ <complexType>
+ <group ref="target:NameGroup"/>
+ <attribute name="title" type="string"/>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix_xsd.txt
new file mode 100644
index 0000000000..81ccaee474
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwithprefix_xsd.txt
@@ -0,0 +1,26 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:name of type name
+Type:http://www.wrox.com/name#name
+Property:first of type String
+Property:middle of type String
+Property:last of type String
+Property:title of type String
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwrongname.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwrongname.xsd
new file mode 100644
index 0000000000..8905af53d8
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/groupwrongname.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.wrox.com/name"
+xmlns:target="http://www.wrox.com/name" elementFormDefault="qualified">
+ <group name="NoNameGroup">
+ <sequence>
+ <element name="first" type="string"/>
+ <element name="middle" type="string"/>
+ <element name="last" type="string"/>
+ </sequence>
+ </group>
+ <element name="name">
+ <complexType>
+ <group ref="target:NameGroup"/>
+ <attribute name="title" type="string"/>
+ </complexType>
+ </element>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/inc1.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/inc1.txt
new file mode 100644
index 0000000000..bf517ec394
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/inc1.txt
@@ -0,0 +1,22 @@
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://example.org/Calculator#RootType
+Type:http://example.org/CalculatorTypes#AddArguments
+Property:a
+Property:b
+Type:http://example.org/CalculatorTypes#RootType
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/inc2.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/inc2.txt
new file mode 100644
index 0000000000..ac4a97479f
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/inc2.txt
@@ -0,0 +1,21 @@
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://example.org/Calculator#AddArguments
+Property:a
+Property:b
+Type:http://example.org/Calculator#RootType
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include.xsd
new file mode 100644
index 0000000000..904ec8e1fd
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:include schemaLocation = "include1.xsd"/>
+ <xsd:include schemaLocation = "./include2.xsd"/>
+ <xsd:include schemaLocation = "../test/test/include3.xsd"/>
+
+
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include1.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include1.xsd
new file mode 100644
index 0000000000..8c4187077c
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="cs" type="sdo:ChangeSummaryType"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" sdoxml:propertyType="company:EmployeeType"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include2.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include2.xsd
new file mode 100644
index 0000000000..5c05afdf36
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/include2.xsd
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/includeother3.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/includeother3.xsd
new file mode 100644
index 0000000000..c661f6871e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/includeother3.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira1112expected.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira1112expected.xml
new file mode 100644
index 0000000000..afbfc26c23
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira1112expected.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<BOGUS xsi:type="tns2:add" xmlns:tns2="http://Component" xmlns:tns3="http://www.test.com/info" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <person>
+ <name>
+ <first>Will</first>
+ <last>Shakespeare</last>
+ </name>
+ </person>
+</BOGUS>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira490.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira490.txt
new file mode 100644
index 0000000000..4527deb32a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira490.txt
@@ -0,0 +1,53 @@
+Test Program starting to create types ...
+
+Before Resolution
+
+Printing Types
+Type BigDecimal
+Type BigInteger
+Type Boolean
+Type Byte
+Type Bytes
+Type ChangeSummary
+Type Character
+Type DataObject
+Type Date
+Type Double
+Type Float
+Type Integer
+Type Long
+Type OpenDataObject
+Type Short
+Type String
+Type URI
+Type Employee
+Has Property name of type String
+Has Property officeNumber of type String
+
+After Resolution
+
+Printing Types
+Type BigDecimal
+Type BigInteger
+Type Boolean
+Type Byte
+Type Bytes
+Type ChangeSummary
+Type Character
+Type DataObject
+Type Date
+Type Double
+Type Float
+Type Integer
+Type Long
+Type OpenDataObject
+Type Short
+Type String
+Type URI
+Type Employee
+Has Property name of type String
+Has Property officeNumber of type String
+Mr A Trader
+123
+123
+{
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira705.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira705.xsd
new file mode 100644
index 0000000000..0001371677
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira705.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://ConvertedStockQuote">
+ <xs:element name="getQuote">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="ticker1" type="xs:string" nillable="true"/>
+ <xs:element name="ticker2" type="xs:string" nillable="true"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira705_out.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira705_out.txt
new file mode 100644
index 0000000000..8411d1e07c
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira705_out.txt
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<getQuote xsi:type="tns2:getQuote" xmlns:tns2="http://ConvertedStockQuote" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <ticker1>IBM</ticker1>
+ <ticker2 xsi:nil="true"/>
+</getQuote>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_animaltypes.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_animaltypes.xsd
new file mode 100644
index 0000000000..bdac34da46
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_animaltypes.xsd
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema">
+ <complexType name="snakeType">
+ <sequence>
+ <element name= "name" type="string"/>
+ <element name= "length" type="positiveInteger" />
+ </sequence>
+ </complexType>
+ <complexType name="bearType">
+ <sequence>
+ <element name= "name" type="string"/>
+ <element name= "weight" type="positiveInteger" />
+ </sequence>
+ </complexType>
+ <complexType name="pantherType">
+ <sequence>
+ <element name= "name" type="string"/>
+ <element name= "colour" type="string" />
+ </sequence>
+ </complexType>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle.xsd
new file mode 100644
index 0000000000..abe6132f08
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle.xsd
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema">
+ <element name="jungle">
+ <complexType>
+ <sequence>
+ <any minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle_out.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle_out.txt
new file mode 100644
index 0000000000..708fd26963
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_jungle_out.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jungle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><bear xsi:type="bearType"><name>Mummy bear</name><weight>700</weight></bear><panther xsi:type="pantherType"><name>Bagheera</name><colour>inky black</colour></panther><snake xsi:type="snakeType"><name>Kaa</name><length>25</length></snake></jungle>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle.xsd
new file mode 100644
index 0000000000..95697e1788
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle.xsd
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema">
+ <element name="mixedJungle">
+ <complexType mixed="true">
+ <sequence>
+ <any minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle_out.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle_out.txt
new file mode 100644
index 0000000000..63b4e85c26
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_mixedJungle_out.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mixedJungle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><bear xsi:type="bearType"><name>Mummy bear</name><weight>700</weight></bear><panther xsi:type="pantherType"><name>Bagheera</name><colour>inky black</colour></panther><snake xsi:type="snakeType"><name>Kaa</name><length>25</length></snake></mixedJungle>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_splitJungle_out.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_splitJungle_out.txt
new file mode 100644
index 0000000000..708fd26963
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/jira980_splitJungle_out.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<jungle xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><bear xsi:type="bearType"><name>Mummy bear</name><weight>700</weight></bear><panther xsi:type="pantherType"><name>Bagheera</name><colour>inky black</colour></panther><snake xsi:type="snakeType"><name>Kaa</name><length>25</length></snake></jungle>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xml
new file mode 100644
index 0000000000..a40accebc2
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<listtest
+ xmlns="http://www.wrox.com/name"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-Instance"
+ xsi:schemaLocation="http://www.wrox.com/name name.xsd">
+ <integers>1 2 3 4 5 6 7 8 9</integers>
+ <strings>
+ This
+is a strange
+ set of strings
+ </strings>
+</listtest>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xsd
new file mode 100644
index 0000000000..89faa4d68b
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1.xsd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.wrox.com/name"
+ xmlns:tns="http://www.wrox.com/name">
+
+<xs:element name="listtest" type="listTestType"/>
+<xs:complexType name="listTestType">
+ <xs:element name="integers" type="intListType"/>
+ <xs:element name="strings" type="stringListType"/>
+</xs:complexType>
+
+<xs:simpleType name="intListType">
+ <xs:list itemType="xs:integer"/>
+</xs:simpleType>
+
+<xs:simpleType name="stringListType">
+ <xs:list itemType="xs:string"/>
+</xs:simpleType>
+
+</xs:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xml.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xml.txt
new file mode 100644
index 0000000000..ddf8e8ac22
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xml.txt
@@ -0,0 +1,70 @@
+***** TYPES AFTER RESOLVE*********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:listtest of type listTestType
+Type:http://www.wrox.com/name#intListType
+Property:values (many) of type Integer
+Type:http://www.wrox.com/name#listTestType
+Property:integers (many) of type intListType
+Property:strings (many) of type stringListType
+Type:http://www.wrox.com/name#stringListType
+Property:values (many) of type String
+*******************************END TYPES******************
+===== DataObject contents =====
+integers: list dataObject[0]=
+===== DataObject contents =====
+values: list integer[0]=1
+
+integer[1]=2
+
+integer[2]=3
+
+integer[3]=4
+
+integer[4]=5
+
+integer[5]=6
+
+integer[6]=7
+
+integer[7]=8
+
+integer[8]=9
+
+===== End DataObject =====
+
+strings: list dataObject[0]=
+===== DataObject contents =====
+values: list string[0]=This
+
+string[1]=is
+
+string[2]=a
+
+string[3]=strange
+
+string[4]=set
+
+string[5]=of
+
+string[6]=strings
+
+===== End DataObject =====
+
+===== End DataObject =====
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xsd.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xsd.txt
new file mode 100644
index 0000000000..2adeaf3a7c
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/list1_xsd.txt
@@ -0,0 +1,28 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://www.wrox.com/name#RootType
+Property:listtest of type listTestType
+Type:http://www.wrox.com/name#intListType
+Property:values (many) of type Integer
+Type:http://www.wrox.com/name#listTestType
+Property:integers (many) of type intListType
+Property:strings (many) of type stringListType
+Type:http://www.wrox.com/name#stringListType
+Property:values (many) of type String
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/loadload-output.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/loadload-output.txt
new file mode 100644
index 0000000000..67f8c2d7eb
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/loadload-output.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<company xsi:type="tns2:CompanyType" xmlns:tns2="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME"><sdo:changeSummary xmlns:sdo="commonj.sdo" logging="true"><create>#/departments.0/employees.0/opendataobjectlist.0</create><create>#/departments.0/employees.0/opendataobject</create><create>#/departments.0/employees.0</create></sdo:changeSummary><departments name="Advanced Technologies" location="NY" number="123"><employees name="Albert" SN="E0001" openstring="Value Of Open String" openboolean="true"><openintlist>45</openintlist><tns2:opendataobjectlist name="MyOpenName"/><tns2:opendataobject name="MyOpenName"/></employees><employees name="Boris" SN="E0002" manager="true"/><employees name="Carl" SN="E0003"/></departments></company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/main.cpp b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/main.cpp
new file mode 100644
index 0000000000..dc5673e98d
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/main.cpp
@@ -0,0 +1,206 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include <stdio.h>
+
+#pragma warning(disable:4786)
+
+#include <iostream>
+using namespace std;
+
+#include "sdotest.h"
+
+extern "C"{
+
+#define TEST(testname)\
+ value = testname;\
+ totaltests++;\
+ if (value == 0) {\
+ cout << "Test Failed: " << totaltests << " " << #testname << endl;\
+ }\
+ testspassed += value;
+
+int main (int argc, char** argv)
+{
+ //Logger::setLogging(20);
+
+ int testspassed=0;
+ int totaltests=0;
+ int value = 0;
+ try {
+
+ //TEST ( sdotest::eBayTest() );
+ // TEST ( sdotest::xhtml1() );
+ TEST ( sdotest::scopetest() );
+ TEST ( sdotest::xsdtosdo() );
+ TEST ( sdotest::jira980() );
+
+ /* groups now supported*/
+ TEST ( sdotest::testany("list1.xsd",0,"list1.xml", 0) );
+ TEST ( sdotest::testany("b48636.xsd",0,"b48636.xml", 0) );
+ TEST ( sdotest::testany("groupwithprefix.xsd", 0, 0, 0) );
+ TEST ( sdotest::testany("groupwrongname.xsd","Use of undefined group NameGroup", 0, 0) );
+
+ // late definition of group now supported
+ TEST ( sdotest::testany("grouptoolate.xsd",0 , 0, 0) );
+
+ // group definition within group now ignored
+
+ TEST ( sdotest::testany("groupingroup.xsd","Use of undefined group NameGroup2",0, 0) );
+ TEST ( sdotest::testany("grouprefingroup.xsd",0,0, 0) );
+ TEST ( sdotest::testany("bothgroups.xsd",0,0, 0) );
+ TEST ( sdotest::testany("bothgroupssamename.xsd",0,0, 0) );
+
+ /* general tests */
+ TEST ( sdotest::pete() );
+ TEST ( sdotest::stocktest() );
+ TEST ( sdotest::definetest() );
+ TEST ( sdotest::emptycs() );
+ TEST ( sdotest::openseq() );
+ TEST ( sdotest::testanytwo("b48633b.xsd","b48633.xsd","b48633.xml") );
+ TEST ( sdotest::testany("b48686.xsd",0, "b48686.xml", 0) );
+ TEST ( sdotest::testany("b48636.xsd","Use of undefined group NameGroup","b48636.xml", 0) );
+ TEST ( sdotest::b48602() );
+ TEST ( sdotest::compatiblefactory() );
+ TEST ( sdotest::simple() );
+ TEST ( sdotest::testOrder("employee.xsd","extension.xsd","order1.dat","order1.txt") );
+ TEST ( sdotest::testOrder("extension.xsd","employee.xsd","order2.dat","order2.txt") );
+ TEST ( sdotest::testOpen() );
+ TEST ( sdotest::testinc2("calculator2.wsdl","inc1.dat","inc1.txt") );
+ TEST ( sdotest::testinc2("calculator2a.wsdl","inc2.dat","inc2.txt") );
+ TEST ( sdotest::teststyles() );
+ TEST ( sdotest::badelement() );
+ TEST ( sdotest::oddchars() );
+ TEST ( sdotest::notns() );
+ TEST ( sdotest::unsetlist() );
+ TEST ( sdotest::travel() );
+ /*TEST ( sdotest::testwsdl() );*/
+ TEST ( sdotest::bunique() );
+ TEST ( sdotest::buniqueread() );
+ TEST ( sdotest::propdefaulttest() );
+ TEST ( sdotest::graham5() );
+ TEST ( sdotest::graham4() );
+ TEST ( sdotest::detachtest() );
+ TEST ( sdotest::includetest() );
+ TEST ( sdotest::testLoad() );
+ TEST ( sdotest::leak() );
+ TEST ( sdotest::twolists() );
+ TEST ( sdotest::testUtil() );
+ TEST ( sdotest::clonetest() );
+ TEST ( sdotest::notfound() );
+ TEST ( sdotest::testErrors() );
+ TEST ( sdotest::loadManyOpen() );
+ TEST ( sdotest::doctest() );
+ TEST ( sdotest::graham3() );
+ TEST ( sdotest::graham1() );
+ TEST ( sdotest::graham2() );
+ TEST ( sdotest::merle1() );
+ TEST ( sdotest::loadOpenNS() );
+ TEST ( sdotest::saveOpen() );
+ TEST ( sdotest::loadOpen() );
+ TEST ( sdotest::testui() );
+ TEST ( sdotest::testSCA() );
+ TEST ( sdotest::testabstract() );
+ TEST ( sdotest::testsubsload() );
+ TEST ( sdotest::testsubs() );
+ TEST ( sdotest::setnull() );
+ TEST ( sdotest::bug2() );
+ TEST ( sdotest::cssave2() );
+ TEST ( sdotest::csload2() );
+ TEST ( sdotest::cssave() );
+ TEST ( sdotest::csload() );
+ TEST ( sdotest::bug1() );
+ TEST ( sdotest::eqhelpertest() );
+ TEST ( sdotest::cohelpertest() );
+ TEST ( sdotest::datetest() );
+ TEST ( sdotest::carotest3() );
+ TEST ( sdotest::matttest1() );
+ TEST ( sdotest::adddeletetest() );
+ TEST ( sdotest::carotest2() );
+ TEST ( sdotest::carotest() );
+ TEST ( sdotest::setmany() );
+ TEST ( sdotest::noncontest() );
+ TEST ( sdotest::versiontest() );
+ TEST ( sdotest::defaulttest() );
+ TEST ( sdotest::defaulttest_strobj() );
+ TEST ( sdotest::nulltest() );
+ TEST ( sdotest::usertest() );
+ TEST ( sdotest::querytest() );
+ TEST ( sdotest::getproptest() );
+ TEST ( sdotest::rcptest() );
+ TEST ( sdotest::seqtest() );
+ TEST ( sdotest::changesummarytest() );
+ TEST ( sdotest::conversiontest() );
+ TEST ( sdotest::boolbug() );
+ TEST ( sdotest::scope1() );
+ TEST ( sdotest::scope2() );
+ TEST ( sdotest::scope3() );
+ TEST ( sdotest::maintest() );
+
+ /* regression tests */
+ TEST ( sdotest::b48736() );
+ /*TEST ( sdotest::b48601() );*/
+ TEST ( sdotest::b47293() );
+ TEST ( sdotest::b48300() );
+ TEST ( sdotest::b47663() );
+ TEST ( sdotest::b47802() );
+ TEST ( sdotest::b47137() );
+ TEST ( sdotest::b47137b() );
+ TEST ( sdotest::b46633() );
+ TEST ( sdotest::b46693() );
+ TEST ( sdotest::b46734() );
+ TEST ( sdotest::b46634() );
+ TEST ( sdotest::b46617b() );
+ TEST ( sdotest::b46617() );
+ TEST ( sdotest::b46613() );
+ TEST ( sdotest::b45933() );
+ TEST ( sdotest::jira490() );
+ TEST ( sdotest::jira705() );
+ TEST ( sdotest::jira546() );
+ TEST ( sdotest::jira945() );
+ TEST ( sdotest::testXPath() );
+
+ TEST ( sdotest::cdatatest() );
+ TEST ( sdotest::cloneopentest() );
+ TEST ( sdotest::tuscany963() );
+ TEST ( sdotest::tuscany562() );
+ TEST ( sdotest::typedefinitionstest() );
+
+ TEST ( sdotest::jira1174() );
+ TEST ( sdotest::jira1238() );
+ TEST ( sdotest::loadWithoutSchema() );
+ //TEST ( sdotest::jira445() );
+ TEST ( sdotest::jira1112() );
+ TEST ( sdotest::elementFormDefaultQualified() );
+ TEST ( sdotest::elementFormDefaultQualifiedSequence() );
+ TEST ( sdotest::xsiTypeAbstract() );
+ TEST ( sdotest::nullExtendedPrimitive() );
+
+
+ } catch(...)
+ {
+ cout << "unexpected exception caught" << endl;
+ }
+
+ cout << "Total tests:" << totaltests << " Tests passed:" << testspassed << endl;
+ return testspassed - totaltests;
+}
+}
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/maintest.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/maintest.txt
new file mode 100644
index 0000000000..5f0da2eaa4
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/maintest.txt
@@ -0,0 +1,188 @@
+Test Program starting to create types ...
+Manager is sequenced?1
+Manager is sequenced?1
+Manager is sequenced?1
+Manager is sequenced?1
+Manager is sequenced?1
+Manager is sequenced?1
+Manager is sequenced?1
+Should be Company :Company
+Should be 3: 3
+Alias: TheFirm
+Alias: TheBigFirm
+Alias: TheLittleFirm
+Manager is sequenced?1
+BEFORE RESOLUTION
+Printing Types
+Type BigDecimal
+Type BigInteger
+Type Boolean
+Type Byte
+Type Bytes
+Type ChangeSummary
+Type Character
+Type DataObject
+Type Date
+Type Double
+Type Float
+Type Integer
+Type Long
+Type OpenDataObject
+Type Short
+Type String
+Type URI
+Type Company
+Has Property name of type String
+Has Property address of type String
+Has Property departments of type Department
+Has Property employee of the month of type Employee
+Has Property floatlist of type Float
+Has Property pdg of type Manager
+Has Property shareholder of type Person
+Has Property substring of type DerivedString
+Has Property subdepartments of type SubDepartment
+Type Department
+Has Property name of type String
+Has Property id of type Integer
+Has Property manager of type Manager
+Has Property employees of type Employee
+Type DerivedString
+Type Employee
+Has Property name of type String
+Has Property cubelocation of type String
+Type Manager
+Has Property name of type String
+Has Property officeid of type String
+Has Property str of type String
+Has Property boolean of type Boolean
+Has Property byte of type Byte
+Has Property character of type Character
+Has Property short of type Short
+Has Property long of type Integer
+Has Property longlong of type Long
+Has Property float of type Float
+Has Property longdouble of type Double
+Has Property date of type Date
+Has Property string of type String
+Has Property bytes of type Bytes
+Type Person
+Has Property haircolour of type String
+Has Property name of type String
+Type SubDepartment
+Has Property subname of type String
+AFTER RESOLUTION
+Printing Types
+Type BigDecimal
+Type BigInteger
+Type Boolean
+Type Byte
+Type Bytes
+Type ChangeSummary
+Type Character
+Type DataObject
+Type Date
+Type Double
+Type Float
+Type Integer
+Type Long
+Type OpenDataObject
+Type Short
+Type String
+Type URI
+Type Company
+Has Property name of type String
+Has Property address of type String
+Has Property departments of type Department
+Has Property employee of the month of type Employee
+Has Property floatlist of type Float
+Has Property pdg of type Manager
+Has Property shareholder of type Person
+Has Property substring of type DerivedString
+Has Property subdepartments of type SubDepartment
+Type Department
+Has Property name of type String
+Has Property id of type Integer
+Has Property manager of type Manager
+Has Property employees of type Employee
+Type DerivedString
+Type Employee
+Has Property haircolour of type String
+Has Property name of type String
+Has Property name of type String
+Has Property cubelocation of type String
+Type Manager
+Has Property haircolour of type String
+Has Property name of type String
+Has Property name of type String
+Has Property officeid of type String
+Has Property str of type String
+Has Property boolean of type Boolean
+Has Property byte of type Byte
+Has Property character of type Character
+Has Property short of type Short
+Has Property long of type Integer
+Has Property longlong of type Long
+Has Property float of type Float
+Has Property longdouble of type Double
+Has Property date of type Date
+Has Property string of type String
+Has Property bytes of type Bytes
+Type Person
+Has Property haircolour of type String
+Has Property name of type String
+Type SubDepartment
+Has Property name of type String
+Has Property id of type Integer
+Has Property manager of type Manager
+Has Property employees of type Employee
+Has Property subname of type String
+Manager is sequenced?1
+This is the sub string - its primitive, but not a string
+acmecorp
+acmecorp
+Expected default boolean (false) : false
+Expected boolean (true) : true
+Expected default string (0) : Now able to set
+ - should say now able to set
+
+ Name from deleted item: Now able to set
+0xffffffffffffffff = : -1
+0x7fffffffffffffff = 9223372036854775807
+0x7fffffff = 2147483647
+0x80000000 = 2147483648
+ Expected Wide - got : Wide
+ Expected Thin - got : Thin
+Expecting string, got Wide
+Expected bool true, got 1
+Expected char 23, got 23
+expected wchar 45, got 45Expected short 34, got 34
+Expected long 56 , got 56
+Expected long long 78, got 78
+Expected long double 89, got 89.000
+Expected float 90, got 90.000
+Expected time_t 200, got 200
+Wide[0]=87
+Wide[1]=105
+Wide[2]=100
+Wide[3]=101
+Thin[0]=84
+Thin[1]=104
+Thin[2]=105
+Thin[3]=110
+1.400567.700Should be Bill:Bill
+Should be Bill:Bill
+The employee of the month is Bill
+Now able to set
+pdg correctly identified
+Now able to set
+size of list 5
+Research And Development
+Research And Development
+Department: Research And Development
+Department: Marketing
+Department: Architecture
+Department: Pyrotechnics
+Department: Accounts
+String in list type:department label
+Normal Invalid path exception
+Normal SDOPropertyNotFound exception
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/many.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/many.xml
new file mode 100644
index 0000000000..fe78c6198b
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/many.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<company xmlns="companyNS" xsi:type="CompanyType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME">
+<sdo:changeSummary xmlns:sdo="commonj.sdo">
+<create>#/departments.0/employees.0</create>
+</sdo:changeSummary>
+<departments name="Advanced Technologies" location="NY" number="123">
+<employees name="Albert" SN="E0001" >
+<openlist>Three member</openlist>
+<openlist>Open bytes</openlist>
+<openlist>List is complete</openlist>
+</employees><employees name="Boris" SN="E0002" manager="true"/>
+<employees name="Carl" SN="E0003"/>
+</departments>
+</company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/many.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/many.xsd
new file mode 100644
index 0000000000..7d49ca3258
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/many.xsd
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml" xmlns:tns="companyNS" targetNamespace="companyNS"><xsd:element name="companyType" type="tns:CompanyType"/><xsd:complexType name="CompanyType" sdo:aliasName="TheFirm TheBigFirm"><xsd:sequence><xsd:element name="departments" type="tns:DepartmentType" minOccurs="0" maxOccurs="unbounded" sdo:aliasName="TheDepartments MYDepartments"/></xsd:sequence><xsd:element name="changeSummary" type="sdo:ChangeSummaryType"/><xsd:attribute name="name" type="xsd:String"/><xsd:attribute name="employeeOfTheMonth" sdoxml:propertyType="tns:EmployeeType" type="xsd:anyURI"/></xsd:complexType><xsd:element name="departmentType" type="tns:DepartmentType"/><xsd:complexType name="DepartmentType"><xsd:sequence><xsd:element name="employees" type="tns:EmployeeType" minOccurs="0" maxOccurs="unbounded"/></xsd:sequence><xsd:attribute name="name" type="xsd:String"/><xsd:attribute name="location" type="xsd:String"/><xsd:attribute name="number" type="xsd:String"/></xsd:complexType><xsd:element name="employeeType" type="tns:EmployeeType"/><xsd:complexType name="EmployeeType"><xsd:attribute name="name" type="xsd:String"/><xsd:attribute name="SN" type="xsd:String"/><xsd:attribute name="manager" type="xsd:boolean"/><xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/><xsd:anyAttribute namespace="##any" processContents="lax"/></xsd:complexType><xsd:element name="openType" type="tns:OpenType"/><xsd:complexType name="OpenType"><xsd:attribute name="name" type="xsd:String"/></xsd:complexType></xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/matttest1.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/matttest1.txt
new file mode 100644
index 0000000000..5c5200ff22
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/matttest1.txt
@@ -0,0 +1,2 @@
+Container of Billy should be dept1, and is :Shoe
+Container of Billy should be dept2, and is :IT
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/merle1.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/merle1.txt
new file mode 100644
index 0000000000..4e15696ac8
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/merle1.txt
@@ -0,0 +1,10 @@
+<SubscriptionId>I am the subscription ID string</SubscriptionId>
+<AssociateTag>I am the associate Tag string</AssociateTag>
+<XMLEscaping>I am the XML escaping string</XMLEscaping>
+<Validate>I am the Validate string</Validate>
+DataObject "Shared" as XML:
+<tns:Shared xsi:type="tns:ItemSearchRequest" xmlns:tns="axis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Keywords>SharedKeywordsString</Keywords><SearchIndex>SearchIndexString</SearchIndex></tns:Shared>
+
+DataObject "Request" as XML:
+<tns:Request xsi:type="tns:ItemSearchRequest" xmlns:tns="axis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Keywords>RequestKeywords</Keywords><SearchIndex>RequestSearchIndex</SearchIndex></tns:Request>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my-core.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my-core.xsd
new file mode 100644
index 0000000000..acfc5c9f13
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my-core.xsd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+
+
+ <complexType name="Component">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:implementation"/>
+ </sequence>
+ </complexType>
+
+ <element name="implementation" type="sca:Implementation"/>
+ <complexType name="Implementation"/>
+
+
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my-implementation-local-java.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my-implementation-local-java.xsd
new file mode 100644
index 0000000000..a7ef0f6ecd
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my-implementation-local-java.xsd
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="my-core.xsd"/>
+
+ <element name="implementation.local.java" type="sca:LocalJavaImplementation" substitutionGroup="sca:implementation" sdo:name="implementationLocalJava"/>
+ <complexType name="LocalJavaImplementation">
+ <complexContent>
+ <extension base="sca:Implementation">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="class" type="NCName" use="required"/>
+ <attribute name="scope" type="sca:Scope" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my.xsd
new file mode 100644
index 0000000000..e910a7db44
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/my.xsd
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/">
+
+ <include schemaLocation="my-core.xsd"/>
+
+ <include schemaLocation="my-implementation-local-java.xsd"/>
+
+
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/noschema.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/noschema.xml
new file mode 100644
index 0000000000..05a8697c51
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/noschema.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<StockQuotes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><Stock fred="joe"><Symbol>IBM</Symbol><Last>79.78</Last><Date>5/24/2006</Date><Time>4:01pm</Time><Change>0.00</Change><Open>N/A</Open><High>N/A</High><Low>N/A</Low><Volume>900</Volume><MktCap>123.7B</MktCap><PreviousClose>79.78</PreviousClose><PercentageChange>0.00</PercentageChange><AnnRange>73.45 - 89.94</AnnRange><Earns>5.121</Earns><P-E>15.58</P-E><Name>INTL BUSINESS MAC</Name></Stock></StockQuotes>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/notns.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/notns.txt
new file mode 100644
index 0000000000..a6f2bc0411
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/notns.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<root xsi:type="Root" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><list/><list/><list/></root>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xml
new file mode 100644
index 0000000000..4f2652f72e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xml
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<tns:Top xmlns:tns="http://www.example.org/AnnonTypes"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.example.org/AnnonTypes AnnonTypes2.xsd ">
+ <tns:attribute name="ETH_GW" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
+ <tns:attribute name="ETH_IP" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
+ <tns:attribute name="ETH_MASK" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
+ <tns:attribute name="SN" xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
+
+
+</tns:Top>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xsd
new file mode 100644
index 0000000000..7cf7c018d9
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nullExtendedPrimitive.xsd
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.example.org/AnnonTypes"
+ xmlns:tns="http://www.example.org/AnnonTypes" elementFormDefault="qualified">
+
+
+
+ <element name="Top">
+ <complexType>
+ <sequence>
+ <element name="attribute" nillable="true" minOccurs="0" maxOccurs="unbounded">
+ <complexType>
+ <simpleContent>
+ <extension base="string">
+ <attribute name="name" type="string" use="required"/>
+ </extension>
+ </simpleContent>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nulltest.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nulltest.txt
new file mode 100644
index 0000000000..01442ec949
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/nulltest.txt
@@ -0,0 +1,91 @@
+Initially - all properties unset, and default values...
+boolean set:0 value false
+byte set:0 value 0
+character set:0 value 0
+short set:0 value 0
+long set:0 value 0
+longlong set:0 value
+float set:0 value
+longdouble set:0 value
+date set:0 value
+string set:0 value
+bytes set:0 value
+object set: 0 value: is empty
+Should now have all properties set, and zero values...
+boolean set:1 value:false
+byte set:1 value:0
+character set:1 value:0
+short set:1 value:0
+long set:1 value:0
+longlong set:1 value:0
+float set:1 value:0.000e+000
+longdouble set:1 value:0.000e+000
+date set:1 value:0
+string set:1 value:
+bytes set:1 value:
+object set:1 dataobject
+Should be back to having properties unset, and default values...
+boolean set:0 value:false
+byte set:0 value:0
+character set:0 value:0
+short set:0 value:0
+long set:0 value:0
+longlong set:0 value:
+float set:0 value:
+longdouble set:0 value:
+date set:0 value:
+string set:0 value:
+bytes set:0 value:
+object set: 0 dataobject is empty
+boolean set:1 value:false
+byte set:1 value:0
+character set:1 value:0
+short set:1 value:0
+long set:1 value:0
+longlong set:1 value:0
+float set:1 value:0.000e+000
+longdouble set:1 value:0.000e+000
+date set:0 value:
+string set:1 value:
+bytes set:1 value:
+object set:1 dataobject is empty
+Modified dataobject
+Should all be null, and default values...
+boolean isNull:1 set:1 value:
+byte isNull:1 set:1 value:
+character isNull:1 set:1 value:
+short isNull:1 set:1 value:
+long isNull:1 set:1 value:
+longlong isNull:1 set:1 value:
+float isNull:1 set:1 value:
+longdouble isNull:1 set:1 value:
+date isNull:1 set:1 value:
+string isNull:1 set:1 value:
+bytes isNull:1 set:1 value:
+object isNull:1 set:1 value empty
+Should all have values, and not be null..
+boolean isNull:0 set:1 value:true
+byte isNull:0 set:1 value:1
+character isNull:0 set:1 value:1
+short isNull:0 set:1 value:1
+long isNull:0 set:1 value:1
+longlong isNull:0 set:1 value:1
+float isNull:0 set:1 value:1.000e+000
+longdouble isNull:0 set:1 value:1.000e+000
+date isNull:1 set:1 value:
+string isNull:0 set:1 value:hello
+bytes isNull:0 set:1 value:hello
+object isNull0 set:1 value: dataobject
+Should all be null, and default values...
+boolean isNull:1 set:1 value:
+byte isNull:1 set:1 value:
+character isNull:1 set:1 value:
+short isNull:1 set:1 value:
+long isNull:1 set:1 value:
+longlong isNull:1 set:1 value:
+float isNull:1 set:1 value:
+longdouble isNull:1 set:1 value:
+date isNull:1 set:1 value:
+string isNull:1 set:1 value:
+bytes isNull:1 set:1 value:
+object isNull;1 set:1 value: empty
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/oddchars.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/oddchars.txt
new file mode 100644
index 0000000000..b9ed9643b3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/oddchars.txt
@@ -0,0 +1,22 @@
+===== DataObject contents =====
+Flight: list dataObject[0]=
+===== DataObject contents =====
+Departure:string:ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╔╩╦╠═╬¤ðÐÊËÈıÍÎÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ 
+
+Arrival:string:Pound:£ Dollar:$ Euro:Ç or █
+
+flightNo:string:BA243
+
+===== End DataObject =====
+
+Hotel: list (empty)
+Excursion:dataObject
+ - null or unset
+
+Client:dataObject
+ - null or unset
+
+Party:dataObject
+ - null or unset
+
+===== End DataObject =====
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xml
new file mode 100644
index 0000000000..1b5d7e1b6a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<company xmlns="companyNS" xsi:type="CompanyType" xmlns:tp="teapot" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME">
+<sdo:changeSummary xmlns:sdo="commonj.sdo">
+<create>#/departments.0/employees.0</create>
+</sdo:changeSummary>
+<departments name="Advanced Technologies" location="NY" number="123">
+<employees name="Albert" SN="E0001" tp:openstring="Value Of Open String" tp:openboolean="true">
+<tp:openintlist>45</tp:openintlist>
+</employees>
+<employees name="Boris" SN="E0002" manager="true"/>
+<employees name="Carl" SN="E0003"/>
+</departments>
+</company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xsd
new file mode 100644
index 0000000000..336f40def7
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS.xsd
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml"
+xmlns:tns="companyNS" targetNamespace="companyNS">
+<xsd:element name="companyType" type="tns:CompanyType"/>
+<xsd:complexType name="CompanyType" sdo:aliasName="TheFirm TheBigFirm">
+<xsd:sequence>
+<xsd:element name="departments" type="tns:DepartmentType" minOccurs="0" maxOccurs="unbounded" sdo:aliasName="TheDepartments MYDepartments"/>
+</xsd:sequence>
+<xsd:element name="changeSummary" type="sdo:ChangeSummaryType"/>
+<xsd:attribute name="name" type="xsd:String"/>
+<xsd:attribute name="employeeOfTheMonth" sdoxml:propertyType="tns:EmployeeType" type="xsd:anyURI"/>
+</xsd:complexType><xsd:element name="departmentType" type="tns:DepartmentType"/>
+<xsd:complexType name="DepartmentType">
+<xsd:sequence>
+<xsd:element name="employees" type="tns:EmployeeType" minOccurs="0" maxOccurs="unbounded"/>
+</xsd:sequence>
+<xsd:attribute name="name" type="xsd:String"/>
+<xsd:attribute name="location" type="xsd:String"/>
+<xsd:attribute name="number" type="xsd:String"/>
+</xsd:complexType>
+<xsd:element name="employeeType" type="tns:EmployeeType"/>
+<xsd:complexType name="EmployeeType">
+<xsd:attribute name="name" type="xsd:String"/>
+<xsd:attribute name="SN" type="xsd:String"/>
+<xsd:attribute name="manager" type="xsd:boolean"/>
+<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:anyAttribute namespace="##any" processContents="lax"/>
+</xsd:complexType>
+<xsd:element name="openType" type="tns:OpenType"/>
+<xsd:complexType name="OpenType">
+<xsd:attribute name="name" type="xsd:String"/>
+</xsd:complexType>
+</xsd:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xml
new file mode 100644
index 0000000000..ff2b31c610
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xml
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<company xmlns="companyNS" xsi:type="CompanyType" xmlns:tp="twilbur" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME">
+<sdo:changeSummary xmlns:sdo="commonj.sdo">
+<create>#/departments.0/employees.0</create>
+</sdo:changeSummary>
+<departments name="Advanced Technologies" location="NY" number="123">
+<employees name="Albert" SN="E0001" tp:openstring="Value Of Open String" tp:openboolean="true">
+<tp:openintlist>45</tp:openintlist>
+</employees>
+<employees name="Boris" SN="E0002" manager="true"/>
+<employees name="Carl" SN="E0003"/>
+</departments>
+</company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xsd
new file mode 100644
index 0000000000..e1498578cf
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNS2.xsd
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml"
+xmlns:tns="teapot" targetNamespace="teapot">
+<xsd:attribute name="openboolean" type="xsd:boolean"/>
+<xsd:element name="openintlist" type="xsd:short" minOccurs="0" maxOccurs="unbounded"/>
+<xsd:attribute name="openstring" type="xsd:hexBinary"/>
+</xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNSout.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNSout.txt
new file mode 100644
index 0000000000..21e6df8d9e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openloadNSout.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<company xsi:type="tns2:CompanyType" xmlns:tns2="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME"><sdo:changeSummary xmlns:sdo="commonj.sdo" logging="true"><create>#/departments.0/employees.0</create></sdo:changeSummary><departments name="Advanced Technologies" location="NY" number="123"><employees name="Albert" SN="E0001" openstring="Value Of Open String" openboolean="true"><openintlist>45</openintlist></employees><employees name="Boris" SN="E0002" manager="true"/><employees name="Carl" SN="E0003"/></departments></company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openseq.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openseq.txt
new file mode 100644
index 0000000000..44091f2608
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/openseq.txt
@@ -0,0 +1,3 @@
+Open Type string value: Value Of Open String
+Open Sequenced string value: Value of sequenced string
+Open Sequenced string value from seq: Value of sequenced string
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/order1.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/order1.txt
new file mode 100644
index 0000000000..4f46cbfecf
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/order1.txt
@@ -0,0 +1,19 @@
+Type:#Address
+Property:name
+Property:street
+Property:city
+Type:#RootType
+Property:employee
+Type:#UKAddress
+Property:value
+Property:postcode
+Type:#USAddress
+Property:value
+Property:zip
+Type:#fullpersoninfo
+Property:address
+Property:city
+Property:country
+Type:#personinfo
+Property:firstname
+Property:lastname
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/order2.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/order2.txt
new file mode 100644
index 0000000000..4f46cbfecf
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/order2.txt
@@ -0,0 +1,19 @@
+Type:#Address
+Property:name
+Property:street
+Property:city
+Type:#RootType
+Property:employee
+Type:#UKAddress
+Property:value
+Property:postcode
+Type:#USAddress
+Property:value
+Property:zip
+Type:#fullpersoninfo
+Property:address
+Property:city
+Property:country
+Type:#personinfo
+Property:firstname
+Property:lastname
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/overlappingtypes.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/overlappingtypes.xsd
new file mode 100644
index 0000000000..a388cff528
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/overlappingtypes.xsd
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.example.org/AnnonTypes"
+ xmlns:tns="http://www.example.org/AnnonTypes"
+elementFormDefault="qualified">
+
+ <element name="Top">
+ <complexType>
+ <sequence>
+ <element name="ElementA">
+ <complexType>
+ <sequence>
+ <element name="Overlapping">
+ <complexType>
+ <sequence>
+ <element name="ValueA" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ <element name="ElementB">
+ <complexType>
+ <sequence>
+ <element name="Overlapping">
+ <complexType>
+ <sequence>
+ <element name="ValueB" type="string"/>
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+ </sequence>
+ </complexType>
+ </element>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/partial.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/partial.xml
new file mode 100644
index 0000000000..11acb1b806
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/partial.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<company xmlns="companyNS" xsi:type="CompanyType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME">
+<sdo:changeSummary xmlns:sdo="commonj.sdo">
+<create>#/departments.0/employees.0</create>
+</sdo:changeSummary>
+<departments name="Advanced Technologies" location="NY" number="123">
+<employees name="Albert" SN="E0001" openstring="Value Of Open String" openboolean="true">
+<openintlist>45</openintlist>
+<opendataobjectlist xmlns="companyNS" xsi:type="OpenType" name="MyOpenName"/>
+<opendataobject xsi:type="OpenType" name="MyOpenName"/>
+</employees><employees name="Boris" SN="E0002" manager="true"/>
+<employees name="Carl" SN="E0003"/>
+</departments>
+</company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/person.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/person.xsd
new file mode 100644
index 0000000000..d2d1842ecc
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/person.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.test.com/info"
+ xmlns:info="http://www.test.com/info">
+ <complexType name="nameType">
+ <sequence>
+ <element name="first" type="string"></element>
+ <element name="last" type="string"></element>
+ </sequence>
+ </complexType>
+ <complexType name="personType">
+ <sequence>
+ <element name="name" type="info:nameType"></element>
+ </sequence>
+ </complexType>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xml
new file mode 100644
index 0000000000..21c4d71914
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xml
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<StockQuotes>
+<Stock fred="joe">
+<Symbol>IBM</Symbol>
+<Last>79.78</Last>
+<Date>5/24/2006</Date>
+<Time>4:01pm</Time>
+<Change>0.00</Change>
+<Open>N/A</Open>
+<High>N/A</High>
+<Low>N/A</Low>
+<Volume>900</Volume>
+<MktCap>123.7B</MktCap>
+<PreviousClose>79.78</PreviousClose>
+<PercentageChange>0.00</PercentageChange>
+<AnnRange>73.45 - 89.94</AnnRange>
+<Earns>5.121</Earns>
+<P-E>15.58</P-E>
+<Name>INTL BUSINESS MAC</Name>
+</Stock>
+</StockQuotes>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xsd
new file mode 100644
index 0000000000..f61d50a942
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/pete.xsd
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="StockQuotes">
+ <xs:complexType >
+ <xs:sequence>
+ <xs:element name="Stock" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="Symbol" type="xs:string"/>
+ <xs:element minOccurs="0" maxOccurs="1" name="Last" type="xs:float"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </xs:complexType>
+</xs:element>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##any" processContents="lax"/>
+ </xs:complexType>
+ </xs:element>
+
+</xs:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/qualified.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/qualified.xml
new file mode 100644
index 0000000000..4b26cb274c
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/qualified.xml
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:GetQuotes xmlns:tns="http://swanandmokashi.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><tns:QuoteTicker>IBM</tns:QuoteTicker></tns:GetQuotes>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/querytest.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/querytest.txt
new file mode 100644
index 0000000000..9b895282a0
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/querytest.txt
@@ -0,0 +1,17 @@
+Expected employee3: got Employee3
+Expected employee1: got Employee1
+Expected employee2: got Employee2
+Expected employee1: got Employee1
+Expected employee1: got Employee1
+Expected employee1: got Employee1
+Expected employee1: got Employee1
+Expected employee3: got Employee3
+Expected employee2: got Employee2
+Expected employee2: got Employee2
+Expected employee2: got Employee2
+Expected employee2: got Employee2
+Normal exception caught
+Normal exception caught
+Normal exception caught
+Normal exception caught
+Normal exception caught
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/saveopen-output.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/saveopen-output.txt
new file mode 100644
index 0000000000..cae11d2320
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/saveopen-output.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:company xsi:type="tns:CompanyType" xmlns:tns="companyNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="ACME"><sdo:changeSummary xmlns:sdo="commonj.sdo"><create>#/departments.0/employees.0</create><create>#/departments.0/employees.1</create><create>#/departments.0/employees.2</create><create>#/departments.0/employees.0/opendataobjectlist.0</create><departments sdo:ref="#/departments.0" name="" location="" number=""/></sdo:changeSummary><departments name="Advanced Technologies" location="NY" number="123"><employees name="Albert" SN="E0001" openstring="Value Of Open String" openboolean="true"><openintlist>45</openintlist><opendataobjectlist xsi:type="tns:OpenType" name="MyOpenName"/><opendataobject xsi:type="tns:OpenType" name="MyOpenName"/></employees><employees name="Boris" SN="E0002" manager="true"/><employees name="Carl" SN="E0003"/></departments></tns:company>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-sca.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-sca.xsd
new file mode 100644
index 0000000000..d0adc9bda0
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-sca.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="binding.sca" type="sca:SCARemoteBinding" substitutionGroup="sca:binding" sdo:name="bindingSca"/>
+ <complexType name="SCARemoteBinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="target" type="anyURI" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-webservice.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-webservice.xsd
new file mode 100644
index 0000000000..60c642fbfe
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-webservice.xsd
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="binding.ws" type="sca:WebServiceBinding" substitutionGroup="sca:binding"/>
+ <complexType name="WebServiceBinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="port" type="anyURI" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-ws.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-ws.xsd
new file mode 100644
index 0000000000..5ee7500578
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-binding-ws.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="binding.ws" type="sca:WebServiceBinding" substitutionGroup="sca:binding" sdo:name="bindingWs"/>
+ <complexType name="WebServiceBinding">
+ <complexContent>
+ <extension base="sca:Binding">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="port" type="anyURI" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-core.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-core.xsd
new file mode 100644
index 0000000000..cfe9d8d884
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-core.xsd
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-policy.xsd" />
+
+ <element name="componentType" type="sca:ComponentType"/>
+ <complexType name="ComponentType">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="service" type="sca:Service"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="reference" type="sca:Reference"/>
+ <element minOccurs="0" maxOccurs="unbounded" ref="sca:property"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="Service">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="interface" type="sca:Interface"/>
+ <complexType name="Interface"/>
+
+ <complexType name="Reference">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="property" type="sca:Property"/>
+ <complexType name="Property" abstract="true">
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="many" type="boolean" default="false" use="optional"/>
+ <attribute name="default" type="string" use="optional"/>
+ </complexType>
+
+
+ <element name="moduleFragment" type="sca:ModuleFragment"/>
+ <complexType name="ModuleFragment">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="component" type="sca:Component"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:ModuleWire"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="module" type="sca:ModuleFragment"/>
+
+
+ <complexType name="EntryPoint">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <element minOccurs="1" maxOccurs="1" ref="sca:binding"/>
+ <element minOccurs="1" maxOccurs="1" name="reference" type="anyType"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="overridable" type="boolean" default="true" use="optional"/>
+ <attribute name="multiplicity" type="sca:Multiplicity" use="optional" default="1..1"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+ <!-- a multiplicity 1..1 sample
+ <reference>StockQuoteComponent</reference> - type must be URI
+ a multiplicity 0..n sample
+ <reference>
+ <value>StockQuoteComponent1</value> - type must be URI
+ <value>StockQuoteComponent2</value>
+ </reference>
+ -->
+
+ <element name="binding" type="sca:Binding"/>
+ <complexType name="Binding"/>
+
+
+ <complexType name="Component">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:implementation"/>
+ <element minOccurs="0" maxOccurs="1" name="properties" type="sca:PropertyValues"/>
+ <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+ <!-- a multiplicity 1..1 sample
+ <references>
+ <v:stockQuote>StockQuoteComponent</v:stockquote> - type must be URI
+ </references>
+ a multiplicity 0..n sample
+ <references>
+ <v:stockQuote>
+ <value>StockQuoteComponent1</value> - type must be URI
+ <value>StockQuoteComponent2</value>
+ </v:stockquote>
+ </references>
+ -->
+
+ <element name="implementation" type="sca:Implementation"/>
+ <complexType name="Implementation"/>
+
+ <complexType name="PropertyValues">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <complexType name="ReferenceValues">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+
+ <complexType name="ExternalService">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:interface"/>
+ <element minOccurs="1" maxOccurs="1" ref="sca:binding"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="overridable" type="boolean" default="true" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+
+
+ <complexType name="ModuleWire">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:source.uri" sdo:name="sourceUri"/>
+ <element minOccurs="1" maxOccurs="1" ref="sca:target.uri" sdo:name="targetUri"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <element name="source.uri" type="anyURI" substitutionGroup="sca:source" sdo:name="sourceUri"/>
+ <element name="target.uri" type="anyURI" substitutionGroup="sca:target" sdo:name="targetUri"/>
+
+
+ <element name="subsystem" type="sca:Subsystem"/>
+ <complexType name="Subsystem">
+ <sequence>
+ <element minOccurs="0" maxOccurs="unbounded" name="entryPoint" type="sca:EntryPoint"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="moduleComponent" type="sca:ModuleComponent"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="externalService" type="sca:ExternalService"/>
+ <element minOccurs="0" maxOccurs="unbounded" name="wire" type="sca:SystemWire"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+
+ <complexType name="ModuleComponent">
+ <sequence>
+ <element minOccurs="0" maxOccurs="1" name="references" type="sca:ReferenceValues"/>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="name" type="NCName" use="required"/>
+ <attribute name="module" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </complexType>
+
+ <complexType name="SystemWire">
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" ref="sca:source.uri" sdo:name="sourceUri"/>
+ <element minOccurs="1" maxOccurs="1" ref="sca:target.uri" sdo:name="targetUri" />
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ </complexType>
+
+ <element name="source" type="anyType"/>
+ <element name="source.epr" type="anyType" substitutionGroup="sca:source" sdo:name="sourceEpr"/>
+
+ <element name="target" type="anyType"/>
+ <element name="target.epr" type="anyType" substitutionGroup="sca:target" sdo:name="targetEpr"/>
+
+
+ <simpleType name="Multiplicity">
+ <restriction base="string">
+ <enumeration value="0..1"/>
+ <enumeration value="1..1"/>
+ <enumeration value="0..n"/>
+ <enumeration value="1..n"/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="Scope">
+ <restriction base="string">
+ <enumeration value="instance"/>
+ <enumeration value="request"/>
+ <enumeration value="session"/>
+ <enumeration value="module"/>
+ </restriction>
+ </simpleType>
+
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-dll.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-dll.xsd
new file mode 100644
index 0000000000..6e1ec1d6eb
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-dll.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="implementation.dll" type="sca:DLLImplementation" substitutionGroup="sca:implementation" sdo:name="implementationDll"/>
+ <complexType name="DLLImplementation">
+ <complexContent>
+ <extension base="sca:Implementation">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="dll" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-java.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-java.xsd
new file mode 100644
index 0000000000..3f54089755
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-java.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="implementation.java" type="sca:JavaImplementation" substitutionGroup="sca:implementation" sdo:name="implementationJava"/>
+ <complexType name="JavaImplementation">
+ <complexContent>
+ <extension base="sca:Implementation">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="class" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-local-java.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-local-java.xsd
new file mode 100644
index 0000000000..ce4f529f3e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-implementation-local-java.xsd
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="implementation.local.java" type="sca:LocalJavaImplementation" substitutionGroup="sca:implementation" sdo:name="implementationLocalJava"/>
+ <complexType name="LocalJavaImplementation">
+ <complexContent>
+ <extension base="sca:Implementation">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="class" type="NCName" use="required"/>
+ <attribute name="scope" type="sca:Scope" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-cpp.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-cpp.xsd
new file mode 100644
index 0000000000..ddbfe540b7
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-cpp.xsd
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="interface.cpp" type="sca:CPPInterface" substitutionGroup="sca:interface"
+ sdo:name="interfaceCpp"/>
+ <complexType name="CPPInterface">
+ <complexContent>
+ <extension base="sca:Interface">
+ <sequence>
+ <element minOccurs="1" name="operation" type="sca:Operation"/>
+ </sequence>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+
+ <!-- C++ operation declaration -->
+ <complexType name="Operation">
+ <complexContent>
+ <sequence>
+ <element minOccurs="1" maxOccurs="1" name="return" type="sca:ReturnType"/>
+ <element minOccurs="0" name="parameter" type="sca:ParameterType"/>
+ </sequence>
+ <attribute name="name" type="string" use="required"/>
+ </complexContent>
+ </complexType>
+
+ <simpleType name="ReturnType">
+ <restriction base="string">
+ <enumeration value="float"/>
+ <enumeration value="void"/>
+ </restriction>
+ </simpleType>
+
+ <simpleType name="ParameterType">
+ <restriction base="string">
+ <enumeration value="float"/>
+ <enumeration value="const char *"/>
+ </restriction>
+ </simpleType>
+
+
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-java.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-java.xsd
new file mode 100644
index 0000000000..579f9483df
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-java.xsd
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="interface.java" type="sca:JavaInterface" substitutionGroup="sca:interface" sdo:name="interfaceJava"/>
+ <complexType name="JavaInterface">
+ <complexContent>
+ <extension base="sca:Interface">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="interface" type="NCName" use="required"/>
+ <attribute name="callbackInterface" type="NCName" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-wsdl.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-wsdl.xsd
new file mode 100644
index 0000000000..9c15d87485
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-interface-wsdl.xsd
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="interface.wsdl" type="sca:WSDLPortType" substitutionGroup="sca:interface" sdo:name="interfaceWsdl"/>
+ <complexType name="WSDLPortType">
+ <complexContent>
+ <extension base="sca:Interface">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="interface" type="anyURI" use="required"/>
+ <attribute name="callbackInterface" type="anyURI" use="optional"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-java.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-java.xsd
new file mode 100644
index 0000000000..77a6df6772
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-java.xsd
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="property.java" type="sca:JavaProperty" substitutionGroup="sca:property" sdo:name="propertyJava"/>
+ <complexType name="JavaProperty">
+ <complexContent>
+ <extension base="sca:Property">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="class" type="NCName" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-xsd.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-xsd.xsd
new file mode 100644
index 0000000000..2820bd3dd6
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca-property-xsd.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sdo="commonj.sdo/XML"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ elementFormDefault="qualified">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <element name="property.xsd" type="sca:XSDProperty" substitutionGroup="sca:property" sdo:name="propertyXsd"/>
+ <complexType name="XSDProperty">
+ <complexContent>
+ <extension base="sca:Property">
+ <sequence>
+ <any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </sequence>
+ <attribute name="type" type="anyURI" use="required"/>
+ <anyAttribute namespace="##any" processContents="lax"/>
+ </extension>
+ </complexContent>
+ </complexType>
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca.xsd
new file mode 100644
index 0000000000..72cc5f497b
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sca.xsd
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<schema xmlns="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.commonj.org/xmlns/sca/v0.0.1/"
+ xmlns:sca="http://www.commonj.org/xmlns/sca/v0.0.1/">
+
+ <include schemaLocation="sca-core.xsd"/>
+
+ <include schemaLocation="sca-interface-wsdl.xsd"/>
+ <include schemaLocation="sca-interface-cpp.xsd"/>
+ <include schemaLocation="sca-interface-java.xsd"/>
+
+ <include schemaLocation="sca-property-xsd.xsd"/>
+
+ <include schemaLocation="sca-implementation-dll.xsd"/>
+
+ <include schemaLocation="sca-implementation-java.xsd"/>
+ <include schemaLocation="sca-implementation-local-java.xsd"/>
+
+ <include schemaLocation="sca-binding-ws.xsd"/>
+
+
+</schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario1.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario1.txt
new file mode 100644
index 0000000000..a0a3c7a203
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario1.txt
@@ -0,0 +1,10 @@
+Created object in changed list
+The object is myspace#Company
+===== Modified Object Starts
+Xpath:#/
+The modified objects type is myspace#Root
+===== Old Property Values Begin
+Property companies[0](UNSET) of type DataObject - object null or unset
+
+===== Old Property Values End
+=====Modified Object Ends
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario2.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario2.txt
new file mode 100644
index 0000000000..9728bd6f0a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario2.txt
@@ -0,0 +1,8 @@
+===== Modified Object Starts
+Xpath:#/companies.0
+The modified objects type is myspace#Company
+===== Old Property Values Begin
+Property name of type String:acme
+
+===== Old Property Values End
+=====Modified Object Ends
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario3.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario3.txt
new file mode 100644
index 0000000000..e174f62538
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario3.txt
@@ -0,0 +1,22 @@
+=====Deleted Object Starts
+===== Old Property Values Begin
+Property name of type String:acme
+
+Property id of type String:123
+
+===== Old Property Values End
+=====Deleted Object Ends
+===== Modified Object Starts
+Xpath:#/
+The modified objects type is myspace#Root
+===== Old Property Values Begin
+Property companies[0] of type DataObject - object deleted
+===== Old Property Values Begin
+Property name of type String:acme
+
+Property id of type String:123
+
+===== Old Property Values End
+
+===== Old Property Values End
+=====Modified Object Ends
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario4.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario4.txt
new file mode 100644
index 0000000000..f678499e15
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario4.txt
@@ -0,0 +1,108 @@
+Created object in changed list
+The object is myspace#Employee
+===== Modified Object Starts
+Xpath:#/companies.0/departments.0
+The modified objects type is myspace#Department
+===== Old Property Values Begin
+Property employees[0] of type DataObject object still exists
+
+Property employees[1] of type DataObject object still exists
+
+===== Old Property Values End
+=====Modified Object Ends
+===== Modified Object Starts
+Xpath:#/companies.0/departments.1
+The modified objects type is myspace#Department
+===== Old Property Values Begin
+Property employees[0] of type DataObject - object deleted
+===== Old Property Values Begin
+Property name of type String:Ed Memoire
+
+Property id of type String:1
+
+===== Old Property Values End
+
+Property employees[1] of type DataObject object still exists
+
+===== Old Property Values End
+=====Modified Object Ends
+=====Deleted Object Starts
+===== Old Property Values Begin
+Property name of type String:Ed Memoire
+
+Property id of type String:1
+
+===== Old Property Values End
+=====Deleted Object Ends
+=====Deleted Object Starts
+===== Old Property Values Begin
+Property name of type String:Ivor Payne
+
+Property id of type String:1
+
+===== Old Property Values End
+=====Deleted Object Ends
+=====Deleted Object Starts
+===== Old Property Values Begin
+Property name of type String:Colin Poisson
+
+Property id of type String:2
+
+===== Old Property Values End
+=====Deleted Object Ends
+=====Deleted Object Starts
+===== Old Property Values Begin
+Property name of type String:windows
+
+Property id of type String:1
+
+Property employees[1] of type DataObject - object deleted
+===== Old Property Values Begin
+Property name of type String:Colin Poisson
+
+Property id of type String:2
+
+===== Old Property Values End
+
+Property employees[0] of type DataObject - object deleted
+===== Old Property Values Begin
+Property name of type String:Ivor Payne
+
+Property id of type String:1
+
+===== Old Property Values End
+
+===== Old Property Values End
+=====Deleted Object Ends
+===== Modified Object Starts
+Xpath:#/companies.1
+The modified objects type is myspace#Company
+===== Old Property Values Begin
+Property departments[0] of type DataObject - object deleted
+===== Old Property Values Begin
+Property name of type String:windows
+
+Property id of type String:1
+
+Property employees[1] of type DataObject - object deleted
+===== Old Property Values Begin
+Property name of type String:Colin Poisson
+
+Property id of type String:2
+
+===== Old Property Values End
+
+Property employees[0] of type DataObject - object deleted
+===== Old Property Values Begin
+Property name of type String:Ivor Payne
+
+Property id of type String:1
+
+===== Old Property Values End
+
+===== Old Property Values End
+
+Property departments[1] of type DataObject object still exists
+
+===== Old Property Values End
+=====Modified Object Ends
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario5.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario5.txt
new file mode 100644
index 0000000000..af5bf47102
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/scenario5.txt
@@ -0,0 +1,8 @@
+===== Modified Object Starts
+Xpath:#/companies.0
+The modified objects type is myspace#Company
+===== Old Property Values Begin
+Property eotm of type DataObject object still exists
+
+===== Old Property Values End
+=====Modified Object Ends
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.cpp b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.cpp
new file mode 100644
index 0000000000..b070aecc7a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.cpp
@@ -0,0 +1,9322 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#pragma warning(disable:4786)
+
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+
+
+#include "sdotest.h"
+
+
+
+
+
+using namespace commonj::sdo;
+
+
+
+/* USED IN RCPTEST */
+
+typedef struct {
+ //zend_object zo; /* The standard zend_object */
+ DataObjectPtr dop; /* The Hydra DataObject */
+ //zend_object *df; /* The Data Factory */
+} sdo_doimpl_object;
+
+
+int sdotest::rcptest()
+{
+
+ try {
+ DataFactoryPtr mdg;
+ sdo_doimpl_object* ptr;
+
+ mdg = DataFactory::getDataFactory();
+ mdg = 0;
+ mdg = DataFactory::getDataFactory();
+ mdg = NULL;
+ mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+
+ mdg->addType("myspace","Company");
+
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","id",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Root","companies",
+ "myspace","Company", true, false, true);
+
+ const Type& tcc = mdg->getType("myspace","Root");
+
+
+ ptr = new sdo_doimpl_object;
+
+ ptr->dop = mdg->create((Type&)tcc);
+
+ ptr->dop = 0; // null ;
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << "RefCountingPointer test failed" << endl;
+ return 0;
+ }
+}
+
+// JIRA 546 relaxes the restriction that when the data factory creates its
+// first data object then the type structure known to that data factory is
+// resolved and becomes read only. So, now we can add types after the first
+// data object is created. We must also show that when data objects are copied
+// from one data factory to another, the correct tests are performed to ensure
+// that the destination factory contains the types required by the incoming
+// data object and if not the copy is rejected.
+int sdotest::jira546()
+{
+
+ try {
+ DataFactoryPtr mdg;
+
+ mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root1");
+
+ mdg->addType("myspace","Company1");
+
+ mdg->addPropertyToType("myspace","Company1","name1",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company1","id1",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Root1","companies1",
+ "myspace","Company1", true, false, true);
+
+ const Type& tcc1 = mdg->getType("myspace","Root1");
+
+
+ DataObjectPtr dop1 = mdg->create((Type&)tcc1);
+
+ // The preceding data object creation forced a resolve of the type
+ // system. Can we still extend it?
+
+ mdg->addType("myspace","Root2");
+
+ mdg->addType("myspace","Company2");
+
+ mdg->addPropertyToType("myspace","Company2","name2",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company2","id2",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Root2","companies2",
+ "myspace","Company2", true, false, true);
+
+ const Type& tcc2 = mdg->getType("myspace","Root2");
+
+ DataObjectPtr dop2 = mdg->create((Type&)tcc2);
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << "JIRA-546 test (part 1) failed." << endl;
+ return 0;
+ }
+
+ try {
+ DataFactoryPtr dfp_left = DataFactory::getDataFactory();
+ DataFactoryPtr dfp_right = DataFactory::getDataFactory();
+
+ populateFactory(dfp_left);
+ populateFactory(dfp_right);
+
+ // Extend each data factories with an additional type, the two types
+ // being different. Prior to TUSCANY-546 this would have made them
+ // incompatible.
+
+ dfp_left->addType("Namespace", "LeftType");
+ dfp_left->addPropertyToType("Namespace",
+ "LeftType",
+ "leftProperty",
+ "commonj.sdo",
+ "String",
+ false,
+ false,
+ false);
+
+ dfp_right->addType("Namespace", "RightType");
+ dfp_right->addPropertyToType("Namespace",
+ "RightType",
+ "rightProperty",
+ "commonj.sdo",
+ "String",
+ false,
+ false,
+ false);
+
+ // Create a data object in the left factory
+ DataObjectPtr root = dfp_left->create("Namespace", "Root");
+ DataObjectPtr project = root->createDataObject("project");
+ project->setCString("id", "The TTP Project");
+ DataObjectPtr str = project->createDataObject("string");
+ str->setDataObject("proj", project);
+ str->setCString("value", "The Recursive Acronym Project");
+ DataObjectPtr wp1 = project->createDataObject("packages");
+ DataObjectPtr wp2 = project->createDataObject("packages");
+ wp1->setCString("name", "Work Package 1");
+ wp2->setCString("name", "Work Package 2");
+ project->setDataObject("wp", wp2);
+ DataObjectPtr li1 = wp1->createDataObject("lineitems");
+ DataObjectPtr li2 = wp1->createDataObject("lineitems");
+ DataObjectPtr li3 = wp2->createDataObject("lineitems");
+ DataObjectPtr li4 = wp2->createDataObject("lineitems");
+ li1->setCString("itemname", "LineItem 1");
+ li2->setCString("itemname", "LineItem 2");
+ li3->setCString("itemname", "LineItem 3");
+ li4->setCString("itemname", "LineItem 4");
+ DataObjectPtr str1 = li1->createDataObject("string");
+ DataObjectPtr str2 = li2->createDataObject("string");
+ DataObjectPtr str3 = li3->createDataObject("string");
+ DataObjectPtr str4 = li4->createDataObject("string");
+ str1->setCString("value", "String1");
+ str2->setCString("value", "String2");
+ str3->setCString("value", "String3");
+ str4->setCString("value", "String4");
+
+ if (!transferto(root, dfp_right, false)) return 0;
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << "JIRA-546 test (part 2) failed." << endl;
+ return 0;
+ }
+}
+
+int sdotest::changesummarytest()
+{
+ if (scenario5() == 0) return 0;
+ if (scenario1() == 0) return 0;
+ if (scenario2() == 0) return 0;
+ if (scenario3() == 0) return 0;
+ if (scenario4() == 0) return 0;
+ return 1;
+}
+
+
+int sdotest::scenario1()
+{
+ // scenario 1
+ // create root type - root has cs
+ // create a company type. and containment ref from root, many valued.
+ // props on comp id, name both strings single v.
+ // create root object
+ // begin logging
+ // create a company obj. name=acme id=123
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addPropertyToType("myspace","Root","whatever",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addType("myspace","Company");
+
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","id",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Root","companies",
+ "myspace","Company", true, false, true);
+
+ const Type& tcc = mdg->getType("myspace","Root");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ ChangeSummaryPtr cs = dor->getChangeSummary();
+ cs->beginLogging();
+
+ DataObjectPtr com = dor->createDataObject("companies");
+ com->setCString("name","acme");
+ com->setCString("id","123");
+
+ FILE *f = fopen("scenario1.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open secnario1.dat" << endl;
+ return 0;
+ }
+
+ dumpchangesummary(f, cs);
+
+ fclose(f);
+
+ cs->endLogging();
+
+ //expect cdo:
+ //root - isChanged
+ //comp - isCreated
+
+ return comparefiles("scenario1.dat","scenario1.txt");
+}
+
+
+int sdotest::testui()
+{
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("companyNS","MainType");
+
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tmain = mdg->getType("companyNS","MainType");
+ const Type& tshort = mdg->getType("commonj.sdo","Short");
+ const Type& tint = mdg->getType("commonj.sdo","Integer");
+
+
+ mdg->addPropertyToType(tmain,"short",tshort,true);
+ mdg->addPropertyToType(tmain,"int",tint, true);
+
+ DataObjectPtr main = mdg->create((Type&)tmain);
+
+ DataObjectList& dol1 = main->getList("short");
+ DataObjectList& dol2 = main->getList("int");
+ DataObjectList& dol3 = main->getList((unsigned int)0);
+ DataObjectList& dol4 = main->getList(1);
+
+ return 1;
+ }
+
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << "Unsigned integer test failed" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+
+
+int sdotest::scenario5()
+{
+ // scenario 5
+ // create root type - root has cs
+ // create a company type. and containment ref from root, many valued.
+ // props on comp id, name both strings single v.
+ // create root object
+ // begin logging
+ // create a company obj. name=acme id=123
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addPropertyToType("myspace","Root","whatever",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addType("myspace","Company");
+ mdg->addType("myspace","Employee");
+ mdg->addPropertyToType("myspace","Employee","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","id",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","eotm",
+ "myspace","Employee", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","employees",
+ "myspace","Employee", true, false, true);
+
+ mdg->addPropertyToType("myspace","Root","companies",
+ "myspace","Company", true, false, true);
+
+ const Type& tcc = mdg->getType("myspace","Root");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ ChangeSummaryPtr cs = dor->getChangeSummary();
+
+ DataObjectPtr com = dor->createDataObject("companies");
+ com->setCString("name","acme");
+ com->setCString("id","123");
+
+ const Type& te = mdg->getType("myspace","Employee");
+
+ DataObjectPtr emp = mdg->create(te);
+ emp->setCString("name", "Mr Expendible");
+
+ DataObjectList& emps = com->getList("employees");
+
+ emps.append(emp);
+
+ com->setDataObject("eotm",emp);
+
+ cs->beginLogging();
+
+ com->unset("eotm");
+
+ FILE *f = fopen("scenario5.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open scenario5.dat" << endl;
+ return 0;
+ }
+
+ dumpchangesummary(f, cs);
+
+ fclose(f);
+
+ cs->endLogging();
+
+ return comparefiles("scenario5.dat","scenario5.txt");
+
+ //expect com to have change record, nothing for eotm:
+
+}
+
+int sdotest::scenario2()
+{
+ // create root type - root has cs
+ // create a company type. and containment ref from root, many valued.
+ // 2 props on comp id, name both strings single v.
+ // create root object
+ // create a company obj. name=acme id=123
+ // begin logging()
+ // name="megacorp"
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addPropertyToType("myspace","Root","whatever",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addType("myspace","Company");
+
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","id",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Root","companies",
+ "myspace","Company", true, false, true);
+
+ const Type& tcc = mdg->getType("myspace","Root");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ DataObjectPtr com = dor->createDataObject("companies");
+ com->setCString("name","acme");
+ com->setCString("id","123");
+
+ ChangeSummaryPtr cs = dor->getChangeSummary();
+ cs->beginLogging();
+
+ com->setCString("name","megacorp");
+
+ FILE *f = fopen("scenario2.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open scenario2.dat" << endl;
+ return 0;
+ }
+
+ dumpchangesummary(f, cs);
+
+ fclose(f);
+
+ cs->endLogging();
+
+ //expect cdo:
+ //root- nothing
+ // company- isChanged
+ //setting prop=name, value="acme"
+
+ return comparefiles("scenario2.dat","scenario2.txt");
+
+}
+
+int sdotest::scenario3()
+{
+
+ //create root type - root has cs
+ //create a company type. and containment ref from root, many valued.
+ //2 props on comp id, name both strings single v.
+ //create root object
+ //create a company obj. name=acme id=123
+ //begin logging()
+ //delete company
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addPropertyToType("myspace","Root","whatever",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addType("myspace","Company");
+
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","id",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Root","companies",
+ "myspace","Company", true, false, true);
+
+ const Type& tcc = mdg->getType("myspace","Root");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ DataObjectPtr com = dor->createDataObject("companies");
+ com->setCString("name","acme");
+ com->setCString("id","123");
+
+ ChangeSummaryPtr cs = dor->getChangeSummary();
+ cs->beginLogging();
+
+ com->detach();
+
+ FILE *f = fopen("scenario3.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open scenario3.dat" << endl;
+ return 0;
+ }
+
+ dumpchangesummary(f, cs);
+
+ cs->endLogging();
+
+ fclose(f);
+
+ // expect cdo
+ // root - changed
+ // company - deleted
+
+ return comparefiles("scenario3.dat","scenario3.txt");
+
+}
+
+int sdotest::scenario4()
+{
+ //create root type - root has cs
+ //create a company type. and containment ref from root, many valued.
+ //create a dept type. and containment ref from comp, many valued.
+ //create a emp type. and containment ref from dept, many valued.
+ // give name and id properties to comp,dept, emp
+
+ //create root object
+ //create a company obj. name=acme id=123
+ //create a company obj. name=megacorp id=124
+ // give each company 2 depts
+ // give each dept 2 employees
+
+ // begin logging()
+ // add new employee to first dept of acme
+ // delete employee from second dept of acme
+
+ // change name of first employee of first dept megacorp.
+ // delete first dept of megacorp.
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addPropertyToType("myspace","Root","whatever",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addType("myspace","Company");
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","id",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addType("myspace","Department");
+ mdg->addPropertyToType("myspace","Department","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Department","id",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addType("myspace","Employee");
+ mdg->addPropertyToType("myspace","Employee","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Employee","id",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Root","companies",
+ "myspace","Company", true, false, true);
+
+ mdg->addPropertyToType("myspace","Company","departments",
+ "myspace","Department", true, false, true);
+
+ mdg->addPropertyToType("myspace","Department","employees",
+ "myspace","Employee", true, false, true);
+
+ const Type& tcc = mdg->getType("myspace","Root");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ DataObjectPtr com = dor->createDataObject("companies");
+ com->setCString("name","acme");
+ com->setCString("id","123");
+
+ DataObjectPtr dep = com->createDataObject("departments");
+ dep->setCString("name","widgets");
+ dep->setCString("id","1");
+
+ DataObjectPtr emp = dep->createDataObject("employees");
+ emp->setCString("name","John O'Watt");
+ emp->setCString("id","1");
+
+ emp = dep->createDataObject("employees");
+ emp->setCString("name","Ida Know");
+ emp->setCString("id","2");
+
+
+ dep = com->createDataObject("departments");
+ dep->setCString("name","gadgets");
+ dep->setCString("id","2");
+
+ emp = dep->createDataObject("employees");
+ emp->setCString("name","Ed Memoire");
+ emp->setCString("id","1");
+
+ emp = dep->createDataObject("employees");
+ emp->setCString("name","Phyllis Tyne");
+ emp->setCString("id","2");
+
+
+ DataObjectPtr com2 = dor->createDataObject("companies");
+ com2->setCString("name","megacorp");
+ com2->setCString("id","124");
+
+ dep = com2->createDataObject("departments");
+ dep->setCString("name","windows");
+ dep->setCString("id","1");
+
+ emp = dep->createDataObject("employees");
+ emp->setCString("name","Ivor Payne");
+ emp->setCString("id","1");
+
+ emp = dep->createDataObject("employees");
+ emp->setCString("name","Colin Poisson");
+ emp->setCString("id","2");
+
+ dep = com2->createDataObject("departments");
+ dep->setCString("name","portholes");
+ dep->setCString("id","2");
+
+ emp = dep->createDataObject("employees");
+ emp->setCString("name","Graham Angreeneggs");
+ emp->setCString("id","1");
+
+ emp = dep->createDataObject("employees");
+ emp->setCString("name","Helen Highwater");
+ emp->setCString("id","2");
+
+ DataObjectList& deps = com->getList("departments");
+ DataObjectList& emps = deps[0]->getList("employees");
+ DataObjectList& emps2 = deps[1]->getList("employees");
+ DataObjectList& deps2 = com2->getList("departments");
+ DataObjectList& emps3 = deps2[0]->getList("employees");
+ DataObjectList& emps4 = deps2[1]->getList("employees");
+
+ // should be able to get the change summary property, but it
+ // should be zero.
+ // should be able to find out if the type is a change summary type
+
+ if (! dor->getType().isChangeSummaryType())
+ {
+ if (!silent) cout << "The root object DOESNT HAVE a change summary !!!" << endl;
+ return 0;
+ }
+
+ try {
+ DataObjectPtr csptr = dor->getDataObject("whatever");
+
+ if (!csptr) {
+ if (!silent) cout << "CS property was zero - should be invisible!!!!" << endl;
+ return 0;
+ }
+ else {
+ if (!silent) cout << "CS property was NOT zero !!" << endl;
+ return 0;
+ }
+ }
+ catch (SDOPropertyNotFoundException e)
+ {
+ // cout << "No property shows - this is correct" << endl;
+ }
+
+
+ if (com->getType().isChangeSummaryType())
+ {
+ if (!silent) cout << "The company object has a change summary !!!!" << endl;
+ return 0;
+ }
+
+ ChangeSummaryPtr cs = dor->getChangeSummary();
+ cs->beginLogging();
+
+ DataObjectList& depsout = com->getList("departments");
+
+ emp = depsout[0]->createDataObject("employees");
+ emp->setCString("name","Irma Newby");
+ emp->setCString("id","3");
+
+ DataObjectList& empsout = depsout[1]->getList("employees");
+ empsout.remove(0);
+
+ DataObjectList& depsout2 = com2->getList("departments");
+ DataObjectList& empsout2 = depsout2[0]->getList("employees");
+ empsout2[0]->setCString("name","Ive had my name changed");
+
+ depsout2[0]->detach();
+
+ FILE *f = fopen("scenario4.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open secnario4.dat" << endl;
+ return 0;
+ }
+
+ dumpchangesummary(f, cs);
+
+ cs->endLogging();
+
+ fclose(f);
+
+ // expect:
+ // company acme, department widgets changed.
+ // employee 3 of dept widgets of acme (Irma Newby) created.
+ // employee 1 of dept gadgets or acme deleted
+ // no change record for employee 1 of company megacorp, dept windows
+ // deletion for dept windows of megacorp
+ // deletion for emp 1 of windows - showing original value for name (Ivor Payne)
+ // deletion for emp 2 of windows.
+
+ return comparefiles("scenario4.dat","scenario4.txt");
+
+
+}
+
+int sdotest::seqtest()
+{
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ // company is sequenced.
+ mdg->addType("myspace","Company",true,false);
+
+ mdg->addType("myspace","Department",true,false);
+ // string is many
+
+ mdg->addPropertyToType("myspace","Company","string","commonj.sdo","String",
+ true);
+
+ mdg->addPropertyToType("myspace","Company","departments","myspace","Department",
+ true);
+
+ mdg->addPropertyToType("myspace","Department","name","commonj.sdo","String");
+
+
+ const Type& tcc = mdg->getType("myspace","Company");
+
+ DataObjectPtr dor = mdg->create(tcc);
+ const Property& sprop = dor->getType().getProperty("string");
+ SequencePtr sptr = dor->getSequence();
+
+ FILE *f = fopen("sequence.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Cannot open sequence.dat" << endl;
+ return 0;
+ }
+
+ printseq(f, sptr);
+
+ sptr->addCString(sprop,"I am Item 1 of string");
+
+ printseq(f, sptr);
+
+ sptr->addText("I am the first free text");
+
+ printseq(f, sptr);
+
+ sptr->addCString(sprop,"I am Item 2 of string");
+
+ printseq(f, sptr);
+
+ sptr->setCStringValue(1,"I am free text which has been modified");
+
+ DataObjectPtr dep1 = dor->createDataObject("departments");
+
+ printseq(f, sptr);
+
+ dep1->setCString("name","department1");
+
+ printseq(f, sptr);
+
+ DataObjectList& dol = dor->getList("departments");
+
+ const Type& tcd = mdg->getType("myspace","Department");
+ DataObjectPtr dep2 = mdg->create(tcd);
+
+ printseq(f, sptr);
+
+ dep2->setCString("name","department2");
+
+ printseq(f, sptr);
+
+ dol.append(dep2);
+
+ printseq(f, sptr);
+
+ fclose(f);
+
+ return comparefiles("sequence.dat","sequence.txt");
+
+
+}
+
+
+int sdotest::boolbug()
+{
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ mdg->addType("myspace","Company");
+ mdg->addPropertyToType("myspace","Company","bool","commonj.sdo","Boolean");
+ const Type& tcc = mdg->getType("myspace","Company");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+ try {
+ bool b = dor->getBoolean("bool");
+ return 1;
+ }
+ catch (SDOPropertyNotSetException)
+ {
+ if (!silent) cout << "WRONG not set exception" << endl;
+ return 0;
+ }
+}
+
+int sdotest::scope1()
+{
+ try
+ {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ return 1;
+ }
+ catch(SDORuntimeException e)
+ {
+ return 0;
+ }
+}
+
+int sdotest::scope2()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ mdg->addType("myspace","Company");
+ mdg->addPropertyToType("myspace","Company","csumm","commonj.sdo","ChangeSummary");
+ const Type& tcc = mdg->getType("myspace","Company");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ return 0;
+ }
+}
+
+int sdotest::scope3()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ mdg->addType("myspace","Main");
+ mdg->addType("myspace","Subs");
+ mdg->addPropertyToType("myspace","Main","name","commonj.sdo","String");
+ mdg->addPropertyToType("myspace","Main","subs","myspace","Subs", true);
+ mdg->addPropertyToType("myspace","Subs","name","commonj.sdo","String");
+
+ const Type& tcc = mdg->getType("myspace","Main");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ DataObjectPtr sub = dor->createDataObject("subs");
+ sub->setCString("name", "sub1");
+
+ sub = dor->createDataObject("subs");
+ sub->setCString("name", "sub2");
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ return 0;
+ }
+
+}
+
+int sdotest::testGetters(DataObjectPtr dor)
+{
+ if (!testGetter(dor,"boolean")) return 0;
+ if (!testGetter(dor,"byte")) return 0;
+ if (!testGetter(dor,"character")) return 0;
+ if (!testGetter(dor,"short")) return 0;
+ if (!testGetter(dor,"integer")) return 0;
+ if (!testGetter(dor,"long")) return 0;
+ if (!testGetter(dor,"double")) return 0;
+ if (!testGetter(dor,"float")) return 0;
+ if (!testGetter(dor,"date")) return 0;
+ if (!testGetter(dor,"string")) return 0;
+ if (!testGetter(dor,"bytes")) return 0;
+ if (!testGetter(dor,"dataobject")) return 0;
+ return 1;
+}
+
+int sdotest::testGetter(DataObjectPtr dor, char* str)
+{
+ try
+ {
+ bool b = dor->getBoolean(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent)
+ {
+ cout << "WRONG unset and undefaulted" << endl;
+ }
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject"))
+ {
+ return 1;
+ }
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ char by = dor->getByte(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ wchar_t cy = dor->getCharacter(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ short s = dor->getShort(str);
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ if (!strcmp(str,"bytes")) return 1;
+ return 0;
+
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ int i = dor->getInteger(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ long l = dor->getLong(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ int64_t ll = dor->getLong(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ float f = dor->getFloat(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ long double d = dor->getDouble(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ unsigned int len;
+
+ try {
+ len = dor->getLength(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent)
+ {
+ cout << "WRONG unset and undefaulted" << endl;
+ }
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject"))
+ {
+ return 1;
+ }
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ if (len > 0) {
+ try {
+ wchar_t * buf = new wchar_t[len];
+ unsigned int gotlen = dor->getString(str,buf,len);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+ try {
+ char * cbuf = new char[len];
+ unsigned int gotlen = dor->getBytes(str,cbuf,len);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+ }
+
+ try {
+ SDODate t = dor->getDate(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << " WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+
+ // The following catch block returns to the caller, regardless of whether
+ // the getDate call succeeded or failed. This has the effect of aborting
+ // further tests in this method. Similar remarks apply to many of the catch
+ // blocks here. They should be cleaned up so that as many tests as possible
+ // are run, certainly when predecessors succeed and preferably even if they fail.
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"bytes")) return 1;
+ if (!strcmp(str,"boolean")) return 1;
+ if (!strcmp(str,"string")) return 1;
+ if (!strcmp(str,"dataobject")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ const char * string = dor->getCString(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG - unset and undefaulted" << endl;
+ return 0;
+ }
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 1;
+ if (!strcmp(str,"date")) return 1;
+ return 0;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+
+ try {
+ DataObjectPtr dob = dor->getDataObject(str);
+ }
+ catch (SDOPropertyNotSetException pe)
+ {
+ if (!silent) cout << "WRONG unset and undefaulted" << endl;
+ return 0;
+ }
+
+ catch (SDOInvalidConversionException ec)
+ {
+ if (!strcmp(str,"dataobject")) return 0;
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << endl;
+ return 0;
+ }
+ return 1;
+
+}
+
+int sdotest::conversiontest()
+{
+
+ if (!silent)
+ {
+ cout << "Conversion tests" << endl;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ mdg->addType("myspace","Container");
+ mdg->addType("myspace","Contained");
+ mdg->addPropertyToType("myspace","Container","boolean","commonj.sdo","Boolean");
+ mdg->addPropertyToType("myspace","Container","byte","commonj.sdo","Byte");
+ mdg->addPropertyToType("myspace","Container","character","commonj.sdo","Character");
+ mdg->addPropertyToType("myspace","Container","short","commonj.sdo","Short");
+ mdg->addPropertyToType("myspace","Container","integer","commonj.sdo","Integer");
+ mdg->addPropertyToType("myspace","Container","long","commonj.sdo","Long");
+ mdg->addPropertyToType("myspace","Container","float","commonj.sdo","Float");
+ mdg->addPropertyToType("myspace","Container","double","commonj.sdo","Double");
+ mdg->addPropertyToType("myspace","Container","string","commonj.sdo","String");
+ mdg->addPropertyToType("myspace","Container","bytes","commonj.sdo","Bytes");
+ mdg->addPropertyToType("myspace","Container","dataobject","myspace","Contained");
+ mdg->addPropertyToType("myspace","Container","date","commonj.sdo","Date");
+ mdg->addPropertyToType("myspace","Container","bigint","commonj.sdo","BigInteger");
+ mdg->addPropertyToType("myspace","Container","bigdec","commonj.sdo","BigDecimal");
+
+ const Type& tcc = mdg->getType("myspace","Container");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ if (!silent)
+ {
+ cout << "+++++++++++++++PROPERTY VALUES UNSET ++++++++++++++++++" << endl;
+ }
+
+ if (!testGetters(dor))
+ {
+ return 0;
+ }
+
+ if (!silent)
+ {
+ cout << "+++++++++++++++PROPERTY VALUES SET ++++++++++++++++++++" << endl;
+ }
+
+ // RHEL 4 has problems processing 64 bit integer constants, so we'll do it
+ // the hard way. This is overkill but gives the option to vary the value a
+ // bit.
+
+ int64_t largeInt = 0xFFFF;
+ for (int j = 0; j < 2; j++)
+ {
+ largeInt <<= 16;
+ largeInt += 0xFFFF;
+ }
+
+ DataObjectPtr sub = dor->createDataObject("dataobject");
+ dor->setBoolean("boolean", true);
+ dor->setByte("byte",20);
+ dor->setCharacter("character", 1000);
+ dor->setShort("short", (short)12345678);
+ dor->setInteger("integer", 87654321);
+ dor->setLong("long", largeInt);
+ dor->setFloat("float", (float)12345.678);
+ dor->setDouble("double", 1234567.891);
+ dor->setDate("date", 37575);
+ wchar_t* chars = new wchar_t[50];
+ for (int i=0;i<50;i++) {chars[i] = 0x7F20 + i ;}
+ dor->setString("string",chars, 50);
+
+ char* tchars = new char[50];
+ for (int ii=0;ii<50;ii++) {tchars[ii] = ii + 32;}
+ dor->setBytes("bytes",tchars, 50);
+
+ if (!testGetters(dor))
+ {
+ return 0;
+ }
+
+ if (!silent)
+ {
+ cout << "+++++++++++++++END OF TEST ++++++++++++++++++++++++++++" << endl;
+ }
+
+ return 1;
+}
+
+
+int sdotest::usertest()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addType("myspace","UserTest");
+ mdg->addType("myspace","AnObject");
+
+ const Type& tr = mdg->getType("myspace", "Root");
+ const Type& tm = mdg->getType("myspace", "UserTest");
+ const Type& to = mdg->getType("myspace", "AnObject");
+
+ mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean");
+ mdg->addPropertyToType(tm,"unsetboolean", "commonj.sdo","Boolean");
+ mdg->addPropertyToType(tm,"object", "myspace","AnObject");
+ mdg->addPropertyToType(tm,"unsetobject","myspace","AnObject");
+
+ // many valued...
+ mdg->addPropertyToType(tm,"longs", "commonj.sdo","Integer", true);
+ mdg->addPropertyToType(tm,"objects", "myspace","AnObject", true);
+
+ mdg->addPropertyToType(tr,"usertest", "myspace","UserTest");
+
+ DataObjectPtr root = mdg->create((Type&)tr);
+ DataObjectPtr test = root->createDataObject("usertest");
+ DataObjectPtr do1 = test->createDataObject("object");
+ DataObjectPtr do2 = test->createDataObject("objects");
+ DataObjectPtr do3 = test->createDataObject("objects");
+
+ test->setBoolean("boolean", true);
+
+
+ void* value = (void*)0xF1F1F1F1;
+
+ test->setUserData(value);
+
+ if (test->getUserData() != (void*)0xf1f1f1f1) return 0;
+
+ root->setUserData("usertest",value);
+
+ if (root->getUserData("usertest") != (void*)0xf1f1f1f1) return 0;
+
+ root->setUserData((unsigned int)0,(void*)0x20);
+
+ if (root->getUserData((unsigned int)0) != (void*)0x20) return 0;
+
+ const Property& prop = root->getType().getProperty("usertest");
+
+ root->setUserData(prop,(void*)0x40020);
+
+ if (root->getUserData(prop) != (void*)0x40020) return 0;;
+
+ test->setUserData("boolean", (void*)0x120);
+
+
+ if (test->getUserData("boolean") != (void*)0) return 0;
+
+ test->setUserData("unsetboolean", (void*)0x340);
+
+ if (test->getUserData("unsetboolean") != (void*)0) return 0;
+
+ test->setUserData("object", (void*)0x120);
+
+ if (test->getUserData("object") != (void*)0x120) return 0;
+
+ test->setUserData("unsetobject", (void*)0x540);
+
+ if (test->getUserData("unsetobject") != (void*)0) return 0;
+
+ test->setUserData("objects", (void*)0x640);
+
+ if (test->getUserData("objects") != (void*)0x640) return 0;
+
+ test->setUserData("objects[1]", (void*)0x740);
+
+ if (test->getUserData("objects[1]") != (void*)0x740) return 0;
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << "Exception in user test - unexpected" << endl;
+ return 0;
+ }
+}
+
+int sdotest::versiontest()
+{
+ if (!silent) cout << "The SDO version is :" << SdoRuntime::getVersion() << endl;
+ if (!silent) cout << "The Major version is: " << SdoRuntime::getMajor() << endl;
+ if (!silent) cout << "The Minor version is: " << SdoRuntime::getMinor() << endl;
+ if (!silent) cout << "The Fix level is: " << SdoRuntime::getFix() << endl;
+ return 1;
+}
+
+int sdotest::noncontest()
+{
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Company");
+ mdg->addType("myspace","Department");
+ mdg->addType("myspace","Employee");
+
+ const Type& tr = mdg->getType("myspace", "Company");
+ const Type& tm = mdg->getType("myspace", "Department");
+ const Type& to = mdg->getType("myspace", "Employee");
+
+ // many...
+ mdg->addPropertyToType(tr,"departments","myspace", "Department",
+ true);
+
+ //mdg->addPropertyToType(to,"name","commonj.sdo", "String");
+
+ mdg->addPropertyToType(tm,"employees","myspace", "Employee", true);
+
+ // single, non containment
+ mdg->addPropertyToType(tr,"eom", "myspace","Employee", false
+ , false, false);
+
+ DataObjectPtr comp = mdg->create((Type&)tr);
+
+ {
+ DataObjectPtr dept = comp->createDataObject("departments");
+ DataObjectPtr emp1 = dept->createDataObject("employees");
+ //emp1->setCString("name", "Will");
+ DataObjectPtr emp2 = dept->createDataObject("employees");
+ //emp1->setCString("name", "Bill");
+ DataObjectPtr emp3 = dept->createDataObject("employees");
+ //emp1->setCString("name", "Gill");
+ comp->setDataObject("eom", emp3);
+ }
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << "Failed in containment" << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::defaulttest()
+{
+ try{
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","DefaultTest");
+ mdg->addType("myspace","AnObject");
+
+ const Type& tm = mdg->getType("myspace", "DefaultTest");
+ const Type& to = mdg->getType("myspace", "AnObject");
+
+ mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean");
+
+ mdg->setDefault("myspace","DefaultTest","boolean", true);
+
+ mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte");
+
+ mdg->setDefault("myspace","DefaultTest","byte", (char)'d');
+
+ mdg->addPropertyToType(tm,"character", "commonj.sdo","Character");
+
+ mdg->setDefault("myspace","DefaultTest","character", (wchar_t)'e');
+
+ mdg->addPropertyToType(tm,"short", "commonj.sdo","Short");
+
+ mdg->setDefault("myspace","DefaultTest","short", (short)300);
+
+ mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer");
+
+ mdg->setDefault("myspace","DefaultTest","long", (long)400);
+
+ mdg->addPropertyToType(tm,"longs", "commonj.sdo","Integer", true);
+
+ mdg->setDefault("myspace","DefaultTest","longs", (long)800);
+
+ mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long");
+
+ mdg->setDefault("myspace","DefaultTest","longlong", (int64_t)500);
+
+ mdg->addPropertyToType(tm,"float", "commonj.sdo","Float");
+
+ mdg->setDefault("myspace","DefaultTest","float", (float)600.0);
+
+ mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double");
+
+ mdg->setDefault("myspace","DefaultTest","longdouble", (long double)700.0);
+
+ mdg->addPropertyToType(tm,"date", "commonj.sdo","Date");
+
+ mdg->setDefault("myspace","DefaultTest","date", (long)900);
+
+ mdg->addPropertyToType(tm,"string", "commonj.sdo","String");
+
+ wchar_t* help = new wchar_t[4];
+ help[0] = 'H';
+ help[1] = 'E';
+ help[2] = 'L';
+ help[3] = 'P';
+
+ mdg->setDefault("myspace","DefaultTest","string", help, 4);
+
+ delete[] help;
+
+ char* help2 = new char[4];
+ help2[0] = 'H';
+ help2[1] = 'E';
+ help2[2] = 'L';
+ help2[3] = 'P';
+
+ mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes");
+
+ mdg->setDefault("myspace","DefaultTest","bytes", help2, 4);
+
+ delete[] help2;
+
+ mdg->addPropertyToType(tm,"object", "myspace","AnObject");
+
+ DataObjectPtr test = mdg->create((Type&)tm);
+
+ FILE *f = fopen("defaults.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open file defaults.dat" << endl;
+ return 0;
+ }
+
+
+ fprintf(f, "Boolean default is true: %d\n",test->getBoolean("boolean"));
+
+ fprintf(f, "Byte default is d: %d\n",test->getByte("byte"));
+
+ fprintf(f, "Character default is e: %d\n",test->getCharacter("character"));
+
+ fprintf(f, "Short default is 300: %d\n",test->getShort("short"));
+
+ fprintf(f, "Long default is 400: %d\n",test->getInteger("long"));
+
+ try {
+ fprintf(f, "Longs default is 800: %d\n" ,test->getInteger("longs[1]"));
+ }
+ catch (SDOIndexOutOfRangeException ex)
+ {
+ fprintf(f,"Expected index out of range OK\n");
+ }
+
+ fprintf(f,"Float default is 600: %.3f\n",test->getFloat("float"));
+
+ fprintf(f, "LongDouble default is 700: %.3f\n",(float)test->getDouble("longdouble"));
+
+ fprintf(f, "String default is HELP: ");
+ unsigned int lenw = test->getLength("string");
+ if (lenw > 0) {
+ char* tw = new char[lenw];
+ test->getBytes("string",tw,lenw);
+ for (unsigned int i=0;i<lenw;i++)
+ {
+ fprintf(f,"%c",tw[i]);
+ }
+ fprintf(f,"\n");
+ }
+
+ fprintf(f,"Bytes default is HELP: ");
+ unsigned int len = test->getLength("bytes");
+ if (len > 0) {
+ char* tc = new char[len];
+ test->getBytes("bytes",tc,len);
+ for (unsigned int i=0;i<len;i++)
+ {
+ fprintf(f,"%c", tc[i]);
+ }
+ fprintf(f,"\n");
+ }
+ fclose (f);
+ return comparefiles("defaults.dat","defaults.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << e.getEClassName() << " in ";
+ if (!silent)cout << e.getFileName() << " at line ";
+ if (!silent)cout << e.getLineNumber() << endl;
+ if (!silent)cout << e.getFunctionName() << " ";
+ if (!silent)cout << e.getMessageText() << endl;
+ return 0;
+ }
+}
+
+// Re-write of defaulttest to use methods taking SDOString parameters
+int sdotest::defaulttest_strobj()
+{
+
+ SDOString ns1("myspace");
+ SDOString testName("DefaultTest");
+ SDOString objectName("AnObject");
+ SDOString propName("commonj.sdo");
+
+ try{
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType(ns1, testName);
+ mdg->addType(ns1, objectName);
+
+ const Type& tm = mdg->getType(ns1, testName);
+ const Type& to = mdg->getType(ns1, objectName);
+
+ mdg->addPropertyToType(tm, "boolean", propName, "Boolean");
+
+ mdg->setDefault(ns1, testName, "boolean", true);
+
+ mdg->addPropertyToType(tm, "byte", propName, "Byte");
+
+ mdg->setDefault(ns1, testName, "byte", (char)'d');
+
+ mdg->addPropertyToType(tm, "character", propName, "Character");
+
+ mdg->setDefault(ns1, testName, "character", (wchar_t)'e');
+
+ mdg->addPropertyToType(tm, "short", propName, "Short");
+
+ mdg->setDefault(ns1, testName, "short", (short)300);
+
+ mdg->addPropertyToType(tm, "long", propName, "Integer");
+
+ mdg->setDefault(ns1, testName, "long", (long)400);
+
+ mdg->addPropertyToType(tm, "longs", propName, "Integer", true);
+
+ mdg->setDefault(ns1, testName, "longs", (long)800);
+
+ mdg->addPropertyToType(tm, "longlong", propName, "Long");
+
+ mdg->setDefault(ns1, testName, "longlong", (int64_t)500);
+
+ mdg->addPropertyToType(tm, "float", propName, "Float");
+
+ mdg->setDefault(ns1, testName, "float", (float)600.0);
+
+ mdg->addPropertyToType(tm, "longdouble", propName, "Double");
+
+ mdg->setDefault(ns1, testName, "longdouble", (long double)700.0);
+
+ mdg->addPropertyToType(tm, "date", propName, "Date");
+
+ mdg->setDefault(ns1, testName, "date", (long)900);
+
+ mdg->addPropertyToType(tm, "string", propName, "String");
+
+ wchar_t* help = new wchar_t[4];
+ help[0] = 'H';
+ help[1] = 'E';
+ help[2] = 'L';
+ help[3] = 'P';
+
+ mdg->setDefault(ns1, testName, "string", help, 4);
+
+ delete[] help;
+
+ char* help2 = new char[4];
+ help2[0] = 'H';
+ help2[1] = 'E';
+ help2[2] = 'L';
+ help2[3] = 'P';
+
+ mdg->addPropertyToType(tm, "bytes", propName, "Bytes");
+
+ mdg->setDefault(ns1, testName, "bytes", help2, 4);
+
+ delete[] help2;
+
+ mdg->addPropertyToType(tm, "object", ns1, objectName);
+
+ DataObjectPtr test = mdg->create((Type&)tm);
+
+ FILE *f = fopen("defaults.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open file defaults.dat" << endl;
+ return 0;
+ }
+
+
+ fprintf(f, "Boolean default is true: %d\n",test->getBoolean("boolean"));
+
+ fprintf(f, "Byte default is d: %d\n",test->getByte("byte"));
+
+ fprintf(f, "Character default is e: %d\n",test->getCharacter("character"));
+
+ fprintf(f, "Short default is 300: %d\n",test->getShort("short"));
+
+ fprintf(f, "Long default is 400: %d\n",test->getInteger("long"));
+
+ try {
+ fprintf(f, "Longs default is 800: %d\n" ,test->getInteger("longs[1]"));
+ }
+ catch (SDOIndexOutOfRangeException ex)
+ {
+ fprintf(f,"Expected index out of range OK\n");
+ }
+
+ fprintf(f,"Float default is 600: %.3f\n",test->getFloat("float"));
+
+ fprintf(f, "LongDouble default is 700: %.3f\n",(float)test->getDouble("longdouble"));
+
+ fprintf(f, "String default is HELP: ");
+ unsigned int lenw = test->getLength("string");
+ if (lenw > 0) {
+ char* tw = new char[lenw];
+ test->getBytes("string",tw,lenw);
+ for (unsigned int i=0;i<lenw;i++)
+ {
+ fprintf(f,"%c",tw[i]);
+ }
+ fprintf(f,"\n");
+ }
+
+ fprintf(f,"Bytes default is HELP: ");
+ unsigned int len = test->getLength("bytes");
+ if (len > 0) {
+ char* tc = new char[len];
+ test->getBytes("bytes",tc,len);
+ for (unsigned int i=0;i<len;i++)
+ {
+ fprintf(f,"%c", tc[i]);
+ }
+ fprintf(f,"\n");
+ }
+ fclose (f);
+ return comparefiles("defaults.dat","defaults.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << e.getEClassName() << " in ";
+ if (!silent)cout << e.getFileName() << " at line ";
+ if (!silent)cout << e.getLineNumber() << endl;
+ if (!silent)cout << e.getFunctionName() << " ";
+ if (!silent)cout << e.getMessageText() << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::showdefault(FILE *f, const Type& tm)
+{
+ const Property& pboolean = tm.getProperty("boolean");
+ const Property& pbyte = tm.getProperty("byte");
+ const Property& pcharacter = tm.getProperty("character");
+ const Property& pshort = tm.getProperty("short");
+ const Property& plong = tm.getProperty("long");
+ const Property& plongs = tm.getProperty("longs");
+ const Property& plonglong = tm.getProperty("longlong");
+ const Property& pfloat = tm.getProperty("float");
+ const Property& plongdouble = tm.getProperty("longdouble");
+ const Property& pdate = tm.getProperty("date");
+ const Property& pstring = tm.getProperty("string");
+ const Property& pbytes = tm.getProperty("bytes");
+ const Property& pobject = tm.getProperty("object");
+
+ // first see what we get for the default when there is none
+
+ bool bb = pboolean.getBooleanDefault();
+ const char* bs = pboolean.getCStringDefault();
+
+ fprintf(f, "Boolean default is : %d\n",bb);
+ fprintf(f, "Boolean default as a string is %s\n",bs);
+
+ char cc = pbyte.getByteDefault();
+ const char* cs = pbyte.getCStringDefault();
+ fprintf(f, "Byte default is : %d\n",cc);
+ fprintf(f, "Byte default as a string is %s\n",cs);
+
+ wchar_t wc = pcharacter.getCharacterDefault();
+ const char* ws = pcharacter.getCStringDefault();
+ fprintf(f, "Character default is : %d\n",wc);
+ fprintf(f, "Character default as a string is %s\n",ws);
+
+ short ss = pshort.getShortDefault();
+ fprintf(f, "Short default is : %d\n",ss);
+
+ long ll = plong.getIntegerDefault();
+ fprintf(f, "Integer default is : %d\n",ll);
+ long ll2 = plongs.getLongDefault();
+ fprintf(f, "Integer many default is : %d\n",ll2);
+
+ int64_t llll = plonglong.getLongDefault();
+ fprintf(f, "Long default is : %ld\n",(long)llll);
+
+ float ff = pfloat.getFloatDefault();
+ fprintf(f, "Float default is : %.3f\n",ff);
+
+ long double dd = plongdouble.getDoubleDefault();
+ fprintf(f, "Double default is : %.3f\n",(float)dd);
+
+ const SDODate& sd = pdate.getDateDefault();
+ fprintf(f, "Date default is : %d\n",sd.getTime());
+
+ unsigned int l = pstring.getDefaultLength();
+ if (l > 0)
+ {
+ wchar_t * buf = new wchar_t[l+1];
+ l = pstring.getStringDefault(buf,l);
+ fprintf(f, "String default length is %d\n", l);
+ for (unsigned int i=0;i<l;i++)
+ {
+ fprintf(f, "%c",buf[i]);
+ }
+ fprintf(f, "\n");
+ delete[] buf;
+ const char* wws = pstring.getCStringDefault();
+ fprintf(f, "String default as a string is %s\n", wws);
+
+ }
+ else
+ {
+ fprintf(f, "String default is zero length\n");
+ }
+
+ l = pbytes.getDefaultLength();
+ if (l > 0)
+ {
+ char * buf = new char[l+1];
+ l = pbytes.getBytesDefault(buf,l);
+ fprintf(f, "Bytes default length is %d\n",l);
+ for (unsigned int i=0;i<l;i++)
+ {
+ fprintf(f, "%c", buf[i]);
+ }
+ fprintf(f, "\n");
+ delete[] buf;
+ }
+ else
+ {
+ fprintf(f, "Bytes default is zero length\n");
+ }
+ return 1;
+}
+
+
+int sdotest::propdefaulttest()
+{
+ try{
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","DefaultTest");
+ mdg->addType("myspace","AnObject");
+
+ const Type& tm = mdg->getType("myspace", "DefaultTest");
+ const Type& to = mdg->getType("myspace", "AnObject");
+
+ mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean");
+ mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte");
+ mdg->addPropertyToType(tm,"character", "commonj.sdo","Character");
+ mdg->addPropertyToType(tm,"short", "commonj.sdo","Short");
+ mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer");
+ mdg->addPropertyToType(tm,"longs", "commonj.sdo","Integer", true);
+ mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long");
+ mdg->addPropertyToType(tm,"float", "commonj.sdo","Float");
+ mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double");
+ mdg->addPropertyToType(tm,"date", "commonj.sdo","Date");
+ mdg->addPropertyToType(tm,"string", "commonj.sdo","String");
+ mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes");
+ mdg->addPropertyToType(tm,"object" , "myspace","AnObject");
+
+ //cout << "Testing unset defaults....." << endl;
+
+ FILE *f;
+
+ f = fopen("showdefault1.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open showdefault1.dat" << endl;
+ return 0;
+ }
+ showdefault(f, tm);
+
+ fclose (f);
+ if (!comparefiles("showdefault1.dat","showdefault1.txt"))
+ {
+ return 0;
+ }
+
+ //now set all the defaults....
+
+ mdg->setDefault("myspace","DefaultTest","boolean", true);
+ mdg->setDefault("myspace","DefaultTest","byte", (char)'d');
+ mdg->setDefault("myspace","DefaultTest","character", (wchar_t)'e');
+ mdg->setDefault("myspace","DefaultTest","short", (short)300);
+ mdg->setDefault("myspace","DefaultTest","long", (long)400);
+ mdg->setDefault("myspace","DefaultTest","longs", (long)800);
+ mdg->setDefault("myspace","DefaultTest","longlong", (int64_t)500);
+ mdg->setDefault("myspace","DefaultTest","float", (float)600.0);
+ mdg->setDefault("myspace","DefaultTest","longdouble", (long double)700.0);
+ mdg->setDefault("myspace","DefaultTest","date", (long)900);
+
+
+ wchar_t* help = new wchar_t[4];
+ help[0] = 'H';
+ help[1] = 'E';
+ help[2] = 'L';
+ help[3] = 'P';
+
+ mdg->setDefault("myspace","DefaultTest","string", help, 4);
+
+ delete[] help;
+
+ char* help2 = new char[4];
+ help2[0] = 'H';
+ help2[1] = 'E';
+ help2[2] = 'L';
+ help2[3] = 'P';
+
+
+ mdg->setDefault("myspace","DefaultTest","bytes", help2, 4);
+
+ delete[] help2;
+
+ // and have another go at getting them....
+
+ f = fopen("showdefault2.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open showdefault2.dat" << endl;
+ return 0;
+ }
+ showdefault(f, tm);
+
+ fclose (f);
+ if (!comparefiles("showdefault2.dat","showdefault2.txt"))
+ {
+ return 0;
+ }
+
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << e.getEClassName() << " in ";
+ if (!silent)cout << e.getFileName() << " at line ";
+ if (!silent)cout << e.getLineNumber() << endl;
+ if (!silent)cout << e.getFunctionName() << " ";
+ if (!silent)cout << e.getMessageText() << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::nulltest()
+{
+
+ FILE *f = 0;
+
+ try {
+
+ unsigned int i;
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","NullTest",true, false); // sequenced
+ mdg->addType("myspace","AnObject");
+
+ try
+ {
+ mdg->addType("myspace", 0);
+ if (!silent) cout << "WRONG - SDOIllegalArgumentException should have been thrown for null Type name" << endl;
+ return 0;
+ }
+ catch (SDOIllegalArgumentException e)
+ {}
+
+ const Type& tm = mdg->getType("myspace", "NullTest");
+ const Type& to = mdg->getType("myspace", "AnObject");
+
+ mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean");
+ mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte");
+ mdg->addPropertyToType(tm,"character", "commonj.sdo","Character");
+ mdg->addPropertyToType(tm,"short", "commonj.sdo","Short");
+ mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer");
+ mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long");
+ mdg->addPropertyToType(tm,"float", "commonj.sdo","Float");
+ mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double");
+ mdg->addPropertyToType(tm,"date", "commonj.sdo","Date");
+ mdg->addPropertyToType(tm,"string", "commonj.sdo","String");
+ mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes");
+ mdg->addPropertyToType(tm,"object", "myspace","AnObject");
+
+ try
+ {
+ mdg->addPropertyToType(tm, 0, "myspace", "AnObject");
+ if (!silent) cout << "WRONG - SDOIllegalArgumentException should have been thrown for null Property name" << endl;
+ return 0;
+ }
+ catch (SDOIllegalArgumentException e)
+ {}
+
+
+ mdg->addPropertyToType(tm,"cs", "commonj.sdo","ChangeSummary");
+
+ DataObjectPtr test = mdg->create((Type&)tm);
+ DataObjectPtr ob = mdg->create((Type&)to);
+ DataObjectPtr ob2 = mdg->create((Type&)to);
+ DataObjectPtr ob3 = mdg->create((Type&)to);
+
+
+ f = fopen("nulltest.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open file nulltest.dat" << endl;
+ return 0;
+ }
+
+ // first check all props are unset
+
+ ChangeSummaryPtr cs = test->getChangeSummary();
+
+ cs->beginLogging();
+
+ PropertyList pl = test->getInstanceProperties();
+
+ fprintf(f, "Initially - all properties unset, and default values...\n");
+ for (i=0;i<pl.size(); i++)
+ {
+ if (pl[i].isMany())continue;
+ try {
+ if (pl[i].getType().isDataType()) {
+ fprintf(f, "%s set:%d value ",pl[i].getName(),test->isSet(pl[i]));
+ const char *xx = test->getCString(pl[i]);
+ if (xx != 0)
+ {
+ fprintf(f, "%s\n",xx);
+ }
+ else
+ {
+ fprintf(f, " is empty \n");
+ }
+ }
+ else {
+ fprintf(f,"%s set: %d value:", pl[i].getName(),test->isSet(pl[i]));
+ DataObjectPtr xy = test->getDataObject(pl[i]);
+ if (xy != 0)
+ {
+ fprintf(f, " is not empty\n");
+ }
+ else
+ {
+ fprintf(f, " is empty \n");
+ }
+ }
+ }
+ catch (SDOPropertyNotSetException)
+ {
+ if (!silent) cout << " WRONG - got not set exception" << endl;
+ return 0;
+ }
+ }
+ test->setBoolean("boolean", false);
+ test->setByte("byte",0);
+ test->setCharacter("character",0);
+ test->setShort("short",0);
+ test->setInteger("long",0);
+ test->setLong("longlong",0 );
+ test->setFloat("float",0);
+ test->setDouble("longdouble",0 );
+ test->setDate("date",0 );
+ test->setString("string",0,0);
+ test->setBytes("bytes","",0) ;
+ test->setDataObject("object",0) ;
+
+
+
+ fprintf(f, "Should now have all properties set, and zero values...\n");
+ for (i=0;i<pl.size(); i++)
+ {
+ if (pl[i].isMany())continue;
+ if (pl[i].getType().isDataType()) {
+ fprintf(f, "%s set:%d value:%s\n", pl[i].getName(),test->isSet(pl[i]),test->getCString(pl[i]));
+ }
+ else {
+ fprintf(f,"%s set:%d dataobject\n", pl[i].getName(),test->isSet(pl[i]));
+ }
+
+ }
+
+ for (i=0;i<pl.size(); i++)
+ {
+ test->unset(pl[i]);
+ }
+ fprintf(f, "Should be back to having properties unset, and default values...\n");
+ for (i=0;i<pl.size(); i++)
+ {
+
+ try {
+ if (pl[i].isMany())continue;
+ if (pl[i].getType().isDataType()) {
+ fprintf(f, "%s set:%d value:",pl[i].getName(),test->isSet(pl[i]));
+ const char *xx = test->getCString(pl[i]);
+ if (xx != 0)
+ {
+ fprintf(f, "%s\n", xx);
+ }
+ else
+ {
+ fprintf(f, " is empty \n");
+ }
+ }
+ else {
+ fprintf(f, "%s set: %d dataobject", pl[i].getName(),test->isSet(pl[i]));
+ DataObjectPtr dp = test->getDataObject(pl[i]);
+ if (dp != 0)
+ {
+ fprintf(f, " is not empty\n");
+ }
+ else
+ {
+ fprintf(f, " is empty \n");
+ }
+ }
+ }
+ catch (SDOPropertyNotSetException)
+ {
+ if (!silent) cout << "WRONG - not set exception" << endl;
+ return 0;
+ }
+ }
+
+ SequencePtr s = test->getSequence();
+
+ s->addBoolean(test->getType().getProperty("boolean")/*"boolean"*/, false);
+ s->addByte(1/*"byte"*/,0);
+ s->addCharacter(2/*"character"*/,0);
+ s->addShort(3/*"short"*/,0);
+ s->addInteger(4/*"long"*/,0);
+ s->addLong(5/*"longlong"*/,0 );
+ s->addFloat(6/*"float"*/,0);
+ s->addDouble(7/*"longdouble"*/,0 );
+ // bug ...s->setDate(8/*"date"*/,0 );
+ s->addString(9/*"string"*/,0,0);
+ s->addBytes(10/*"bytes"*/,"",0) ;
+ s->addDataObject(11/*"object"*/,0) ;
+
+ for (i=0;i<pl.size(); i++)
+ {
+ try {
+ if (pl[i].isMany())continue;
+ if (pl[i].getType().isDataType()) {
+ fprintf(f, "%s set:%d value:", pl[i].getName(),test->isSet(pl[i]));
+ const char* xx = test->getCString(pl[i]);
+ if ( xx != 0)
+ {
+ fprintf(f, "%s\n", xx);
+ }
+ else
+ {
+ fprintf(f, " is empty \n");
+ }
+ }
+ else {
+ fprintf(f, "%s set:%d dataobject", pl[i].getName(),test->isSet(pl[i]));
+ DataObjectPtr db = test->getDataObject(pl[i]);
+ if (db != 0)
+ {
+ fprintf(f, "\n");
+ }
+ else
+ {
+ fprintf(f, " is empty \n");
+ }
+ }
+ }
+ catch (SDOPropertyNotSetException)
+ {
+ if (!silent) cout << "WRONG - not set exception " << endl;
+ return 0;
+ }
+ }
+ ChangedDataObjectList& cl = cs->getChangedDataObjects();
+ for ( i =0; i< cl.size() ; i++)
+ {
+ if (cs->isCreated(cl[i])) {
+ fprintf(f, "Created dataobject\n");
+ }
+ if (cs->isDeleted(cl[i])) {
+ fprintf(f, "Deleted dataobject\n");
+ }
+ if (cs->isModified(cl[i])) {
+ fprintf(f, "Modified dataobject\n");
+ }
+ }
+
+ // now unset all the properties...
+ for (i=0;i<pl.size(); i++)
+ {
+ test->unset(pl[i]);
+ }
+
+ for (i=0;i<pl.size(); i++)
+ {
+ if (!pl[i].isMany() )
+ {
+ test->setNull(i);
+ }
+ }
+
+ fprintf(f, "Should all be null, and default values...\n");
+ for (i=0;i<pl.size(); i++)
+ {
+ if (pl[i].isMany())continue;
+ if (pl[i].getType().isDataType()) {
+ // check for a null first!!
+ fprintf(f, "%s isNull:%d set:%d value:",pl[i].getName(),
+ test->isNull(i),test->isSet(pl[i]));
+ if (test->getCString(pl[i]) == 0) fprintf(f, "\n");
+ else fprintf(f, "%s\n", test->getCString(pl[i]));
+ }
+ else {
+ fprintf(f, "%s isNull:%d set:%d value",pl[i].getName(),
+ test->isNull(i),test->isSet(pl[i]));
+ if (test->getDataObject(pl[i]) == 0) fprintf(f, " empty\n");
+ else fprintf(f, " dataobject\n");
+ }
+ }
+
+ s->addBoolean(test->getType().getProperty("boolean")/*"boolean"*/, true);
+ s->addByte(1/*"byte"*/,1);
+ s->addCharacter(2/*"character"*/,1);
+ s->addShort(3/*"short"*/,1);
+ s->addInteger(4/*"long"*/,1);
+ s->addLong(5/*"longlong"*/,1 );
+ s->addFloat(6/*"float"*/,1.0);
+ s->addDouble(7/*"longdouble"*/,1.0 );
+ // bug ...s->setDate(8/*"date"*/,0 );
+ wchar_t* chs = new wchar_t[5];
+ chs[0] = 'h';
+ chs[1] = 'e';
+ chs[2] = 'l';
+ chs[3] = 'l';
+ chs[4] = 'o';
+ s->addString(9/*"string"*/,chs,5);
+ delete[] chs;
+ s->addBytes(10/*"bytes"*/,"hello",5) ;
+ s->addDataObject(11/*"object"*/,ob) ;
+
+ fprintf(f, "Should all have values, and not be null..\n");
+ for (i=0;i<pl.size(); i++)
+ {
+
+ if (pl[i].isMany())continue;
+ if (pl[i].getType().isDataType()) {
+ fprintf(f, "%s isNull:%d set:%d value:",pl[i].getName(),
+ test->isNull(i),test->isSet(pl[i]));
+ if (test->getCString(pl[i]) == 0) fprintf(f, "\n");
+ else fprintf(f, "%s\n", test->getCString(pl[i]));
+
+ }
+ else {
+ fprintf(f, "%s isNull%d set:%d value:", pl[i].getName(),
+ test->isNull(i),test->isSet(pl[i]));
+ if (test->getDataObject(pl[i]) == 0) fprintf(f, " empty\n");
+ else fprintf(f, " dataobject\n");
+ }
+ }
+
+ for (i=0;i<pl.size(); i++)
+ {
+ if (!pl[i].isMany() )
+ {
+ test->setNull(pl[i]);
+ }
+ }
+
+ fprintf(f, "Should all be null, and default values...\n");
+ for (i=0;i<pl.size(); i++)
+ {
+
+ try {
+ if (pl[i].isMany())continue;
+ if (pl[i].getType().isDataType()) {
+ fprintf(f, "%s isNull:%d set:%d value:",pl[i].getName(),
+ test->isNull(i),test->isSet(pl[i]));
+ if (test->getCString(pl[i]) == 0) fprintf(f, "\n");
+ else fprintf(f, "%s\n",test->getCString(pl[i]));
+
+ }
+ else {
+ fprintf(f, "%s isNull;%d set:%d value:", pl[i].getName(),
+ test->isNull(i),test->isSet(pl[i]));
+ if (test->getDataObject(pl[i]) == 0) fprintf(f," empty\n");
+ else fprintf(f, " dataobject\n");
+ }
+ }
+ catch (SDOPropertyNotSetException)
+ {
+ if (!silent) cout << " WRONG - not set exception" << endl;
+ return 0;
+ }
+ }
+
+ cs->endLogging();
+ fclose(f);
+
+ int rr = comparefiles("nulltest.dat","nulltest.txt");
+
+ if (rr == 0)
+ {
+ if (!silent) cout << "Nulltest compare failed - probably because of differences is formats for doubles/floats" << endl;
+ // accept the test.
+ return 1;
+
+ }
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << "Nulltest failed " << e << endl;
+ if (f) fclose(f);
+ return 0;
+ }
+}
+
+int sdotest::maintest()
+{
+
+ unsigned int i;
+
+ FILE *f;
+
+ try{
+
+ f = fopen("maintest.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Failed to open maintest.dat" << endl;
+ }
+
+ fprintf(f,"Test Program starting to create types ...\n");
+
+ /* First create a DataFactory , then add some types and props...*/
+
+ /* This is dms creation of metadata */
+
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Company");
+ mdg->addType("myspace","Department");
+ // manager is a sequenced type...
+ mdg->addType("myspace","Manager", true, false);
+
+ mdg->addType("myspace","Employee");
+
+ // tests of base types
+
+ // note - base type of a seq type must be seq...
+ mdg->addType("myspace","Person", true, false);
+
+ mdg->addType("myspace","DerivedString");
+ mdg->addType("myspace","SubDepartment");
+
+ /* Now add the properties to the types...*/
+
+ const Type& tc = mdg->getType("myspace","Company");
+ const Type& ts = mdg->getType("commonj.sdo","String");
+ const Type& ti = mdg->getType("commonj.sdo","Integer");
+ const Type& tf = mdg->getType("commonj.sdo","Float");
+ const Type& tm = mdg->getType("myspace","Manager");
+
+ fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType());
+
+ const Type& td = mdg->getType("myspace","Department");
+ const Type& te = mdg->getType("myspace","Employee");
+ const Type& tp = mdg->getType("myspace","Person");
+ const Type& tds= mdg->getType("myspace","DerivedString");
+ const Type& tsd= mdg->getType("myspace","SubDepartment");
+
+ fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType());
+
+
+
+
+
+ /* By type, with a type */
+ mdg->addPropertyToType(tc,"name",ts);
+
+ /* by name/uri with a type */
+ mdg->addPropertyToType("myspace","Company","address",ts);
+
+ /* by type with name/uri */
+ mdg->addPropertyToType(tc,"departments", "myspace","Department",
+ true);
+
+
+ // add a reference to employee of the month
+ mdg->addPropertyToType(tc,"employee of the month", "myspace","Employee",
+ false, false, false);
+
+
+
+ /* A list of floats */
+
+ mdg->addPropertyToType(tc,"floatlist", tf,true);
+
+ mdg->addPropertyToType(tc,"pdg", tm);
+
+ fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType());
+
+ mdg->addPropertyToType(td,"name", ts);
+
+ mdg->addPropertyToType(td,"id", ti, false, true, false);
+
+ mdg->addPropertyToType(td,"manager", tm);
+
+ mdg->addPropertyToType(tm,"name", ts);
+
+
+ mdg->addPropertyToType(te,"name",ts);
+ mdg->addPropertyToType(td,"employees",te,true,false,true);
+
+
+
+ // emps and managers are both people (in theory).
+ mdg->setBaseType(te,tp);
+ fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType());
+ mdg->setBaseType(tm,tp);
+ fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType());
+ mdg->addPropertyToType(tp,"haircolour", ts);
+ mdg->addPropertyToType(tp,"name", ts);
+ mdg->addPropertyToType(tm,"officeid", ts);
+ mdg->addPropertyToType(te,"cubelocation", ts);
+
+ mdg->addPropertyToType(tc,"shareholder", tp);
+
+ //derived string - derived from string - cannot have properties!!!
+ mdg->setBaseType(tds,ts);
+
+ // subdept derived from dept
+ mdg->setBaseType(tsd,td);
+ mdg->addPropertyToType(tsd,"subname",ts);
+
+ mdg->addPropertyToType(tc, "substring",tds);
+
+ /* by type with name/uri */
+ mdg->addPropertyToType(tc,"subdepartments", "myspace","SubDepartment",
+ true);
+
+ /* This is the data structure */
+
+
+
+ /* company
+ ----shareholder (Person)
+ ----substring (DerivedString)
+ * ----name (String)
+ * ----pdg (Manager)
+ (inherits haircolour from person,
+ has name as duplicate property - should use person.name
+ has officeid)
+ * ----name(String)
+ ----haircolour(String)
+ ----officeid(String)
+ *
+ * ----depts[] (Department)
+ * ----name (String)
+ * ----id (Integer)
+ * ----manager (Manager).
+ * ----name(String)
+ ----haircolour(String) from Person
+ * ----employees[] (Employee)
+ * ----name(String)
+ ----haircolour(String) - from Person
+ ----cubelocation(String)
+ --subdepartments[] (SubDepartment)
+ ----name (String) from Department
+ ----id (String) from Department
+ ----manager (Manager) from Department
+ ----employees (from department)
+ */
+
+ /* Now add a primitive type test to the manager */
+ mdg->addPropertyToType(tm,"str",ts);
+
+ fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType());
+
+ mdg->addPropertyToType(tm,"boolean", "commonj.sdo","Boolean");
+ mdg->addPropertyToType(tm,"byte", "commonj.sdo","Byte");
+ mdg->addPropertyToType(tm,"character", "commonj.sdo","Character");
+ mdg->addPropertyToType(tm,"short", "commonj.sdo","Short");
+ mdg->addPropertyToType(tm,"long", "commonj.sdo","Integer");
+ mdg->addPropertyToType(tm,"longlong", "commonj.sdo","Long");
+ mdg->addPropertyToType(tm,"float", "commonj.sdo","Float");
+ mdg->addPropertyToType(tm,"longdouble", "commonj.sdo","Double");
+ mdg->addPropertyToType(tm,"date", "commonj.sdo","Date");
+ // dead mdg->addPropertyToType(tm,"charptr", "commonj.sdo","Bytes");
+ mdg->addPropertyToType(tm,"string", "commonj.sdo","String");
+ mdg->addPropertyToType(tm,"bytes", "commonj.sdo","Bytes");
+
+
+ fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType());
+
+ // create a few aliases
+
+ mdg->setAlias("myspace","Company","TheFirm");
+ mdg->setAlias("myspace","Company","departments","TheDepartments");
+ mdg->setAlias("myspace","Company","TheBigFirm");
+ mdg->setAlias("myspace","Company","TheLittleFirm");
+
+ const Type& tlf = mdg->getType("myspace","TheBigFirm");
+
+ fprintf(f, "Should be Company :%s\n", tlf.getName());
+
+ fprintf(f, "Should be 3: %d\n", tlf.getAliasCount());
+
+ for (unsigned int ai = 0; ai < tlf.getAliasCount(); ai++)
+ {
+ fprintf(f, "Alias: %s\n",tlf.getAlias(ai));
+ }
+
+
+ // Change summary test begins
+ mdg->addPropertyToType(tc,"csumm","commonj.sdo","ChangeSummary");
+ // should log an error - but not fail
+ mdg->addPropertyToType(td,"csumm","commonj.sdo","ChangeSummary");
+
+ fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType());
+
+ fprintf(f, "BEFORE RESOLUTION\n");
+ printDataStructure(f, mdg);
+
+ /* Now create some objects in the dg */
+
+// DataObjectPtr dor;
+
+ const Type& tcc = mdg->getType("myspace","Company");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ fprintf(f, "AFTER RESOLUTION\n");
+ printDataStructure(f, mdg);
+
+ fprintf(f, "Manager is sequenced?%d\n",tm.isSequencedType());
+
+ dor->setCString("substring","This is the sub string - its primitive, but not a string");
+
+ const char* subby = dor->getCString("substring");
+
+ fprintf(f, "%s\n", subby);
+
+ dor->setCString("name","acmecorp");
+ const char* chnam = dor->getCString("name");
+ fprintf(f, "%s\n", chnam);
+
+ dor->unset("name");
+
+ dor->setCString("name","acmecorp");
+
+ // Set up the two departments before logging starts
+
+ DataObjectPtr dep1 = dor->createDataObject("departments");
+ dep1->setCString("name","Developement");
+
+ try
+ {
+ dep1->setInteger("id", 1);
+ if (!silent)cout << "WRONG read-only Property shouldn't have allowed setting" << endl;
+ fclose(f);
+ return 0;
+ }
+ catch (SDOUnsupportedOperationException e)
+ {}
+
+ DataObjectPtr dep2= dor->createDataObject("departments");
+ dep2->setCString("name","Marketing");
+
+ // add a couple of floats to the floatlist
+ DataObjectList& dolist = dor->getList("floatlist");
+ dolist.append((float)1.4);
+ dolist.append((float)1.5);
+
+ //TODO - change summaries should live on the DataObject
+ // interface - can this be done?
+
+ ChangeSummaryPtr cs = dor->getChangeSummary();
+ cs->beginLogging();
+
+ const char* sname = dor->getCString("name");
+
+ fprintf(f, "%s\n", sname);
+
+ // This should put a created entry in the cs.
+
+ // This should be equivalent to the alternative below.........
+ const Type& tcd = mdg->getType("myspace","Manager");
+ DataObjectPtr pdg = mdg->create((Type&)tcd);
+
+ // This set should put the entry into the change summary.
+ // both in the creations and in the changes.
+ dor->setDataObject("pdg",pdg);
+
+
+ // try getting the boolean as a string - should be defaulted to false:
+ const char *bol;
+ try{
+ bol = pdg->getCString("boolean");
+ if (bol != 0)
+ {
+ fprintf(f, "Expected default boolean (false) : %s\n",bol);
+ }
+ else
+ {
+ fprintf(f, " is empty \n");
+ }
+ }
+ catch (SDOPropertyNotSetException)
+ {
+ if (!silent)cout << "WRONG handled notset exception " << endl;
+ fclose(f);
+ return 0;
+ }
+
+ pdg->setBoolean("boolean", true);
+ bol = pdg->getCString("boolean");
+ fprintf(f, "Expected boolean (true) : %s\n",bol);
+
+ // and the widechars?
+ const char* wdc;
+ try {
+ wdc = pdg->getCString("string");
+ if (wdc != 0)
+ {
+ fprintf(f, "Expected default string (0) : ",wdc);
+ }
+ else
+ {
+ fprintf(f, " is empty \n");
+ }
+ }
+ catch (SDOPropertyNotSetException)
+ {
+ if (!silent) cout << "WRONG handled notset exception" <<endl;
+ fclose (f);
+ return 0;
+ }
+
+
+ // this should get a valid sequence..
+
+ SequencePtr sq = pdg->getSequence();
+
+
+ // The alternative.............................................
+ // Here the create should put the entry into the change summary
+ //DataObject* pdg = dor->createDataObject("pdg");
+
+ // This should do nothing to the cs, as its in a created object
+ pdg->setCString("name","Jacques LePlace");
+
+ // This should modify the property, and add an item to the sequence.
+ sq->addCString("name", "Jacques LePlagne");
+
+
+ // The creation entry should be removed from the change summary
+ // The entry should no longer exist and the pointer is invalid
+ pdg->detach();
+
+ pdg = dor->getDataObject("pdg");
+
+ if (pdg != 0)
+ {
+ fprintf(f, " A deleted data object should be zero and was not\n");
+ }
+
+ pdg = mdg->create((Type&)tcd);
+
+ // A new creation in the change summary
+ dor->setDataObject("pdg",pdg);
+
+ // No modification as the object is created
+ pdg->setCString("name", "Mr Horace Walker");
+
+ sq = pdg->getSequence();
+
+ try {
+ // element 0 is the first setting - which we just deleted!
+ sq->setCStringValue(0,"Unable to set");
+ }
+ catch (SDOIndexOutOfRangeException)
+ {
+ // thats OK
+ sq->addCString("name","Now able to set");
+ }
+
+
+ sq->addText(" - should say now able to set\n");
+
+ for (unsigned int ii=0;ii<sq->size();ii++)
+ {
+ fprintf(f, "%s\n", sq->getCStringValue(ii));
+ }
+
+ try {
+ const char* n = pdg->getCString("name");
+ fprintf(f, " Name from deleted item: %s\n",n);
+ }
+ catch (SDOPropertyNotFoundException e)
+ {
+ // thats ok
+ fprintf(f, "Correctly caught prop not found\n");
+ }
+
+
+ // This should put a change in the cs.
+ dor->setCString("name","mega-new-acmecorp");
+
+
+ // At this point, we should know that pdg was empty and is now
+ // a created object. And that the old string for company name
+ // was "acmecorp"
+
+ // cs->DebugPrint();
+
+
+ /* Now set up the primitive type test on PDG */
+
+ pdg->setCString("string","Hello I am a string");
+ pdg->setBoolean("boolean",true);
+ pdg->setByte("byte",23);
+ pdg->setCharacter("character",45);
+ pdg->setShort("short",34);
+ pdg->setLong("long", 56);
+ pdg->setDouble("longdouble",89.0);
+ pdg->setFloat("float",90.0);
+ pdg->setDate("date",(time_t)200);
+
+ // RHEL 4 has problems processing 64 bit integer constants, so we'll do it the hard way
+ // This is overkill but gives the option to vary the value a bit.
+
+ int64_t largeInt1 = 0xFFFF;
+ int64_t largeInt2 = 0x7FFF;
+ for (int j = 0; j < 3; j++)
+ {
+ largeInt1 <<= 16;
+ largeInt1 += 0xFFFF;
+ largeInt2 <<= 16;
+ largeInt2 += 0xFFFF;
+ }
+
+ pdg->setLong("longlong", largeInt1);
+
+ // try reading the longlong as a string
+ const char *lls = pdg->getCString("longlong");
+ fprintf(f, "0xffffffffffffffff = : %s\n", lls);
+
+ pdg->setLong("longlong", largeInt2);
+
+ lls = pdg->getCString("longlong");
+ fprintf(f, "0x7fffffffffffffff = %s\n",lls);
+
+ pdg->setLong("longlong",0x7FFFFFFF);
+ lls = pdg->getCString("longlong");
+ fprintf(f, "0x7fffffff = %s\n",lls);
+
+ pdg->setLong("longlong",0x80000000);
+ lls = pdg->getCString("longlong");
+ fprintf(f, "0x80000000 = %s\n",lls);
+
+ pdg->setLong("longlong",78);
+
+
+ wchar_t* wide = new wchar_t[4];
+ wide[0] = 'W';
+ wide[1] = 'i';
+ wide[2] = 'd';
+ wide[3] = 'e';
+
+ pdg->setString("string",wide,4);
+
+ // and as a string?
+ wdc = pdg->getCString("string");
+ fprintf(f, " Expected Wide - got : %s\n",wdc);
+
+ delete[] wide;
+
+ char* thin = new char[4];
+ thin[0] = 'T';
+ thin[1] = 'h';
+ thin[2] = 'i';
+ thin[3] = 'n';
+
+ pdg->setBytes("bytes",thin,4);
+
+ const char* dc = pdg->getCString("bytes");
+ fprintf(f, " Expected Thin - got : %s\n",dc);
+
+ delete[] thin;
+
+ const char* ps = pdg->getCString("string");
+ fprintf(f, "Expecting string, got %s\n", ps);
+
+ bool pb = pdg->getBoolean("boolean");
+ fprintf(f, "Expected bool true, got %d\n",pb);
+
+ char pc = pdg->getByte("byte");
+ fprintf(f, "Expected char 23, got %d\n",pc);
+
+ wchar_t pw = pdg->getCharacter("character");
+ fprintf(f, "expected wchar 45, got %d",pw);
+
+ short pss = pdg->getShort("short");
+ fprintf(f, "Expected short 34, got %d\n",pss);
+
+ long pl = pdg->getLong("long");
+ fprintf(f, "Expected long 56 , got %ld\n",pl);
+
+ int64_t pi = pdg->getLong("longlong");
+ fprintf(f, "Expected long long 78, got %ld\n",(long)pi);
+
+ long double ld = pdg->getDouble("longdouble");
+ fprintf(f, "Expected long double 89, got %.3f\n",(float)ld);
+
+ float pf = pdg->getFloat("float");
+ fprintf(f, "Expected float 90, got %.3f\n",pf);
+
+ SDODate pt = pdg->getDate("date");
+ fprintf(f, "Expected time_t 200, got %d\n",pt.getTime());
+
+
+ wchar_t* result;
+ // get the length to allocate:
+ unsigned int widelen = pdg->getString("string",0,0);
+ if (widelen > 0) {
+ result = new wchar_t[widelen];
+ widelen = pdg->getString("string",result,widelen);
+ for ( i=0;i<widelen;i++)
+ {
+ fprintf(f, "Wide[%d]=%d\n",i,result[i]);
+ }
+ delete[] result;
+ }
+
+
+ char* thinresult;
+
+ unsigned int thinlen = pdg->getBytes("bytes",0,0);
+ if (thinlen > 0) {
+ thinresult = new char[thinlen];
+ thinlen = pdg->getBytes("bytes",thinresult,thinlen);
+ for ( i=0;i<thinlen;i++)
+ {
+ fprintf(f, "Thin[%d]=%d\n",i,thinresult[i]);
+ }
+ delete[] thinresult;
+ }
+
+
+ // add two more departments - the first should provoke the
+ // saving of a list in a change summary
+
+ DataObjectPtr dep3 = dor->createDataObject("departments");
+ dep3->setCString("name","Architecture");
+
+ // The second should do no logging in the change summary
+
+ DataObjectPtr dep4= dor->createDataObject("departments");
+ dep4->setCString("name","Pyrotechnics");
+
+
+ // create another one using tha alias
+ DataObjectPtr dep5= dor->createDataObject("TheDepartments");
+ dep5->setCString("name","Accounts");
+
+ DataObjectPtr emp1 = dep1->createDataObject("employees");
+ emp1->setCString("name","Eric");
+
+
+ DataObjectPtr emp2 = dep1->createDataObject("employees");
+ emp2->setCString("name","Bill");
+
+ // now lets make eric employee of the month
+ dor->setDataObject("employee of the month",emp1);
+
+ // no - actually it was bill
+ dor->setDataObject("employee of the month",emp2);
+
+
+
+ // Now add to the list of floats, hopefully the two old
+ // values will get change summarised.
+
+ dolist = dor->getList("floatlist");
+ float f1 = dolist.getFloat(0);
+
+ fprintf(f, "%.3f",f1);
+
+ dolist.setFloat(0,(float)567.7);
+
+ f1 = dolist.getFloat(0);
+
+ fprintf(f, "%.3f",f1);
+
+ dolist.insert(0,(float)34.56);
+
+
+ DataObjectPtr ddd = dor->getDataObject("departments[1]/employees[2]");
+
+ const char* ch = ddd->getCString("name");
+
+ fprintf(f, "Should be Bill:%s\n",ch);
+
+
+ DataObjectPtr ddd2 = dor->getDataObject("TheDepartments[1]/employees[2]");
+
+ const char* ch2 = ddd2->getCString("name");
+
+ fprintf(f, "Should be Bill:%s\n",ch2);
+
+
+ DataObjectPtr dempofm = dor->getDataObject("employee of the month");
+
+ const char* chh = dempofm->getCString("name");
+
+ fprintf(f, "The employee of the month is %s\n",chh);
+
+ // Suppose we delete bill
+
+ DataObjectList& dlo = dor->getList("departments[1]/employees");
+ DataObjectPtr fred = dlo.remove(1);
+
+ const char* chh2 = fred->getCString("name");
+
+ dempofm = dor->getDataObject("employee of the month");
+
+ // uncertain bahaviour - should the reference be zeroed
+ // becuase the item is removed from a list or not?
+ // Right now it doesnt get done, as the assumption is that
+ // the object will be put somewhere else, or dropped.
+ // fprintf(f, "Emp of month is now zero : %p",dempofm);
+
+
+ /* "The client would create a data mediator and get graph which
+ would return the root data object " */
+
+ const char* boss = dor->getCString("pdg/name");
+
+ fprintf(f, "%s\n", boss);
+
+ DataObjectPtr mypdg = dor->getDataObject("pdg");
+
+ Type::Types t = mypdg->getTypeEnum();
+
+ if (t != Type::OtherTypes) {
+ fprintf(f, "pdg correctly identified\n");
+ }
+
+ const char* boss2 = mypdg->getCString("name");
+
+ fprintf(f, "%s\n", boss2);
+
+ /* getPrimitiveArrayListVectorThingy() */
+
+ DataObjectList& deps = dor->getList("departments");
+
+ fprintf(f, "size of list %d\n",deps.size());
+
+ DataObjectPtr dout = deps[0];
+
+ dout->setCString("name","Research And Development");
+
+ const char* snew = dout->getCString("name");
+
+ fprintf(f, "%s\n", snew);
+
+ string snew2 = dor->getCString("departments[1 ] /name");
+
+ fprintf(f, "%s\n", snew2.c_str());
+
+ for (unsigned int lx = 0; lx < deps.size(); lx++)
+ {
+ fprintf(f, "Department: %s\n",deps[lx]->getCString("name"));
+ }
+
+ cs->endLogging();
+
+
+ try {
+ // should fail - if localtype not set
+ dor->setCString("departments","department label");
+ const char* slabel = dor->getCString("departments");
+ fprintf(f, "String in list type:%s\n", slabel);
+ // SDOValue change. Setting values usually works now, so no
+ //exception expected (the error is thrown on the get)
+ //return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ fprintf(f, "Normal expected exception\n");
+ }
+
+ try
+ {
+ const char* snew3 = dor->getCString(" ]awep50wi4,0qw9q]45]# q2345 -t -v3lt6o -56o 56=-o7nl ewv/;sdl f[vxddglh]px dfju/ g#k./jh#.k./");
+ fprintf(f, "%s\n", snew3);
+ return 0;
+ }
+ catch (SDOPropertyNotFoundException e)
+ {
+ fprintf(f, "Normal Invalid path exception\n");
+ }
+
+ try
+ {
+
+ // catch a and a property not found
+ const Property& pp = dor->getType().getProperty("notaproperty");
+ return 0;
+ }
+ catch (SDOPropertyNotFoundException e)
+ {
+ fprintf(f, "Normal SDOPropertyNotFound exception\n");
+ }
+ fclose(f);
+ return comparefiles("maintest.dat","maintest.txt");
+
+ }
+
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << " in ";
+ if (!silent) cout << e.getFileName() << " at line ";
+ if (!silent) cout << e.getLineNumber() << endl;
+ if (!silent) cout << e.getFunctionName() << " ";
+ if (!silent) cout << e.getSeverity() << " ";
+ if (!silent) cout << e.getMessageText() << endl;
+ return 0;
+ }
+}
+
+int sdotest::jira705()
+{
+
+ char* retval = NULL;
+
+ try
+ {
+ DataFactoryPtr dataFactoryPtr = DataFactory::getDataFactory();
+ XSDHelperPtr xsdHelperPtr = HelperProvider::getXSDHelper((DataFactory *)dataFactoryPtr);
+ XMLHelperPtr xmlHelperPtr = HelperProvider::getXMLHelper((DataFactory *)dataFactoryPtr);
+ xsdHelperPtr->defineFile("jira705.xsd");
+
+ DataObjectPtr dataObjectPtr = dataFactoryPtr->create("http://ConvertedStockQuote",
+ "getQuote");
+
+ dataObjectPtr->setCString("ticker1", "IBM");
+ dataObjectPtr->setNull("ticker2");
+
+ XMLDocumentPtr xmlDocumentPtr = xmlHelperPtr->createDocument(dataObjectPtr, 0, "getQuote");
+
+ retval = xmlHelperPtr->save(xmlDocumentPtr, 2);
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << "jira705 test failed" << endl;
+ if (retval != NULL)
+ {
+ delete[] retval;
+ }
+
+ return 0;
+ }
+
+ FILE *outfile = fopen("jira705_out.xml", "w+");
+ if (outfile == 0)
+ {
+ if (!silent) cout << "Unable to open jira705_out.xml" << endl;
+ if (retval != NULL)
+ {
+ delete[] retval;
+ }
+ return 0;
+ }
+
+ fprintf(outfile, "%s", retval);
+
+ fclose(outfile);
+ if (retval != NULL)
+ {
+ delete[] retval;
+ }
+
+ return comparefiles("jira705_out.xml", "jira705_out.txt");
+
+}
+
+int sdotest::jira490()
+{
+
+ FILE *f;
+
+ f = fopen("jira490.dat", "w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Failed to open jira490.dat" << endl;
+ }
+
+ fprintf(f,"Test Program starting to create types ...\n");
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Employee");
+
+ const Type& ts = mdg->getType("commonj.sdo","String");
+ const Type& te = mdg->getType("myspace","Employee");
+
+ mdg->addPropertyToType(te,"name",ts);
+ mdg->addPropertyToType(te,"officeNumber",ts);
+
+ fprintf(f, "\nBefore Resolution\n\n");
+ printDataStructure(f, mdg);
+
+ /* Now create some objects in the dg */
+
+ DataObjectPtr dor = mdg->create((Type&) te);
+
+ fprintf(f, "\nAfter Resolution\n\n");
+ printDataStructure(f, mdg);
+
+ dor->setCString("name", "Mr A Trader");
+ dor->setCString("officeNumber", "123");
+
+ const char* chnam = dor->getCString("name");
+ fprintf(f, "%s\n", chnam);
+
+ const char* offnum = dor->getCString("officeNumber");
+ fprintf(f, "%s\n", offnum);
+
+ char c = dor->getByte("officeNumber");
+ fprintf(f, "%d\n", c);
+ fprintf(f, "%c\n", c);
+
+ fclose(f);
+
+ return comparefiles("jira490.dat", "jira490.txt");
+
+}
+
+int sdotest::getproptest()
+{
+ // should be able to get a property by xpath...
+
+ FILE *f;
+
+ f = fopen("getproptest.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open getproptest.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Company");
+ mdg->addType("myspace","Department");
+ // manager is a sequenced type...
+ mdg->addType("myspace","Manager", true, false);
+ mdg->addType("myspace","Employee");
+
+
+ /* Now add the properties to the types...*/
+
+ const Type& tc = mdg->getType("myspace","Company");
+ const Type& ts = mdg->getType("commonj.sdo","String");
+ const Type& ti = mdg->getType("commonj.sdo","Integer");
+ const Type& tf = mdg->getType("commonj.sdo","Float");
+ const Type& tm = mdg->getType("myspace","Manager");
+ const Type& td = mdg->getType("myspace","Department");
+ const Type& te = mdg->getType("myspace","Employee");
+
+ mdg->addPropertyToType(tc,"name",ts);
+
+ mdg->addPropertyToType(tc,"address",ts);
+
+ mdg->addPropertyToType(tc,"departments", td,true);
+
+ // add a reference to employee of the month
+ mdg->addPropertyToType(tc,"employee of the month", te, false, false, false);
+
+ /* A list of floats */
+ mdg->addPropertyToType(tc,"floatlist", tf,true);
+ mdg->addPropertyToType(tc,"director", tm);
+
+ mdg->addPropertyToType(td,"name", ts);
+ mdg->addPropertyToType(td,"id", ti);
+
+ mdg->addPropertyToType(td,"manager", tm);
+ mdg->addPropertyToType(tm,"name", ts);
+
+ mdg->addPropertyToType(te,"name",ts);
+ mdg->addPropertyToType(td,"employees",te,true,false,true);
+
+ //company/departments/employees.
+ // company - name, address, floatlist
+ // department name, id, manager
+ // employee name
+
+
+ const Type& tcc = mdg->getType("myspace","Company");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+
+ const Property& p = dor->getType().getProperty("name");
+ fprintf(f, "Companys name property is: %s\n",p.getName());
+
+ const Property& p1 = dor->getType().getProperty("departments");
+ fprintf(f, "Companys dept property is:%s\n",p1.getName());
+
+ // now try some xpaths...
+
+ try {
+
+ const Property& p2 = dor->getType().getProperty("departments/employees");
+ fprintf(f,"Departments empl property is:%s\n",p2.getName());
+
+ const Property& p3 = dor->getType().getProperty("departments[456]/employees[123]");
+ fprintf(f,"Departments empl property is:%s\n", p3.getName());
+
+ const Property& p4 = dor->getType().getProperty("departments.34/employees.123/name");
+ fprintf(f,"Employees name property is:%s\n", p4.getName());
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout <<"Exceptions - xpath didnt work" << endl;
+ return 0;
+ }
+ try {
+ const Property& p5 = dor->getType().getProperty("departments.34/[]/name");
+ fprintf(f,"Employees name property is:%s\n",p5.getName());
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ fprintf(f,"Normal exception caught\n");
+ }
+
+ try {
+ const Property& p6 = dor->getType().getProperty("deptartments");
+ fprintf(f,"Deptartments property is:%s\n",p6.getName());
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ fprintf(f,"Normal exception caught\n");
+ }
+
+ try {
+ const Property& p7 = dor->getType().getProperty("../company");
+ fprintf(f,"Company property is:%s\n",p7.getName());
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ fprintf(f,"Normal exception caught\n");
+ }
+ fclose (f);
+ return comparefiles("getproptest.dat","getproptest.txt");
+
+}
+
+int sdotest::querytest()
+{
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ FILE *f = fopen("querytest.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open querytest.dat" << endl;
+ return 0;
+ }
+
+ mdg->addType("myspace","Company");
+ mdg->addType("myspace","Department");
+ // manager is a sequenced type...
+ mdg->addType("myspace","Manager", true, false);
+ mdg->addType("myspace","Employee");
+
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool= mdg->getType("commonj.sdo","Boolean");
+ const Type& tbyte= mdg->getType("commonj.sdo","Byte");
+ const Type& tchar= mdg->getType("commonj.sdo","Character");
+ const Type& tint= mdg->getType("commonj.sdo","Integer");
+ const Type& tlong= mdg->getType("commonj.sdo","Long");
+ const Type& tfloat= mdg->getType("commonj.sdo","Float");
+ const Type& tbytes = mdg->getType("commonj.sdo","Bytes");
+ const Type& tdouble= mdg->getType("commonj.sdo","Double");
+
+ const Type& tc = mdg->getType("myspace","Company");
+ const Type& tm = mdg->getType("myspace","Manager");
+ const Type& td = mdg->getType("myspace","Department");
+ const Type& te = mdg->getType("myspace","Employee");
+
+ mdg->addPropertyToType(tc,"name",tstring);
+
+ mdg->addPropertyToType(tc,"departments", td,true);
+
+ // add a reference to employee of the month
+ mdg->addPropertyToType(tc,"employee of the month", te, false, false, false);
+
+ mdg->addPropertyToType(tc,"director", tm);
+
+ mdg->addPropertyToType(td,"name", tstring);
+
+ mdg->addPropertyToType(td,"manager", tm);
+
+ mdg->addPropertyToType(tm,"name", tstring);
+
+
+ mdg->addPropertyToType(td,"employees",te,true,false,true);
+
+ mdg->addPropertyToType(te,"bool",tbool);
+ mdg->addPropertyToType(te,"byte",tbyte);
+ mdg->addPropertyToType(te,"char",tchar);
+ mdg->addPropertyToType(te,"int",tint);
+ mdg->addPropertyToType(te,"float",tfloat);
+ mdg->addPropertyToType(te,"long",tlong);
+ mdg->addPropertyToType(te,"double",tdouble);
+ mdg->addPropertyToType(te,"bytes",tbytes);
+ mdg->addPropertyToType(te,"string",tstring);
+ mdg->addPropertyToType(te,"name",tstring);
+
+ //company/departments/employees.
+ // company - name, address, floatlist
+ // department name, id, manager
+ // employee name
+
+ const Type& tcc = mdg->getType("myspace","Company");
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ DataObjectPtr dept = dor->createDataObject("departments");
+
+ DataObjectPtr emp1 = dept->createDataObject("employees");
+ DataObjectPtr emp2 = dept->createDataObject("employees");
+ DataObjectPtr emp3 = dept->createDataObject("employees");
+
+ emp1->setCString("name","Employee1");
+ emp2->setCString("name","Employee2");
+ emp3->setCString("name","Employee3");
+
+
+ emp1->setBoolean("bool",true);
+ emp1->setByte("byte",'1');
+ emp1->setCharacter("char",'1');
+ emp1->setInteger("int",1);
+ emp1->setFloat("float",1.0);
+ emp1->setLong("long",1);
+ emp1->setDouble("double",1.0);
+
+ char* bytes = new char[6];
+ bytes[0] = 'h';
+ bytes[1] = 'e';
+ bytes[2] = 'l';
+ bytes[3] = 'l';
+ bytes[4] = 'o';
+
+ emp1->setBytes("bytes",bytes,5);
+
+ wchar_t* mbytes = new wchar_t[6];
+ mbytes[0] = 'h';
+ mbytes[1] = 'e';
+ mbytes[2] = 'l';
+ mbytes[3] = 'l';
+ mbytes[4] = 'o';
+
+ emp1->setString("string",mbytes,5);
+
+
+ emp2->setBoolean("bool",true);
+ emp2->setByte("byte",'2');
+ emp2->setCharacter("char",'2');
+ emp2->setInteger("int",200);
+ emp2->setFloat("float",200.0);
+ emp2->setLong("long",200);
+ emp2->setDouble("double",200.0);
+
+ char* bytes2 = new char[6];
+ bytes2[0] = 'h';
+ bytes2[1] = 'e';
+ bytes2[2] = 'l';
+ bytes2[3] = 'p';
+ bytes2[4] = '!';
+
+ emp2->setBytes("bytes",bytes2,5);
+
+ wchar_t* mbytes2 = new wchar_t[6];
+ mbytes2[0] = 'h';
+ mbytes2[1] = 'e';
+ mbytes2[2] = 'l';
+ mbytes2[3] = 'p';
+ mbytes2[4] = '!';
+
+ emp2->setString("string",mbytes2,5);
+
+ emp3->setBoolean("bool",false);
+ emp3->setByte("byte",'4');
+ emp3->setCharacter("char",'4');
+ emp3->setInteger("int",400);
+ emp3->setFloat("float",400.0);
+ emp3->setLong("long",400);
+ emp3->setDouble("double",400.0);
+
+ char* bytes3 = new char[6];
+ bytes3[0] = 'w';
+ bytes3[1] = 'o';
+ bytes3[2] = 'm';
+ bytes3[3] = 'p';
+ bytes3[4] = '!';
+
+ emp3->setBytes("bytes",bytes3,5);
+
+ wchar_t* mbytes3 = new wchar_t[6];
+ mbytes3[0] = 'w';
+ mbytes3[1] = 'o';
+ mbytes3[2] = 'm';
+ mbytes3[3] = 'p';
+ mbytes3[4] = '!';
+
+ emp3->setString("string",mbytes3,5);
+
+
+
+ try {
+ DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[bool=false]");
+ fprintf(f, "Expected employee3: got %s\n",dob1->getCString("name"));
+
+ DataObjectPtr dob2 = dor->getDataObject("departments[1]/employees[bool=true]");
+ fprintf(f, "Expected employee1: got %s\n",dob2->getCString("name"));
+
+ DataObjectPtr dob3 = dor->getDataObject("departments[1]/employees[byte=2]");
+ fprintf(f, "Expected employee2: got %s\n",dob3->getCString("name"));
+
+ DataObjectPtr dob4 = dor->getDataObject("departments[1]/employees[byte=1]");
+ fprintf(f, "Expected employee1: got %s\n",dob4->getCString("name"));
+
+ DataObjectPtr dob5 = dor->getDataObject("departments[1]/employees[bytes=hello]");
+ fprintf(f, "Expected employee1: got %s\n",dob5->getCString("name"));
+
+ DataObjectPtr dob5a = dor->getDataObject("departments[1]/employees[bytes=\"hello\"]");
+ fprintf(f, "Expected employee1: got %s\n",dob5a->getCString("name"));
+
+ DataObjectPtr dob5b = dor->getDataObject("departments[1]/employees[bytes='hello']");
+ fprintf(f, "Expected employee1: got %s\n",dob5b->getCString("name"));
+
+ DataObjectPtr dob6 = dor->getDataObject("departments[1]/employees[bytes=womp!]");
+ fprintf(f, "Expected employee3: got %s\n",dob6->getCString("name"));
+
+ DataObjectPtr dob7 = dor->getDataObject("departments[1]/employees[double=200.0]");
+ fprintf(f, "Expected employee2: got %s\n",dob7->getCString("name"));
+
+ DataObjectPtr dob8 = dor->getDataObject("departments[1]/employees[string=help!]");
+ fprintf(f, "Expected employee2: got %s\n",dob8->getCString("name"));
+
+ DataObjectPtr dob8a = dor->getDataObject("departments[1]/employees[string=\"help!\"]");
+ fprintf(f, "Expected employee2: got %s\n",dob8a->getCString("name"));
+
+ DataObjectPtr dob8b = dor->getDataObject("departments[1]/employees[string= 'help!']");
+ fprintf(f, "Expected employee2: got %s\n",dob8b->getCString("name"));
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << e.getEClassName() << " in ";
+ if (!silent)cout << e.getFileName() << " at line ";
+ if (!silent)cout << e.getLineNumber() << endl;
+ if (!silent)cout << e.getFunctionName() << " ";
+ if (!silent)cout << e.getMessageText() << endl;
+ return 0;
+ }
+ try {
+ DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[bool=doughnut]");
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ fprintf(f, "Normal exception caught\n");
+ }
+
+ try {
+ DataObjectPtr dob1 = dor->getDataObject("departments[4]/employees[bool=true]");
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ fprintf(f, "Normal exception caught\n");
+ }
+
+ try {
+ DataObjectPtr dob1 = dor->getDataObject("departments[1]/employees[bytes=whoomp!]");
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ fprintf(f, "Normal exception caught\n");
+ }
+
+ try {
+ DataObjectPtr dob1 = dor->getDataObject("departments[1]/blmployees[bool=true]");
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ fprintf(f, "Normal exception caught\n");
+ }
+
+ try {
+ DataObjectPtr dob1 = dor->getDataObject("departments[teapot]/employees[bool=true]");
+ return 0;
+ }
+
+ catch (SDORuntimeException e)
+ {
+ fprintf(f, "Normal exception caught\n");
+ }
+
+ delete[] bytes;
+ delete[] bytes2;
+ delete[] bytes3;
+ delete[] mbytes;
+ delete[] mbytes2;
+ delete[] mbytes3;
+
+ fclose (f);
+ return comparefiles("querytest.dat","querytest.txt");
+}
+
+int sdotest::setmany()
+{
+
+ FILE *f;
+ f = fopen("setmany.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open setmany.dat" << endl;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","School");
+ mdg->addType("myspace","Class");
+ mdg->addType("myspace","Teacher");
+ mdg->addType("myspace","Child");
+ mdg->addType("myspace","Address");
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tint = mdg->getType("commonj.sdo","Integer");
+ const Type& ts = mdg->getType("myspace","School");
+ const Type& tc = mdg->getType("myspace","Class");
+ const Type& tch = mdg->getType("myspace","Child");
+ const Type& tt = mdg->getType("myspace","Teacher");
+ const Type& ta = mdg->getType("myspace","Address");
+
+ mdg->addPropertyToType(tc,"name",tstring);
+ mdg->addPropertyToType(ts,"name",tstring);
+ mdg->addPropertyToType(tch,"name",tstring);
+ mdg->addPropertyToType(tt,"name",tstring);
+
+ mdg->addPropertyToType(tc,"number",tint);
+ mdg->addPropertyToType(ts,"number",tint);
+ mdg->addPropertyToType(tch,"number",tint);
+ mdg->addPropertyToType(tt,"number",tint);
+
+ mdg->addPropertyToType(ts,"classes", tc,true);
+ mdg->addPropertyToType(tc,"children", tch,true);
+ mdg->addPropertyToType(tc,"teacher", tt);
+
+ mdg->addPropertyToType(tch,"address", ta);
+ mdg->addPropertyToType(ts,"address", ta);
+ mdg->addPropertyToType(tt,"address", ta);
+
+ mdg->addPropertyToType(ta,"lines", tstring, true);
+
+ DataObjectPtr school = mdg->create((Type&)ts);
+
+ DataObjectPtr class1 = school->createDataObject("classes");
+ DataObjectPtr class2 = school->createDataObject("classes");
+
+ DataObjectPtr teach1 = class1->createDataObject("teacher");
+
+ DataObjectPtr kid1 = class1->createDataObject("children");
+ DataObjectPtr kid2 = class1->createDataObject("children");
+ DataObjectPtr kid3 = class1->createDataObject("children");
+
+ DataObjectPtr teach2 = class2->createDataObject("teacher");
+
+ DataObjectPtr kid4 = class2->createDataObject("children");
+ DataObjectPtr kid5 = class2->createDataObject("children");
+ DataObjectPtr kid6 = class2->createDataObject("children");
+
+ school->setCString("name","King Norberts");
+ school->createDataObject("address");
+ school->setCString("address/lines.0","The Place");
+ school->setCString("address/lines.1","1 The Avenue");
+ school->setCString("address/lines.2","Murchester");
+ school->setCString("address/lines.3","England");
+
+ class1->setCString("name","Primary");
+ class2->setCString("name","Secondary");
+
+ class1->setCString("teacher/name","Mr Philbert Chloroform");
+ class2->setCString("teacher/name","Mr Brian Onasis");
+
+ kid1->setCString("name", "Witherspoon Jnr");
+ kid2->setCString("name", "Snape");
+ kid3->setCString("name", "Thannet");
+ kid4->setCString("name", "Grimbling");
+ kid5->setCString("name", "Snagget Minor");
+ kid6->setCString("name", "Van Den Bograt");
+
+ kid1->setInteger("number", 1);
+ kid2->setInteger("number", 2);
+ kid3->setInteger("number", 3);
+ kid4->setInteger("number", 4);
+ kid5->setInteger("number", 5);
+ kid6->setInteger("number", 6);
+
+ fprintf(f," School :%s\n", school->getCString("name"));
+
+ fprintf(f," Address1:%s\n",school->getCString("address/lines.0"));
+ fprintf(f," Address2:%s\n",school->getCString("address/lines.1"));
+ fprintf(f," Address3:%s\n",school->getCString("address/lines.2"));
+ fprintf(f," Address4:%s\n",school->getCString("address/lines.3"));
+
+ fprintf(f," Class :%s\n",class1->getCString("name"));
+ fprintf(f," Teacher :%s\n",class1->getCString("teacher/name"));
+ fprintf(f," Pupil1 :%s\n",class1->getCString("children.0/name"));
+ fprintf(f," Pupil2 :%s\n",class1->getCString("children[number=2]/name"));
+ fprintf(f," Pupil3 :%s\n",class1->getCString("children[3]/name"));
+
+ fprintf(f," Class :%s\n",class2->getCString("name"));
+ fprintf(f," Teacher :%s\n",class2->getCString("teacher/name"));
+ fprintf(f," Pupil1 :%s\n",class2->getCString("children[1]/name"));
+ fprintf(f," Pupil2 :%s\n",class2->getCString("children.1/name"));
+ fprintf(f," Pupil3 :%s\n",class2->getCString("children[number=6]/name"));
+
+ try {
+ fprintf(f," Pupil3 :%s\n",class2->getCString("children[4]/name"));
+ return 0;
+ }
+ catch (SDOPathNotFoundException e)
+ {
+ fprintf(f,"Expected path not found exception caught\n");
+ }
+ if (XpathHelper::isIndexed("abc[2]")) {
+ fprintf(f, "Indexed as expected\n");
+ }
+ else {
+ fprintf(f, "Bad - not indexed\n");
+ }
+
+ if (XpathHelper::isIndexed("wibble/[2]")) {
+ fprintf(f, "Indexed as expected\n");
+ }
+ else {
+ fprintf(f, "Bad - not indexed\n");
+ }
+
+ if (XpathHelper::isIndexed("wibble/wobble[2]")) {
+ fprintf(f, "Indexed as expected\n");
+ }
+ else {
+ fprintf(f, "Bad - not indexed\n");
+ }
+
+ if (XpathHelper::isIndexed("wibble/wobble.2")) {
+ fprintf(f, "Indexed as expected\n");
+ }
+ else {
+ fprintf(f, "Bad - not indexed\n");
+ }
+
+ if (XpathHelper::isIndexed("wibble/wobble.2")) {
+ fprintf(f, "Indexed as expected\n");
+ }
+ else {
+ fprintf(f, "Bad - not indexed\n");
+ }
+
+ try {
+ fprintf(f," Address5 :%s\n",school->getCString("address/lines[5]"));
+ return 0;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+ fprintf(f,"Normal index out of range caught\n");
+ }
+
+ try {
+ school->setCString("address/lines[6]","PostCode");
+ fprintf(f, "Debatable behaviour - appended\n");
+ fprintf(f," Address4 :%s\n",school->getCString("address/lines[5]"));
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout <<"Unexpected exception"<< endl;
+ return 0;
+ }
+
+ fclose(f);
+ return comparefiles("setmany.dat","setmany.txt");
+}
+
+int sdotest::carotest2()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","root");
+
+ mdg->addPropertyToType("myspace","root","cs",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ const Type& troot = mdg->getType("myspace","root");
+
+ DataObjectPtr root = mdg->create((Type&)troot);
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ return 0;
+ }
+}
+
+int sdotest::adddeletetest()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","root");
+ mdg->addType("myspace","bill");
+
+ mdg->addPropertyToType("myspace","root","cs",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addPropertyToType("myspace","root","bill",
+ "myspace","bill");
+
+ const Type& troot = mdg->getType("myspace","root");
+
+ DataObjectPtr root = mdg->create((Type&)troot);
+
+ ChangeSummaryPtr cs = root->getChangeSummary();
+ cs->beginLogging();
+ DataObjectPtr dob = root->createDataObject("bill");
+ root->unset("bill");
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ return 0;
+ }
+}
+
+int sdotest::carotest()
+{
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","root");
+ mdg->addType("myspace","company");
+ mdg->addType("myspace","department");
+ mdg->addType("myspace","employee");
+
+ mdg->addPropertyToType("myspace","root","cs",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addPropertyToType("myspace","company","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","department","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","employee","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","root","companies",
+ "myspace","company", true, false, true);
+
+ mdg->addPropertyToType("myspace","company","departments",
+ "myspace","department", true, false, true);
+
+ mdg->addPropertyToType("myspace","company","eotm",
+ "myspace","employee", false, false, false);
+
+ mdg->addPropertyToType("myspace","department","employees",
+ "myspace","employee", true, false, true);
+
+ const Type& troot = mdg->getType("myspace","root");
+
+
+ DataObjectPtr root = mdg->create((Type&)troot);
+ ChangeSummaryPtr cs = root->getChangeSummary();
+
+ cs->beginLogging();
+
+ DataObjectPtr comp = root->createDataObject("companies");
+
+ comp->setCString("name","Acme");
+
+ //cout << "name of the company is " << comp->getCString("name") << endl;
+ try {
+ root->unset("companies[0]");
+ return 1;
+ }
+ catch (SDOUnsupportedOperationException e)
+ {
+ if (!silent)cout << "Abnormal unsupported operation for unset of many valued item" << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::bug2()
+{
+
+ FILE *f;
+
+ f = fopen("bug2.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open bug2.dat" << endl;
+ return 0;
+ }
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","root");
+ mdg->addType("myspace","company");
+
+ mdg->addPropertyToType("myspace","root","cs",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addPropertyToType("myspace","company","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","root","companies",
+ "myspace","company", true, false, true);
+
+
+ const Type& troot = mdg->getType("myspace","root");
+
+
+ DataObjectPtr root = mdg->create((Type&)troot);
+
+ ChangeSummaryPtr cs = root->getChangeSummary();
+
+ cs->beginLogging();
+
+ DataObjectPtr comp = root->createDataObject("companies");
+
+ comp->setCString("name","Acme");
+
+ dumpproperties(f,root);
+
+ DataObjectList& dl = root->getList("companies");
+ dl.remove(0);
+
+ dumpproperties(f,root);
+
+
+ fprintf(f, "Change summary should have no entries...\n");
+
+ dumpchangesummary(f,cs);
+
+ dumpproperties(f,root);
+
+ fprintf(f, "Change summary should have no entries...\n");
+
+ dumpchangesummary(f,cs);
+
+ fclose(f);
+ return comparefiles("bug2.dat","bug2.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent) cout << e.getEClassName() << " in ";
+ if (!silent) cout << e.getFileName() << " at line ";
+ if (!silent) cout << e.getLineNumber() << endl;
+ if (!silent) cout << e.getFunctionName() << " ";
+ if (!silent) cout << e.getMessageText() << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::dumpproperties(FILE *f, DataObjectPtr root)
+{
+ PropertyList pl = root->getInstanceProperties();
+ for (unsigned int i=0;i<pl.size();i++)
+ {
+ if (pl[i].isMany())
+ {
+ DataObjectList& dl = root->getList(pl[i]);
+ if (pl[i].getType().isDataType())
+ {
+ char buf[10];
+ for (unsigned int j=0;j<dl.size();j++)
+ {
+
+ sprintf(buf,"%02d",j);
+ fprintf(f,"MProperty:%s[%s]:%s\n",
+ pl[i].getName(),buf,dl.getCString(j));
+ }
+ }
+ else
+ {
+ fprintf(f,"MObject Property %s\n",pl[i].getName());
+ for (unsigned int j=0;j<dl.size();j++)
+ {
+ if (dl[j] != 0)
+ {
+ dumpproperties(f, dl[j]);
+ }
+ }
+ fprintf(f,"End of MObject Property %s\n",pl[i].getName());
+ }
+ }
+
+ else
+ {
+ if (pl[i].getType().isDataType())
+ {
+ fprintf(f,"Property:%s:%s\n",pl[i].getName(),root->getCString(pl[i]));
+ }
+ else
+ {
+ fprintf(f,"Object Property%s\n:",pl[i].getName());
+ DataObjectPtr d = root->getDataObject(pl[i]);
+ if (d != 0)
+ {
+ dumpproperties(f, d);
+ }
+ else
+ {
+ fprintf(f," Value was not set or null\n");
+ }
+ fprintf(f,"End of Object Property %s\n",pl[i].getName());
+ }
+ }
+ }
+ return 1;
+}
+
+
+int sdotest::datetest()
+{
+
+ try {
+
+ FILE *f = fopen("datetest.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open datetest.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","root");
+ mdg->addType("myspace","company");
+
+ mdg->addPropertyToType("myspace","root","cs",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addPropertyToType("myspace","company","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","company","startupdate",
+ "commonj.sdo","Date", false, false, false);
+
+ mdg->addPropertyToType("myspace","company","reviewdates",
+ "commonj.sdo","Date", true, false, false);
+
+
+ mdg->addPropertyToType("myspace","root","company",
+ "myspace","company", false, false, true);
+
+
+
+ const Type& troot = mdg->getType("myspace","root");
+
+
+ DataObjectPtr root = mdg->create((Type&)troot);
+ ChangeSummaryPtr cs = root->getChangeSummary();
+
+ cs->beginLogging();
+
+ DataObjectPtr comp = root->createDataObject("company");
+
+
+ comp->setCString("name","DateTest");
+
+ fprintf(f,"Name of the company is %s\n",comp->getCString("name"));
+
+ comp->setDate("startupdate",SDODate( 1000 ));
+
+ fprintf(f,"Set start of the company is %d\n",comp->getDate("startupdate").getTime());
+
+ DataObjectList& dol = comp->getList("reviewdates");
+
+ dol.append(SDODate(2000));
+ dol.append(SDODate(4000));
+
+ for (unsigned int i=0;i < dol.size(); i++)
+ {
+ fprintf(f,"Review number:%d was:%d\n", i,dol.getDate(i).getTime());
+
+ // ascTime gives different values on windows and linux,
+ // so comparison of the output is not a valid test.
+
+ //fprintf(f,"Formatted:%d was:%s\n",i,dol.getDate(i).ascTime());
+ }
+
+ cs->endLogging();
+
+ fclose(f);
+
+ return comparefiles("datetest.dat","datetest.txt");
+ }
+
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << e.getEClassName() << " in ";
+ if (!silent)cout << e.getFileName() << " at line ";
+ if (!silent)cout << e.getLineNumber() << endl;
+ if (!silent)cout << e.getFunctionName() << " ";
+ if (!silent)cout << e.getMessageText() << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::matttest1()
+{
+
+ try {
+ FILE *f = fopen("matttest1.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open matttest1.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","root");
+ mdg->addType("myspace","company");
+ mdg->addType("myspace","department");
+ mdg->addType("myspace","employee");
+
+ mdg->addPropertyToType("myspace","root","cs",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addPropertyToType("myspace","company","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","department","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","employee","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","root","companies",
+ "myspace","company", true, false, true);
+
+ mdg->addPropertyToType("myspace","company","departments",
+ "myspace","department", true, false, true);
+
+ mdg->addPropertyToType("myspace","company","eotm",
+ "myspace","employee", false, false, false);
+
+ mdg->addPropertyToType("myspace","department","employees",
+ "myspace","employee", true, false, true);
+
+ const Type& troot = mdg->getType("myspace","root");
+
+
+ DataObjectPtr root = mdg->create((Type&)troot);
+
+ DataObjectPtr comp = root->createDataObject("companies");
+
+ comp->setCString("name","Acme");
+
+ DataObjectPtr dept1 = comp->createDataObject("departments");
+
+ dept1->setCString("name","Shoe");
+
+ DataObjectPtr dept2 = comp->createDataObject("departments");
+
+ dept2->setCString("name","IT");
+
+ DataObjectPtr sue = dept1->createDataObject("employees");
+
+ sue->setCString("name","Sue");
+
+ DataObjectPtr billy = dept2->createDataObject("employees");
+
+ billy->setCString("name","Billy");
+
+ // Want to swap Sue and Billy so, while holding them in variables, should be
+ //able to unset from department then reinsert
+
+ // method 1 - clear the lists...
+ dept1->unset("employees");
+ dept2->unset("employees");
+
+ DataObjectPtr cont = billy->getContainer();
+
+ if (cont != 0)
+ {
+ if (!silent)cout << "Container of Billy should be zero, but is :" << cont->getCString("name") << endl;
+ return 0;
+ }
+
+ DataObjectList& li1 = dept1->getList("employees");
+ DataObjectList& li2 = dept2->getList("employees");
+ li1.append(billy);
+ li2.append(sue);
+
+ DataObjectPtr cont2 = billy->getContainer();
+
+ if (cont2 != 0)
+ {
+ fprintf(f,"Container of Billy should be dept1, and is :%s\n", cont2->getCString("name"));
+ }
+ else {
+ if (!silent)cout << "Problem - Billy is not contained." << endl;
+ return 0;
+ }
+
+ li1.remove(0);
+ li2.remove(0);
+
+ DataObjectPtr cont3 = billy->getContainer();
+
+ if (cont3 != 0)
+ {
+ if (!silent)cout << "Container of Billy should be zero, but is :" << cont3->getCString("name") << endl;
+ return 0;
+ }
+
+ li1.append(sue);
+ li2.append(billy);
+
+ DataObjectPtr cont4 = billy->getContainer();
+
+ if (cont4 != 0)
+ {
+ fprintf(f,"Container of Billy should be dept2, and is :%s\n", cont4->getCString("name"));
+ }
+ else {
+ if (!silent)cout << "Problem - Billy is not contained." << endl;
+ return 0;
+ }
+
+ fclose(f);
+
+ return comparefiles("matttest1.dat","matttest1.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << e.getEClassName() << " in ";
+ if (!silent)cout << e.getFileName() << " at line ";
+ if (!silent)cout << e.getLineNumber() << endl;
+ if (!silent)cout << e.getFunctionName() << " ";
+ if (!silent)cout << e.getMessageText() << endl;
+ return 0;
+ }
+}
+
+int sdotest::carotest3()
+{
+ // sequence new APIs
+ // data object list, new getLength(unsigned int)
+
+
+ FILE *f = fopen("carotest3.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open carotest3.dat" << endl;
+ return 0;
+ }
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ // company is sequenced.
+ mdg->addType("myspace","Company",true,false);
+
+ mdg->addType("myspace","Department",true,false);
+ // string is many
+
+ mdg->addPropertyToType("myspace","Company","string","commonj.sdo","String",
+ true);
+
+ mdg->addPropertyToType("myspace","Company","departments","myspace","Department",
+ true);
+
+ mdg->addPropertyToType("myspace","Company","strings","commonj.sdo","String",
+ true);
+
+ mdg->addPropertyToType("myspace","Company","integers","commonj.sdo","Integer",
+ true);
+
+
+ mdg->addPropertyToType("myspace","Department","name","commonj.sdo","String");
+
+
+ const Type& tcc = mdg->getType("myspace","Company");
+
+ DataObjectPtr dor = mdg->create(tcc);
+ const Property& sprop = dor->getType().getProperty("string");
+
+ SequencePtr sptr = dor->getSequence();
+
+ printseq(f,sptr);
+
+ sptr->addCString(sprop,"I am Item 1 of string");
+
+ printseq(f,sptr);
+
+ sptr->addText("I am the first free text");
+
+ printseq(f,sptr);
+
+ sptr->addCString(sprop,"I am Item 2 of string");
+
+ printseq(f,sptr);
+
+ sptr->setText(1,"I am free text which has been modified");
+
+ printseq(f,sptr);
+
+ DataObjectPtr dep1 = dor->createDataObject("departments");
+
+ printseq(f,sptr);
+
+ dep1->setCString("name","department1");
+
+ printseq(f,sptr);
+
+ DataObjectList& dol = dor->getList("departments");
+
+ unsigned int ii = dol.getLength(0);
+
+ if (ii != 0)
+ {
+ if (!silent)cout << "Length of a data object should be zero:" << ii << endl;
+ return 0;
+ }
+
+ DataObjectList& strl = dor->getList("strings");
+
+ wchar_t * buf = new wchar_t[5];
+ buf[0] = 'a';
+ buf[1] = 'b';
+ buf[2] = 'c';
+ buf[3] = 'd';
+ buf[4] = 'e';
+
+ strl.append(buf,1);
+ strl.append(buf,2);
+ strl.append(buf,3);
+ strl.append(buf,4);
+ strl.append(buf,5);
+
+ fprintf(f,"Element zero, length 1: %d\n",strl.getLength(0));
+ fprintf(f,"Element one, length 2: %d\n",strl.getLength(1));
+ fprintf(f,"Element two, length 3: %d\n",strl.getLength(2));
+ fprintf(f,"Element three,length 4: %d\n",strl.getLength(3));
+ fprintf(f,"Element four, length 5: %d\n",strl.getLength(4));
+
+ try {
+ int xx = strl.getLength(5);
+ if (!silent)cout << "problem - element 5 should not exist" << endl;
+ return 0;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+ if (!silent)cout << "Normal out of range exception in test" << endl;
+ }
+
+ DataObjectList& numl = dor->getList("integers");
+
+ try {
+ int xx2 = numl.getLength(0);
+ if (!silent)cout << "problem - element 0 should not exist" << endl;
+ return 0;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+ if (!silent)cout << "Normal out of range exception in test" << endl;
+ }
+ fclose(f);
+ return comparefiles("carotest3.dat","carotest3.txt");
+}
+
+
+int sdotest::eqhelpertest()
+{
+
+ // copy and equality helpers
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Assembly");
+ mdg->addType("myspace","SubAssembly");
+ mdg->addType("myspace","Part");
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tint = mdg->getType("commonj.sdo","Integer");
+ const Type& tassy = mdg->getType("myspace","Assembly");
+ const Type& tsubassy = mdg->getType("myspace","SubAssembly");
+ const Type& tpart = mdg->getType("myspace","Part");
+
+
+ mdg->addPropertyToType(tassy,"name",tstring);
+ mdg->addPropertyToType(tsubassy,"name",tstring);
+ mdg->addPropertyToType(tpart,"name",tstring);
+
+ mdg->addPropertyToType(tassy,"number",tint);
+ mdg->addPropertyToType(tsubassy,"number",tint);
+ mdg->addPropertyToType(tpart,"number",tint);
+
+ mdg->addPropertyToType(tassy,"subassemblies", tsubassy,true);
+ mdg->addPropertyToType(tsubassy,"parts", tpart,true);
+
+
+ // assy 1
+
+ DataObjectPtr assy1 = mdg->create((Type&)tassy);
+
+ DataObjectPtr subassy1 = assy1->createDataObject("subassemblies");
+ DataObjectPtr subassy2 = assy1->createDataObject("subassemblies");
+
+ DataObjectPtr part1 = subassy1->createDataObject("parts");
+ DataObjectPtr part2 = subassy1->createDataObject("parts");
+ DataObjectPtr part3 = subassy1->createDataObject("parts");
+
+ DataObjectPtr part4 = subassy2->createDataObject("parts");
+ DataObjectPtr part5 = subassy2->createDataObject("parts");
+ DataObjectPtr part6 = subassy2->createDataObject("parts");
+
+
+ assy1->setCString("name","MicroFrame");
+ assy1->setInteger("number",32768);
+
+ subassy1->setCString("name","Legs");
+ subassy2->setCString("name","Body");
+ subassy1->setInteger("number",1);
+ subassy2->setInteger("number",2);
+
+ part1->setCString("name","Leg1");
+ part2->setCString("name","Leg2");
+ part3->setCString("name","Leg3");
+ part1->setInteger("number",10001);
+ part2->setInteger("number",10002);
+ part3->setInteger("number",10003);
+
+
+ part4->setCString("name","MainStrut");
+ part5->setCString("name","Brace1");
+ part6->setCString("name","Brace2");
+ part4->setInteger("number",20001);
+ part5->setInteger("number",20002);
+ part6->setInteger("number",20003);
+
+ // assy2 - shallow equal to assy, but not deep equal
+
+ DataObjectPtr assy2 = mdg->create((Type&)tassy);
+
+ DataObjectPtr subassy3 = assy2->createDataObject("subassemblies");
+ DataObjectPtr subassy4 = assy2->createDataObject("subassemblies");
+
+ DataObjectPtr part7 = subassy3->createDataObject("parts");
+ DataObjectPtr part8 = subassy3->createDataObject("parts");
+ DataObjectPtr part9 = subassy3->createDataObject("parts");
+
+ DataObjectPtr part10 = subassy4->createDataObject("parts");
+ DataObjectPtr part11 = subassy4->createDataObject("parts");
+ DataObjectPtr part12 = subassy4->createDataObject("parts");
+
+
+ assy2->setCString("name","MicroFrame");
+ assy2->setInteger("number",32768);
+
+ subassy3->setCString("name","Legs");
+ subassy4->setCString("name","Body");
+ subassy3->setInteger("number",1);
+ subassy4->setInteger("number",2);
+
+ part7->setCString("name","Leg1");
+ part8->setCString("name","Leg2");
+ part9->setCString("name","Leg3");
+ part7->setInteger("number",10001);
+ part8->setInteger("number",10002);
+ part9->setInteger("number",10003);
+
+
+ part10->setCString("name","MainStrut");
+ part11->setCString("name","Brace1");
+ part12->setCString("name","OddBrace2");
+ part10->setInteger("number",20001);
+ part11->setInteger("number",20002);
+ part12->setInteger("number",20003);
+
+ if (!EqualityHelper::equalShallow(assy1, assy2))
+ {
+ if (!silent) cout << "EQUALITY HELPER TEST - failure at first test" << endl;
+ return 0;
+ }
+ if (EqualityHelper::equal(assy1, assy2))
+ {
+ if (!silent)cout << "EQUALITY HELPER TEST - failure at second test" << endl;
+ return 0;
+ }
+
+ // Now alter assy2 to be deep equal...
+
+
+ part12->setCString("name","Brace2");
+
+ if (!EqualityHelper::equalShallow(assy1, assy2))
+ {
+ if (!silent)cout << "EQUALITY HELPER TEST - failure at third test" << endl;
+ return 0;
+ }
+ if (!EqualityHelper::equal(assy1, assy2))
+ {
+ if (!silent)cout << "EQUALITY HELPER TEST - failure at fourth test" << endl;
+ return 0;
+ }
+
+ // now add a part, so its not deep equal again
+ DataObjectPtr part13 = subassy4->createDataObject("parts");
+
+ if (!EqualityHelper::equalShallow(assy1, assy2))
+ {
+ if (!silent)cout << "EQUALITY HELPER TEST - failure at fifth test" << endl;
+ return 0;
+ }
+ if (EqualityHelper::equal(assy1, assy2))
+ {
+ if (!silent)cout << "EQUALITY HELPER TEST - failure at sixth test" << endl;
+ return 0;
+ }
+
+ // now remove that part again...
+ DataObjectList& dl = subassy4->getList("parts");
+ dl.remove(3);
+
+ // should be deep equal again...
+
+ if (!EqualityHelper::equalShallow(assy1, assy2))
+ {
+ if (!silent)cout << "EQUALITY HELPER TEST - failure at seventh test" << endl;
+ return 0;
+ }
+ if (!EqualityHelper::equal(assy1, assy2))
+ {
+ if (!silent)cout << "EQUALITY HELPER TEST - failure at eighth test" << endl;
+ return 0;
+ }
+ // now make them not shallow equal
+ assy2->setInteger("number",32767);
+
+ if (EqualityHelper::equalShallow(assy1, assy2))
+ {
+ if (!silent)cout << "EQUALITY HELPER TEST - failure at nineth test" << endl;
+ return 0;
+ }
+ if (EqualityHelper::equal(assy1, assy2))
+ {
+ if (!silent)cout << "EQUALITY HELPER TEST - failure at tenth test" << endl;
+ return 0;
+ }
+ return 1;
+}
+
+int sdotest::cohelpertest()
+{
+
+ // copy and equality helpers
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Assembly");
+ mdg->addType("myspace","SubAssembly");
+ mdg->addType("myspace","Part");
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tint = mdg->getType("commonj.sdo","Integer");
+ const Type& tassy = mdg->getType("myspace","Assembly");
+ const Type& tsubassy = mdg->getType("myspace","SubAssembly");
+ const Type& tpart = mdg->getType("myspace","Part");
+
+
+ mdg->addPropertyToType(tassy,"name",tstring);
+ mdg->addPropertyToType(tsubassy,"name",tstring);
+ mdg->addPropertyToType(tpart,"name",tstring);
+
+ mdg->addPropertyToType(tassy,"number",tint);
+ mdg->addPropertyToType(tsubassy,"number",tint);
+ mdg->addPropertyToType(tpart,"number",tint);
+
+ mdg->addPropertyToType(tassy,"subassemblies", tsubassy,true);
+ mdg->addPropertyToType(tsubassy,"parts", tpart,true);
+
+
+ // assy 1
+
+ DataObjectPtr assy1 = mdg->create((Type&)tassy);
+
+ DataObjectPtr subassy1 = assy1->createDataObject("subassemblies");
+ DataObjectPtr subassy2 = assy1->createDataObject("subassemblies");
+
+ DataObjectPtr part1 = subassy1->createDataObject("parts");
+ DataObjectPtr part2 = subassy1->createDataObject("parts");
+ DataObjectPtr part3 = subassy1->createDataObject("parts");
+
+ DataObjectPtr part4 = subassy2->createDataObject("parts");
+ DataObjectPtr part5 = subassy2->createDataObject("parts");
+ DataObjectPtr part6 = subassy2->createDataObject("parts");
+
+
+ assy1->setCString("name","MicroFrame");
+ assy1->setInteger("number",32768);
+
+ subassy1->setCString("name","Legs");
+ subassy2->setCString("name","Body");
+ subassy1->setInteger("number",1);
+ subassy2->setInteger("number",2);
+
+ part1->setCString("name","Leg1");
+ part2->setCString("name","Leg2");
+ part3->setCString("name","Leg3");
+ part1->setInteger("number",10001);
+ part2->setInteger("number",10002);
+ part3->setInteger("number",10003);
+
+
+ part4->setCString("name","MainStrut");
+ part5->setCString("name","Brace1");
+ part6->setCString("name","Brace2");
+ part4->setInteger("number",20001);
+ part5->setInteger("number",20002);
+ part6->setInteger("number",20003);
+
+ // first lets shallow copy assy1:
+
+ DataObjectPtr assy2 = CopyHelper::copyShallow(assy1);
+
+ if (strcmp(assy2->getCString("name"),"MicroFrame"))
+ {
+ if (!silent)cout << "COPYHELPER shallow copy failed(1)" << endl;
+ return 0;
+ }
+ else if (assy2->getInteger("number") != 32768)
+ {
+ if (!silent)cout << "COPYHELPER shallow copy 1 failed(2)" << endl;
+ return 0;
+ }
+ else if (assy2->getList("subassemblies").size() != 0)
+ {
+ if (!silent)cout << "COPYHELPER shallow copy 1 failed(3)" << endl;
+ return 0;
+ }
+ else if (assy2->getContainer() != 0)
+ {
+ if (!silent)cout << "COPYHELPER shallow copy failed(4)" << endl;
+ return 0;
+ }
+
+ // now deep copy it
+
+ DataObjectPtr assy3 = CopyHelper::copy(assy1);
+
+ if (!EqualityHelper::equal(assy1, assy3))
+ {
+ if (!silent)cout << "COPYHELPER deep copy failed(1)" << endl;
+ return 0;
+ }
+ else if (assy3->getContainer() != 0)
+ {
+ if (!silent)cout << "COPYHELPER deep copy failed(2)" << endl;
+ return 0;
+ }
+ return 1;
+}
+
+
+int sdotest::cssave()
+{
+
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("company.xsd");
+
+ //mdg->addType("companyNS","CompanyType");
+ //mdg->addType("companyNS","EmployeeType");
+ //mdg->addType("companyNS","DepartmentType");
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& tdept = mdg->getType("companyNS","DepartmentType");
+ const Type& temp = mdg->getType("companyNS","EmployeeType");
+
+
+ //mdg->addPropertyToType(tcomp,"name",tstring);
+ // not containment...
+ //mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false);
+ //mdg->addPropertyToType(tcomp,"departments",tdept, true);
+ //mdg->addPropertyToType(tcomp,"cs",tcs);
+
+ //mdg->addPropertyToType(tdept,"name",tstring);
+ //mdg->addPropertyToType(tdept,"location",tstring);
+ //mdg->addPropertyToType(tdept,"number",tstring);
+ //mdg->addPropertyToType(tdept,"employees",temp,true);
+
+ //mdg->addPropertyToType(temp, "name",tstring);
+ //mdg->addPropertyToType(temp, "SN", tstring);
+ //mdg->addPropertyToType(temp, "manager", tbool);
+
+
+ // create a graph, then save it
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","ACME");
+
+ DataObjectPtr dept = mdg->create((Type&)tdept);
+ DataObjectList& dol = comp->getList("departments");
+ dol.append(dept);
+
+ dept->setCString("name","Advanced Technologies");
+ dept->setCString("location","NY");
+ dept->setCString("number","123");
+
+ DataObjectPtr emp1 = mdg->create(temp);
+ DataObjectPtr emp2 = mdg->create(temp);
+ DataObjectPtr emp3 = mdg->create(temp);
+
+ emp1->setCString("name","John Jones");
+ emp1->setCString("SN","E0001");
+
+ emp2->setCString("name","Mary Smith");
+ emp2->setCString("SN","E0002");
+ emp2->setBoolean("manager",true);
+
+ emp3->setCString("name","Jane Doe");
+ emp3->setCString("SN","E0003");
+
+ DataObjectList& dol2 = dept->getList("employees");
+ dol2.append(emp1);
+ dol2.append(emp2);
+ dol2.append(emp3);
+
+ comp->setDataObject("employeeOfTheMonth",emp2);
+
+ ChangeSummaryPtr cs = comp->getChangeSummary();
+
+ cs->beginLogging();
+
+ DataObjectPtr emp4 = mdg->create(temp);
+ emp4->setCString("name","Al Smith");
+ emp4->setCString("SN","E0004");
+ emp4->setBoolean("manager",true);
+
+ // first change - create employee 4
+ dol2.append(emp4);
+
+ dol2.remove(1); // element 1 is Mary
+
+ DataObjectPtr emp5 = mdg->create(temp);
+ emp5->setCString("name","Bill Withers");
+ emp5->setCString("SN","E0005");
+
+ dol2.append(emp5);
+
+
+ comp->setCString("name","MegaCorp");
+ comp->setDataObject("employeeOfTheMonth",emp4);
+
+ // silly test - add mary back again
+ dol2.append(emp2);
+
+
+
+
+ cs->endLogging();
+
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company");
+ xmh->save(doc,"cssave-output.xml");
+ return comparefiles("cssave-output.xml","cssave-output.txt");
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "CSSAVE FAILED" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::cssave2()
+{
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("company.xsd");
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& tdept = mdg->getType("companyNS","DepartmentType");
+ const Type& temp = mdg->getType("companyNS","EmployeeType");
+
+
+ // create a graph, then save it
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","Eastleigh Borough Council");
+
+ DataObjectPtr dept = mdg->create((Type&)tdept);
+ DataObjectList& dol = comp->getList("departments");
+ dol.append(dept);
+
+ dept->setCString("name","Waste Disposal");
+ dept->setCString("location","Botley");
+ dept->setCString("number","123");
+
+ DataObjectPtr emp1 = mdg->create(temp);
+ DataObjectPtr emp2 = mdg->create(temp);
+ DataObjectPtr emp3 = mdg->create(temp);
+ DataObjectPtr emp4 = mdg->create(temp);
+ DataObjectPtr emp5 = mdg->create(temp);
+
+ emp1->setCString("name","Alphonse Dodet");
+ emp1->setCString("SN","E0001");
+
+ emp2->setCString("name","Bridget Jones");
+ emp2->setCString("SN","E0002");
+ emp2->setBoolean("manager",true);
+
+ emp3->setCString("name","Colin Thorne");
+ emp3->setCString("SN","E0003");
+
+ emp4->setCString("name","Donald Trump");
+ emp4->setCString("SN","E0004");
+
+ emp5->setCString("name","Eddy the eagle");
+ emp5->setCString("SN","E0005");
+
+ DataObjectList& dol2 = dept->getList("employees");
+ dol2.append(emp1);
+ dol2.append(emp2);
+ dol2.append(emp3);
+ dol2.append(emp4);
+ dol2.append(emp5);
+
+ //comp->setDataObject("employeeOfTheMonth",emp2);
+
+ DataObjectPtr dept2 = mdg->create((Type&)tdept);
+ dol.append(dept2);
+
+ dept2->setCString("name","Tax Collection");
+ dept2->setCString("location","Winchester");
+ dept2->setCString("number","666");
+
+ DataObjectPtr empb1 = mdg->create(temp);
+ DataObjectPtr empb2 = mdg->create(temp);
+ DataObjectPtr empb3 = mdg->create(temp);
+ DataObjectPtr empb4 = mdg->create(temp);
+ DataObjectPtr empb5 = mdg->create(temp);
+
+ empb1->setCString("name","Arch Meanie");
+ empb1->setCString("SN","D0001");
+
+ empb2->setCString("name","Boris the Spider");
+ empb2->setCString("SN","D0002");
+ empb2->setBoolean("manager",true);
+
+ empb3->setCString("name","Cash Hoarder");
+ empb3->setCString("SN","D0003");
+
+ empb4->setCString("name","Dean Giyatoss");
+ empb4->setCString("SN","D0004");
+
+ empb5->setCString("name","Ebenezer Scrooge");
+ empb5->setCString("SN","D0005");
+
+ DataObjectList& dol3 = dept2->getList("employees");
+ dol3.append(empb1);
+ dol3.append(empb2);
+ dol3.append(empb3);
+ dol3.append(empb4);
+ dol3.append(empb5);
+
+ ChangeSummaryPtr cs = comp->getChangeSummary();
+
+ cs->beginLogging();
+
+ // start by deleting a few employees from dept 1
+
+ dol2.remove(1); // B
+ dol2.remove(1); // C
+ dol2.remove(1); // D
+
+ // Now delete the tax collectors as a whole
+
+ dol.remove(1);
+
+ // now perhaps add back one of the employees
+
+ dol2.append(emp3); // C
+
+ comp->setCString("name","MegaCorp");
+
+ try {
+ comp->setDataObject("employeeOfTheMonth",emp4);
+ if (!silent)cout << "emp4 was not in the tree" << endl;
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ }
+
+ comp->setDataObject("employeeOfTheMonth",emp5);
+
+ cs->endLogging();
+
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company");
+ xmh->save(doc,"cssave2-output.xml");
+ return comparefiles("cssave2-output.xml","cssave2-output.txt");
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "CSSAVE FAILED" << e << endl;
+ return 0;
+ }
+}
+
+
+
+
+
+int sdotest::b45933()
+{
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+
+ mdg->addType("companyNS","CompanyType");
+ mdg->addType("companyNS","WombatType");
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& twom = mdg->getType("companyNS","WombatType");
+
+
+ mdg->addPropertyToType(tcomp,"name",tstring);
+ mdg->addPropertyToType(tcomp,"bools",tbool, true);
+ mdg->addPropertyToType(tcomp,"woms",twom, true);
+ mdg->addPropertyToType(tcomp,"cs",tcs);
+
+
+ // create a graph, then save it
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","Bug45933");
+
+ ChangeSummaryPtr cs = comp->getChangeSummary();
+
+ cs->beginLogging();
+
+ DataObjectList& dol = comp->getList("bools");
+ dol.append(false);
+ dol.remove(0);
+ DataObjectPtr awom = mdg->create((Type&)twom);
+ DataObjectList& dol2 = comp->getList("woms");
+ dol2.append(awom);
+ dol2.remove(0);
+
+ cs->endLogging();
+
+ //dumpchangesummary(cs);
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company");
+ xmh->save(doc,"bug45933-output.xml");
+ return comparefiles("bug45933-output.xml","bug45933-output.txt");
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "BUG45933 FAILED" << endl << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::b46617()
+{
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ //XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ //xsh->defineFile("b46617.xsd");
+ mdg->addType("companyNS","CompanyType");
+ mdg->addType("companyNS","DepartmentType");
+ mdg->addType("companyNS","EmployeeType");
+
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& tdept = mdg->getType("companyNS","DepartmentType");
+ const Type& temp = mdg->getType("companyNS","EmployeeType");
+
+ mdg->addPropertyToType(tcomp,"name",tstring);
+ mdg->addPropertyToType(tcomp,"departments",tdept,true,false,true);
+ mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp,false,false,false);
+ mdg->addPropertyToType(tcomp,"CEO",temp,false,false,true);
+
+ mdg->addPropertyToType(tdept,"employees",temp,true,false,true);
+ mdg->addPropertyToType(tdept,"name",tstring,false,false,true);
+ mdg->addPropertyToType(tdept,"location",tstring,false,false,true);
+ mdg->addPropertyToType(tdept,"number",tstring,false,false,true);
+
+ mdg->addPropertyToType(temp,"name",tstring,false,false,true);
+ mdg->addPropertyToType(temp,"SN",tstring,false,false,true);
+ mdg->addPropertyToType(temp,"manager",tbool,false,false,true);
+
+ // create a graph, then save it
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","Eastleigh Borough Council");
+
+ DataObjectPtr dept = mdg->create((Type&)tdept);
+ DataObjectList& dol = comp->getList("departments");
+ dol.append(dept);
+
+ dept->setCString("name","Waste Disposal");
+ dept->setCString("location","Botley");
+ dept->setCString("number","123");
+
+ DataObjectPtr emp1 = mdg->create(temp);
+ DataObjectPtr emp2 = mdg->create(temp);
+ DataObjectPtr emp3 = mdg->create(temp);
+
+ emp1->setCString("name","Alphonse Dodet");
+ emp1->setCString("SN","E0001");
+
+ emp2->setCString("name","Bridget Jones");
+ emp2->setCString("SN","E0002");
+ emp2->setBoolean("manager",true);
+
+ emp3->setCString("name","Carl Marx");
+ emp3->setCString("SN","E0003");
+
+ comp->setDataObject("CEO",emp2);
+
+ DataObjectList& dol2 = dept->getList("employees");
+ dol2.append(emp1);
+ //dol2.append(emp2);
+ dol2.append(emp3);
+
+ comp->setDataObject("employeeOfTheMonth",emp2);
+
+ XSDHelperPtr xmd = HelperProvider::getXSDHelper(mdg);
+ xmd->generateFile(mdg->getTypes(),
+ "b46617.xsd","companyNS");
+
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company");
+ xmh->save(doc,"b46617.xml");
+
+ // now try loading the xml, using the same schema, and see if we get the
+ // same answer
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46617.xml", "companyNS");
+ DataObjectPtr newdob = myXMLDocument->getRootDataObject();
+
+
+ if (strcmp(newdob->getDataObject("employeeOfTheMonth")->getCString("name"),
+ "Bridget Jones"))
+ {
+ if (!silent)cout << "Employee of the month name has changed" << endl;
+ return 0;
+ }
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "b46617 failed" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::b46617b()
+{
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("b46617b.xsd");
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46617b.xml", "companyNS");
+ DataObjectPtr newdob = myXMLDocument->getRootDataObject();
+
+ if (strcmp(newdob->getDataObject("employeeOfTheMonth")->getCString("name"),
+ "Fred Smith"))
+ {
+ if (!silent)cout << "Employee of the month name has changed" << endl;
+ return 0;
+ }
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "b46617b failed" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::notfound()
+{
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ try {
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("not_present.xsd");
+ }
+ catch (SDOFileNotFoundException e)
+ {
+ //cout << "NotFound threw correct exception " << endl;
+ }
+
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "NOTFOUND THREW THE WRONG EXCEPTION" << e << endl;
+ return 0;
+ }
+
+ try {
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("not-present.xml", "companyNS");
+
+ }
+ catch (SDOFileNotFoundException ee)
+ {
+ //cout << "NotFound threw the correct exception" << endl;
+ }
+
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "NOTFOUND THREW THE WRONG EXCEPTION" << e << endl;
+ return 0;
+ }
+ return 1;
+}
+
+int sdotest::csload()
+{
+ try
+ {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("company.xsd");
+
+ //cout << "TYPES LOADED FROM COMPANY XSD" << endl;
+
+ //TypeList tl = mdg->getTypes();
+ //for (int i=0;i< tl.size(); i++)
+ //{
+ // cout << tl[i].getURI() << ":" << tl[i].getName() << endl;
+ //}
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("cssave-output.xml", "companyNS");
+ //myXMLDocument->setRootElementName("company");
+ //myXMLHelper->save(myXMLDocument,"csload-output.xml");
+ myXMLHelper->save(myXMLDocument->getRootDataObject(),
+ 0, "company", "csload-output.xml");
+
+ return comparefiles("csload-output.xml","csload-output.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "CSLOAD FAILED" << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::testsubsload()
+{
+ try
+ {
+ FILE *f = fopen("testsubsload.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open testsubsload.dat" << endl;
+ return 0;
+ }
+
+ fprintf(f,"TEST: TestSubsLoad ==========================================\n");
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("companysubs.xsd");
+
+ //cout << "TYPES LOADED FROM COMPANYSUBS XSD" << endl;
+
+ //TypeList tl = mdg->getTypes();
+ //for (int i=0;i< tl.size(); i++)
+ //{
+ // cout << tl[i].getURI() << ":" << tl[i].getName() << endl;
+ //}
+
+ // so now we should be able to put book or a magazine into
+ // the publication under company...
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& book = mdg->getType("companyNS","BookType");
+ const Type& mag = mdg->getType("companyNS","MagazineType");
+ const Type& pub = mdg->getType("companyNS","PublicationType");
+
+
+ // create a graph, then save it
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","Puflet Publishing");
+
+
+ DataObjectPtr book1 = mdg->create(book);
+ book1->setCString("author","Mr P B Writer");
+ // inherted from publication
+ book1->setCString("title","Nowhere Man");
+
+ DataObjectPtr mag1 = mdg->create(mag);
+ mag1->setCString("editor","Mr B Picky");
+ // inherited from publication
+ mag1->setCString("title","Bionicle Weekly");
+
+ DataObjectPtr pub1 = mdg->create(pub);
+ pub1->setCString("title","Noddy In Toyland");
+
+
+ // publication should accept any of them...
+
+ comp->setDataObject("Publication",pub1);
+ const Type& tpub1 = comp->getDataObject("Publication")->getType();
+ fprintf(f,"Publication is of type %s\n",tpub1.getName());
+
+ comp->setDataObject("Publication",book1);
+ const Type& tpub2 = comp->getDataObject("Publication")->getType();
+ fprintf(f,"Publication is of type %s\n",tpub2.getName());
+
+ comp->setDataObject("Publication",mag1);
+ const Type& tpub3 = comp->getDataObject("Publication")->getType();
+ fprintf(f,"Publication is of type %s\n",tpub3.getName());
+
+ // should be able to address publication as book or magazine
+
+ comp->setDataObject("Book",book1);
+ const Type& tpub4 = comp->getDataObject("Book")->getType();
+ fprintf(f, "Book is of type %s\n",tpub4.getName());
+
+ comp->setDataObject("Magazine",mag1);
+ const Type& tpub5 = comp->getDataObject("Magazine")->getType();
+ fprintf(f,"Magazine is of type %s\n",tpub5.getName());
+ fprintf(f,"END TEST: TestSubsLoad ======================================\n");
+ fclose(f);
+ return comparefiles("testsubsload.dat","testsubsload.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "ERROR in TeseSubsLoad" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::testSCA()
+{
+ try
+ {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("sca.xsd");
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "ERROR in TeseSCA" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::testabstract()
+{
+ try
+ {
+
+ FILE *f = fopen("testabstract.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open testabstract.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("companyabs.xsd");
+
+ //cout << "TYPES LOADED FROM COMPANYABS XSD" << endl;
+
+ //TypeList tl = mdg->getTypes();
+ //for (int i=0;i< tl.size(); i++)
+ //{
+ // cout << tl[i].getURI() << ":" << tl[i].getName() << endl;
+ //}
+
+ // so now we should be able to put book or a magazine into
+ // the publication under company...
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& book = mdg->getType("companyNS","BookType");
+ const Type& mag = mdg->getType("companyNS","MagazineType");
+ const Type& pub = mdg->getType("companyNS","PublicationType");
+
+
+ // create a graph, then save it
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","Puflet Publishing");
+
+ // should be allowed...
+ DataObjectPtr book1 = mdg->create(book);
+ book1->setCString("author","Mr P B Writer");
+ // inherted from publication
+ book1->setCString("title","Nowhere Man");
+
+ DataObjectPtr mag1 = mdg->create(mag);
+ mag1->setCString("editor","Mr B Picky");
+ // inherited from publication
+ mag1->setCString("title","Bionicle Weekly");
+
+ try {
+ DataObjectPtr pub1 = mdg->create(pub);
+ pub1->setCString("title","Noddy In Toyland");
+ }
+ catch (SDOUnsupportedOperationException e)
+ {
+ fprintf(f,"Normal unsupportedoperation for creation of abstract type\n");
+ }
+
+
+ // publication should accept books and magazines...
+
+ comp->setDataObject("Publication",book1);
+ const Type& tpub2 = comp->getDataObject("Publication")->getType();
+ fprintf(f,"Publication is of type %s\n",tpub2.getName());
+
+ comp->setDataObject("Publication",mag1);
+ const Type& tpub3 = comp->getDataObject("Publication")->getType();
+ fprintf(f,"Publication is of type %s\n",tpub3.getName());
+
+ // should be able to address publication as book or magazine
+
+ comp->setDataObject("Book",book1);
+ const Type& tpub4 = comp->getDataObject("Book")->getType();
+ fprintf(f,"Book is of type %s\n",tpub4.getName());
+
+ comp->setDataObject("Magazine",mag1);
+ const Type& tpub5 = comp->getDataObject("Magazine")->getType();
+ fprintf(f,"Magazine is of type %s\n",tpub5.getName());
+
+ fclose(f);
+ return comparefiles("testabstract.dat","testabstract.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "ERROR in TestAbstract" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::testOpen()
+{
+ try
+ {
+
+ FILE *f = fopen("testopen.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open testopen.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+
+ mdg->addType("companyNS","CompanyType");
+ // employee will be an open type...
+ mdg->addType("companyNS","EmployeeType", /*seq*/false,
+ /*open*/true,
+ /*abs */ false,
+ /*data*/ false);
+
+ mdg->addType("companyNS","DepartmentType");
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& tdept = mdg->getType("companyNS","DepartmentType");
+ const Type& temp = mdg->getType("companyNS","EmployeeType");
+
+
+ mdg->addPropertyToType(tcomp,"name",tstring);
+ // not containment...
+ mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false);
+ mdg->addPropertyToType(tcomp,"departments",tdept, true);
+ mdg->addPropertyToType(tcomp,"cs",tcs);
+
+ mdg->addPropertyToType(tdept,"name",tstring);
+ mdg->addPropertyToType(tdept,"location",tstring);
+ mdg->addPropertyToType(tdept,"number",tstring);
+ mdg->addPropertyToType(tdept,"employees",temp,true);
+
+ mdg->addPropertyToType(temp, "name",tstring);
+ mdg->addPropertyToType(temp, "SN", tstring);
+ mdg->addPropertyToType(temp, "manager", tbool);
+
+
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","ACME");
+
+ DataObjectPtr dept = mdg->create((Type&)tdept);
+ DataObjectList& dol = comp->getList("departments");
+ dol.append(dept);
+
+ dept->setCString("name","Advanced Technologies");
+ dept->setCString("location","NY");
+ dept->setCString("number","123");
+
+ DataObjectPtr emp1 = mdg->create(temp);
+ DataObjectPtr emp2 = mdg->create(temp);
+ DataObjectPtr emp3 = mdg->create(temp);
+
+ emp1->setCString("name","Albert");
+ emp1->setCString("SN","E0001");
+
+ emp2->setCString("name","Boris");
+ emp2->setCString("SN","E0002");
+ emp2->setBoolean("manager",true);
+
+ emp3->setCString("name","Carl");
+ emp3->setCString("SN","E0003");
+
+ // now we should be able to add extra properties to employees,
+ // and get them back again...
+
+ try {
+ emp1->setNull("openstring");
+ return 0;
+ }
+ catch (SDOUnsupportedOperationException e)
+ {
+ fprintf(f,"Normal exception for setting null on undefined prop\n");
+ }
+
+ emp1->setCString("openstring","Value Of Open String");
+ emp1->setBoolean("openboolean",true);
+
+ const char* c = emp1->getCString("openstring");
+
+ fprintf(f,"Open Type string value: %s\n",c);
+
+ bool b = emp1->getBoolean("openboolean");
+
+ fprintf(f,"Open Type boolean value: %d\n", b);
+
+ // unknown list type at present..
+ DataObjectList& dl = emp1->getList("opentypelist");
+
+ unsigned int i = 45;
+ dl.append((short)i); // now the list must be primitive
+
+ // we should now have instance properties
+ PropertyList pl = emp1->getType().getProperties();
+
+ for (i=0;i<pl.size();i++)
+ {
+ fprintf(f,"EMP1 type property: %s ( many? %d) of type %s\n" ,pl[i].getName()
+ , pl[i].isMany(),
+ pl[i].getType().getName());
+ }
+
+ PropertyList pli = emp1->getInstanceProperties();
+
+ for (i=0;i<pli.size();i++)
+ {
+ fprintf(f, "EMP1 inst property: %s (many? %d) of type %s\n",
+ pli[i].getName(), pli[i].isMany(), pli[i].getType().getName());
+ }
+
+
+ // now we try to set the string to null..
+
+ emp1->setNull("openstring");
+
+ emp1->setCString("openstring","New Value Of Open String");
+
+
+ // now unset them and see them disappear - what happens to the indices?
+
+ emp1->unset("openstring");
+
+ PropertyList plk = emp1->getInstanceProperties();
+
+ for (i=0;i<plk.size();i++)
+ {
+ fprintf(f,"EMP1 inst property: %s (many? %d) of type %s\n",
+ plk[i].getName(), plk[i].isMany(), plk[i].getType().getName());
+ }
+
+ emp1->unset("openboolean");
+
+ dl.remove(0); // so is this list gone, or empty - I vote for still there.
+
+ PropertyList pll = emp1->getInstanceProperties();
+ for (i=0;i<pll.size();i++)
+ {
+ fprintf(f,"EMP1 inst property: %s (many? %d) of type %s\n",
+ pll[i].getName(), pll[i].isMany(),pll[i].getType().getName());
+ }
+
+ emp1->unset("opentypelist");
+
+ // now I vote for gone...
+
+ PropertyList plm = emp1->getInstanceProperties();
+ for (i=0;i<plm.size();i++)
+ {
+ fprintf(f,"EMP1 inst property: %s (many? %d) of type %s\n", plm[i].getName()
+ , plm[i].isMany() , plm[i].getType().getName());
+ }
+
+ fclose(f);
+ return comparefiles("testopen.dat","testopen.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "ERROR in TestOpen" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::saveOpen()
+{
+ try
+ {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+
+ mdg->addType("companyNS","CompanyType");
+ // employee will be an open type...
+ mdg->addType("companyNS","EmployeeType", /*seq*/false,
+ /*open*/true,
+ /*abs */ false,
+ /*data*/ false);
+
+ mdg->addType("companyNS","DepartmentType");
+
+ mdg->addType("companyNS","OpenType");
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& tdept = mdg->getType("companyNS","DepartmentType");
+ const Type& temp = mdg->getType("companyNS","EmployeeType");
+ const Type& topen = mdg->getType("companyNS","OpenType");
+
+
+ mdg->addPropertyToType(tcomp,"name",tstring);
+ // not containment...
+ mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false);
+ mdg->addPropertyToType(tcomp,"departments",tdept, true);
+ mdg->addPropertyToType(tcomp,"cs",tcs);
+
+ mdg->addPropertyToType(tdept,"name",tstring);
+ mdg->addPropertyToType(tdept,"location",tstring);
+ mdg->addPropertyToType(tdept,"number",tstring);
+ mdg->addPropertyToType(tdept,"employees",temp,true);
+
+ mdg->addPropertyToType(temp, "name",tstring);
+ mdg->addPropertyToType(temp, "SN", tstring);
+ mdg->addPropertyToType(temp, "manager", tbool);
+
+ mdg->setAlias("companyNS","CompanyType","TheFirm");
+ mdg->setAlias("companyNS","CompanyType","departments","TheDepartments");
+ mdg->setAlias("companyNS","CompanyType","departments","MYDepartments");
+ mdg->setAlias("companyNS","CompanyType","TheBigFirm");
+
+ mdg->addPropertyToType(topen,"name",tstring);
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","ACME");
+
+ DataObjectPtr dept = mdg->create((Type&)tdept);
+ DataObjectList& dol = comp->getList("departments");
+ dol.append(dept);
+
+ ChangeSummaryPtr cs = comp->getChangeSummary();
+
+ cs->beginLogging();
+
+ dept->setCString("name","Advanced Technologies");
+ dept->setCString("location","NY");
+ dept->setCString("number","123");
+
+ DataObjectList& emps = dept->getList("employees");
+
+ DataObjectPtr emp1 = mdg->create(temp);
+ DataObjectPtr emp2 = mdg->create(temp);
+ DataObjectPtr emp3 = mdg->create(temp);
+
+ emps.append(emp1);
+ emps.append(emp2);
+ emps.append(emp3);
+
+ emp1->setCString("name","Albert");
+ emp1->setCString("SN","E0001");
+
+ emp2->setCString("name","Boris");
+ emp2->setCString("SN","E0002");
+ emp2->setBoolean("manager",true);
+
+ emp3->setCString("name","Carl");
+ emp3->setCString("SN","E0003");
+
+ // now we should be able to add extra properties to employees,
+ // and get them back again...
+
+
+ emp1->setCString("openstring","Value Of Open String");
+ emp1->setBoolean("openboolean",true);
+
+ const char* c = emp1->getCString("openstring");
+
+ //cout << "Open Type string value: " << c << endl;
+
+ bool b = emp1->getBoolean("openboolean");
+
+ //cout << "Open Type boolean value: " << b << endl;
+
+ // unknown list type at present..
+ DataObjectList& dl = emp1->getList("openintlist");
+
+ int i = 45;
+ dl.append((short)i); // now the list must be primitive and short!!
+
+ // unknown list type at present..
+ DataObjectList& dl2 = emp1->getList("opendataobjectlist");
+
+ DataObjectPtr myopen = mdg->create("companyNS","OpenType");
+ myopen->setCString("name","MyOpenName");
+ dl2.append(myopen); // now the list must be of data objects
+
+
+ // now a single valued data object - should have an xsi:type
+ emp1->setDataObject("opendataobject", myopen);
+
+
+ cs->endLogging();
+
+ //dumpchangesummary(cs);
+
+ XSDHelperPtr xdh = HelperProvider::getXSDHelper(mdg);
+
+ xdh->generateFile(mdg->getTypes(),
+ "saveopen-output.xsd","companyNS");
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company");
+ xmh->save(doc,"saveopen-output.xml");
+
+ return comparefiles("saveopen-output.xml","saveopen-output.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "ERROR in SaveOpen" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::loadOpen()
+{
+ try
+ {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("saveopen-output.xsd");
+
+
+ //cout << "TYPES LOADED FROM COMPANY XSD" << endl;
+ //int i;
+ //TypeList tl = mdg->getTypes();
+ //for (i=0;i< tl.size(); i++)
+ //{
+ // cout << tl[i].getURI() << ":" << tl[i].getName() << endl;
+ //}
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+
+
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("partial.xml", "companyNS");
+
+
+
+ // so, we now expect that the openboolean and openstring props will
+ // be of type boolean and String, and the openlist will be a list of integers.
+ // The dataobjectlist an dataobject will be of the correct OpenType
+
+ // we need a test for data objects, and that we are writing out xsi:type
+ // correctly.
+ DataObjectPtr comp = myXMLDocument->getRootDataObject();
+ DataObjectList& dl = comp->getList("departments");
+ DataObjectPtr dept = dl[0];
+ DataObjectList& dl2 = dept->getList("employees");
+ DataObjectPtr emp = dl2[0];
+
+ if (strcmp(emp->getProperty("openboolean").getType().getName(),
+ "Boolean"))
+ {
+ if (!silent)cout << "OpenLoad failure - bool property not boolean" << endl;
+ return 0;
+
+ }
+ if (emp->getBoolean("openboolean") != true)
+ {
+ if (!silent)cout << "OpenLoad failure - bool property not true" << endl;
+ return 0;
+ }
+
+ if (strcmp(emp->getProperty("openstring").getType().getName(),
+ "String"))
+ {
+ if (!silent)cout << "OpenLoad failure - bytes property not String" << endl;
+ return 0;
+
+ }
+ if (strcmp(emp->getCString("openstring"),"Value Of Open String"))
+ {
+ if (!silent)cout << "OpenLoad failure - string value is" <<
+ emp->getCString("openstring") << endl;
+ return 0;
+ }
+
+
+ DataObjectList& dl3 = emp->getList("openintlist");
+
+ if (strcmp(emp->getProperty("openintlist").getType().getName(),
+ "Short"))
+ {
+ if (!silent)cout << "OpenLoad failure - IntegerList not Short " <<
+ emp->getProperty("openintlist").getType().getName() << endl;
+ return 0;
+ }
+
+ if (dl3.getInteger(0) != 45)
+ {
+ if (!silent)cout << "OpenLoad failure - Integer value is" <<
+ dl.getInteger(0) << endl;
+ return 0;
+ }
+
+ if (strcmp(emp->getProperty("opendataobjectlist").getType().getName(),
+ "OpenType"))
+ {
+ if (!silent)cout << "OpenLoad failure - OpenTypeList not OpenType" << endl;
+ return 0;
+ }
+
+ DataObjectList& dl4 = emp->getList("opendataobjectlist");
+
+ if (strcmp(dl4[0]->getCString("name"),"MyOpenName"))
+ {
+ if (!silent)cout << "OpenLoad failure - list element name is " <<
+ dl4[0]->getCString("name") << endl;
+ return 0;
+ }
+
+ if (strcmp(emp->getProperty("opendataobject").getType().getName(),
+ "OpenType"))
+ {
+ if (!silent)cout << "OpenLoad failure - OpenType not OpenType" << endl;
+ return 0;
+ }
+
+ DataObjectPtr dob2 = emp->getDataObject("opendataobject");
+
+ if (strcmp(dob2->getCString("name"),"MyOpenName"))
+ {
+ if (!silent)cout << "OpenLoad failure - open value name is " <<
+ dob2->getCString("name") << endl;
+ return 0;
+ }
+
+
+ myXMLHelper->save(myXMLDocument->getRootDataObject(),
+ 0, "company", "loadload-output.xml");
+ return comparefiles("loadload-output.xml","loadload-output.txt");
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "LoadOpen FAILED" << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::loadOpenNS()
+{
+ try
+ {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("openloadNS.xsd");
+ xsh->defineFile("openloadNS2.xsd");
+
+
+ //cout << "TYPES LOADED FROM COMPANY XSD" << endl;
+ //int i;
+ //TypeList tl = mdg->getTypes();
+ //for (i=0;i< tl.size(); i++)
+ //{
+ // cout << tl[i].getURI() << ":" << tl[i].getName() << endl;
+ //}
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+
+
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("openloadNS.xml", "companyNS");
+
+
+
+ // so, we now expect that the openboolean and openstring props will
+ // be of type boolean and Bytes, and the openlist will be a list of integers.
+ // The dataobjectlist an dataobject will be of the correct OpenType
+
+ // we need a test for data objects, and that we are writing out xsi:type
+ // correctly.
+ DataObjectPtr comp = myXMLDocument->getRootDataObject();
+ DataObjectList& dl = comp->getList("departments");
+ DataObjectPtr dept = dl[0];
+ DataObjectList& dl2 = dept->getList("employees");
+ DataObjectPtr emp = dl2[0];
+
+ if (strcmp(emp->getProperty("openboolean").getType().getName(),
+ "Boolean"))
+ {
+ if (!silent)cout << "OpenLoadNS failure - bool property not boolean" << endl;
+ return 0;
+
+ }
+ if (emp->getBoolean("openboolean") != true)
+ {
+ if (!silent)cout << "OpenLoadNS failure - bool property not true" << endl;
+ return 0;
+ }
+
+ if (strcmp(emp->getProperty("openstring").getType().getName(),
+ "Bytes"))
+ {
+ if (!silent)cout << "OpenLoadNS failure - bytes property not bytes" << endl;
+ return 0;
+
+ }
+ if (strcmp(emp->getCString("openstring"),"Value Of Open String"))
+ {
+ if (!silent)cout << "OpenLoadNS failure - string value is" <<
+ emp->getCString("openstring") << endl;
+ return 0;
+ }
+
+
+ DataObjectList& dl3 = emp->getList("openintlist");
+
+ if (strcmp(emp->getProperty("openintlist").getType().getName(),
+ "Short"))
+ {
+ if (!silent)cout << "OpenLoadNS failure - IntegerList not Short " <<
+ emp->getProperty("openintlist").getType().getName() << endl;
+ return 0;
+ }
+
+ if (dl3.getInteger(0) != 45)
+ {
+ if (!silent)cout << "OpenLoadNS failure - Integer value is" <<
+ dl.getInteger(0) << endl;
+ return 0;
+ }
+
+
+
+ myXMLHelper->save(myXMLDocument->getRootDataObject(),
+ 0, "company", "openloadNSout.xml");
+
+ if (!comparefiles("openloadNSout.xml","openloadNSout.txt"))return 0;
+
+
+ // now try exactly the same, but with NS which doesnt exist
+ XMLDocumentPtr myXMLDocument2 = myXMLHelper->loadFile("openloadNS2.xml", "companyNS");
+
+
+
+ // so, we now expect that the openboolean and openstring props will
+ // be of type boolean and String, and the openlist will be a list of integers.
+ // The dataobjectlist an dataobject will be of the correct OpenType
+
+ // we need a test for data objects, and that we are writing out xsi:type
+ // correctly.
+ DataObjectPtr comp2 = myXMLDocument2->getRootDataObject();
+ DataObjectList& dld = comp2->getList("departments");
+ DataObjectPtr dept2 = dld[0];
+ DataObjectList& dl22 = dept2->getList("employees");
+ DataObjectPtr emp2 = dl22[0];
+
+ if (strcmp(emp2->getProperty("openboolean").getType().getName(),
+ "String"))
+ {
+ if (!silent)cout << "OpenLoadNS2 failure - bool property not String" << endl;
+ return 0;
+
+ }
+ if (emp2->getBoolean("openboolean") != true)
+ {
+ if (!silent)cout << "OpenLoadNS2 failure - bool property not true" << endl;
+ return 0;
+ }
+
+ if (strcmp(emp2->getProperty("openstring").getType().getName(),
+ "String"))
+ {
+ if (!silent)cout << "OpenLoadNS2 failure - bytes property not String" << endl;
+ return 0;
+
+ }
+ if (strcmp(emp2->getCString("openstring"),"Value Of Open String"))
+ {
+ if (!silent)cout << "OpenLoadNS failure - string value is" <<
+ emp2->getCString("openstring") << endl;
+ return 0;
+ }
+
+
+ DataObjectList& dl32 = emp2->getList("openintlist");
+
+ if (strcmp(emp2->getProperty("openintlist").getType().getName(),
+ "OpenDataObject"))
+ {
+ if (!silent)cout << "OpenLoadNS2 failure - IntegerList not OpenDataObject " <<
+ emp2->getProperty("openintlist").getType().getName() << endl;
+ return 0;
+ }
+
+ if (atoi(dl32.getDataObject(0)->getSequence()->getCStringValue(0)) != 45)
+ {
+ if (!silent)cout << "OpenLoadNS2 failure - Integer value is" <<
+ dl32.getInteger(0) << endl;
+ return 0;
+ }
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "LoadOpenNS FAILED" << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::loadManyOpen()
+{
+ try
+ {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("many.xsd");
+
+
+ //cout << "TYPES LOADED FROM COMPANY XSD" << endl;
+ //int i;
+ //TypeList tl = mdg->getTypes();
+ //for (i=0;i< tl.size(); i++)
+ //{
+ // cout << tl[i].getURI() << ":" << tl[i].getName() << endl;
+ //}
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+
+
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("many.xml", "companyNS");
+
+
+
+ // so, we now expect that the openboolean and openstring props will
+ // be of type boolean and Bytes, and the openlist will be a list of integers.
+ // The dataobjectlist an dataobject will be of the correct OpenType
+
+ // we need a test for data objects, and that we are writing out xsi:type
+ // correctly.
+ DataObjectPtr comp = myXMLDocument->getRootDataObject();
+ DataObjectList& dl = comp->getList("departments");
+ DataObjectPtr dept = dl[0];
+ DataObjectList& dl2 = dept->getList("employees");
+ DataObjectPtr emp = dl2[0];
+
+
+ DataObjectList& dl3 = emp->getList("openlist");
+
+ // change to match spec - now an open data object
+ // the list should contain a single data object with a sequence of three text elements
+
+ if (strcmp(emp->getProperty("openlist").getType().getName(),
+ "OpenDataObject"))
+ {
+ if (!silent)cout << "OpenManyLoad failure - BytesList not OpenDataObject " <<
+ emp->getProperty("openlist").getType().getName() << endl;
+ return 0;
+ }
+
+ if (dl3.size() != 3)
+ {
+ if (!silent)cout << "OpenManyLoad failure - size is " <<
+ dl3.size() << endl;
+ return 0;
+ }
+
+ SequencePtr sq = dl3[0]->getSequence();
+ if (strcmp(sq->getCStringValue(0),"Three member")) return 0;
+
+ SequencePtr sq2 = dl3[1]->getSequence();
+ if (strcmp(sq2->getCStringValue(0),"Open bytes")) return 0;
+
+ SequencePtr sq3 = dl3[2]->getSequence();
+ if (strcmp(sq3->getCStringValue(0),"List is complete")) return 0;
+
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "LoadOpen FAILED" << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::csload2()
+{
+ //cout << "TEST: CSLoad2 ===============================================" << endl;
+ try
+ {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("company.xsd");
+
+ //cout << "TYPES LOADED FROM COMPANY XSD" << endl;
+
+ //TypeList tl = mdg->getTypes();
+ //for (int i=0;i< tl.size(); i++)
+ //{
+ // cout << tl[i].getURI() << ":" << tl[i].getName() << endl;
+ //}
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("cssave2-output.xml", "companyNS");
+ myXMLHelper->save(myXMLDocument->getRootDataObject(),
+ 0, "company", "csload2-output.xml");
+
+ if (!comparefiles("csload2-output.xml","csload2-output.txt")) return 0;
+
+ XMLDocumentPtr myXMLDocument2 = myXMLHelper->loadFile("csload2-output.xml", "companyNS");
+ myXMLHelper->save(myXMLDocument2->getRootDataObject(),
+ 0, "company", "csload3-output.xml");
+
+ return comparefiles("csload3-output.xml","csload3-output.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "ERROR in CsLoad2" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::bug1()
+{
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ try {
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("bugs/1/company.xsd");
+
+ //TypeList tl = mdg->getTypes();
+ //for (int i=0;i< tl.size(); i++)
+ //{
+ // cout << tl[i].getURI() << ":" << tl[i].getName() << endl;
+ //}
+
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("bugs/1/company.xml",
+ "http://www.mycompanyinc.com");
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "ERROR in Bug1" << e << endl;
+ return 0;
+ }
+ return 1;
+}
+
+int sdotest::setnull()
+{
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("NullNS","NullMainType");
+ mdg->addType("NullNS","NullSubType");
+
+ /* Now add the properties to the types...*/
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tint = mdg->getType("commonj.sdo","Integer");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tmain = mdg->getType("NullNS","NullMainType");
+ const Type& tsub = mdg->getType("NullNS","NullSubType");
+
+
+ mdg->addPropertyToType(tmain,"name",tstring);
+ mdg->addPropertyToType(tmain,"subs",tsub, true); // many
+ mdg->addPropertyToType(tmain,"asub",tsub, false); // single
+ mdg->addPropertyToType(tmain,"bsub",tsub, false); // single
+
+ mdg->addPropertyToType(tmain,"cs",tcs); // change summary
+
+ mdg->addPropertyToType(tsub,"name",tstring);
+ mdg->addPropertyToType(tsub,"number",tint);
+ mdg->addPropertyToType(tsub,"bool",tbool);
+
+
+ // create a graph, then save it
+
+ DataObjectPtr main1 = mdg->create((Type&)tmain);
+ main1->setCString("name","MainObject");
+
+ // asub is initially set
+ DataObjectPtr sub0 = main1->createDataObject("asub");
+ // bsub is not set.
+
+ DataObjectPtr sub1 = mdg->create((Type&)tsub);
+ DataObjectPtr sub2 = mdg->create((Type&)tsub);
+ DataObjectPtr sub3 = mdg->create((Type&)tsub);
+
+ DataObjectList& dol = main1->getList("subs");
+
+ dol.append(sub1);
+ dol.append(sub2);
+ dol.append(sub3);
+
+ // sub1 has all values set initially
+
+ sub1->setCString("name","All Initially set");
+ sub1->setInteger("number",100);
+ sub1->setBoolean("bool",false);
+
+ // sub2 has no values set at all
+
+
+ // sub3 has all values set to null
+ sub3->setNull("name");
+ sub3->setNull("number");
+ sub3->setNull("bool");
+
+
+ // report
+
+ if (main1->isNull("asub")) return 0;
+
+ if (!main1->isSet("asub")) return 0;
+
+ if (main1->isNull("bsub")) return 0;
+
+ if (main1->isSet("bsub")) return 0;
+
+// dol0 is set, not null
+
+ if (dol[0]->isNull("name")) return 0;
+
+ if (dol[0]->isNull("number")) return 0;
+
+ if (dol[0]->isNull("bool")) return 0;
+
+ if (!dol[0]->isSet("name")) return 0;
+
+ if (!dol[0]->isSet("number")) return 0;
+
+ if (!dol[0]->isSet("bool")) return 0;
+
+// dol1 is all unset , so no nulls
+
+ if (dol[1]->isNull("name")) return 0;
+
+ if (dol[1]->isNull("number")) return 0;
+
+ if (dol[1]->isNull("bool")) return 0;
+
+ if (dol[1]->isSet("name")) return 0;
+
+ if (dol[1]->isSet("number")) return 0;
+
+ if (dol[1]->isSet("bool")) return 0;
+
+// dol2 is all nulls, so all set
+
+ if (!dol[2]->isNull("name")) return 0;
+
+ if (!dol[2]->isNull("number")) return 0;
+
+ if (!dol[2]->isNull("bool")) return 0;
+
+ if (!dol[2]->isSet("name")) return 0;
+
+ if (!dol[2]->isSet("number")) return 0;
+
+ if (!dol[2]->isSet("bool")) return 0;
+
+ ChangeSummaryPtr cs = main1->getChangeSummary();
+
+ cs->beginLogging();
+
+ main1->setNull("asub");
+ main1->setNull("bsub");
+
+ dol[0]->setNull("name");
+ dol[0]->setNull("number");
+ dol[0]->setNull("bool");
+
+ dol[1]->setNull("bool");
+
+ dol[2]->setCString("name","NewName");
+ dol[2]->setInteger("number",100);
+ dol[2]->setBoolean("bool",true);
+
+
+ cs->endLogging();
+
+ // what would we expect from the change summary?
+
+ //cout << "==============Expected in Change Summary=================" << endl;
+ //cout << "change to main1 - object asub set to null, oldvalue asub (set)" << endl;
+ //cout << "change to main1 - object bsub set to null, oldvalue null (unset)" << endl;
+ //cout << "change to sub1 - name asub set to null, oldvalue \"All Initially Set\" (set)" << endl;
+ //cout << "change to sub1 - number asub set to null, oldvalue 100 (set)" << endl;
+ //cout << "change to sub1 - bool asub set to null, oldvalue false (set)" << endl;
+ //cout << "change to sub2 - bool asub set to null, oldvalue false (unset)" << endl;
+ //cout << "change to sub3 - name asub set to \"NewName\", oldvalue null, set" << endl;
+ //cout << "change to sub3 - number asub set to 100, oldvalue null, set" << endl;
+ //cout << "change to sub3 - bool asub set to true, oldvalue null, set" << endl;
+ //cout << "==============End Expected in Change Summary=============" << endl;
+
+ FILE* f = fopen("setnull.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open setnull.dat" << endl;
+ return 0;
+ }
+
+ dumpchangesummary(f, cs);
+
+ fclose(f);
+
+ if (!comparefiles("setnull.dat","setnull.txt")) return 0;
+
+ // report
+
+ if (!main1->isNull("asub")) return 0;
+
+ if (!main1->isSet("asub")) return 0;
+
+ if (!main1->isNull("bsub")) return 0;
+
+ if (!main1->isSet("bsub")) return 0;
+
+// dol0 is set to null
+
+ if (!dol[0]->isNull("name")) return 0;
+
+ if (!dol[0]->isNull("number")) return 0;
+
+ if (!dol[0]->isNull("bool")) return 0;
+
+ if (!dol[0]->isSet("name")) return 0;
+
+ if (!dol[0]->isSet("number")) return 0;
+
+ if (!dol[0]->isSet("bool")) return 0;
+
+// dol1 is all unset except bool which is null
+
+ if (dol[1]->isNull("name")) return 0;
+
+ if (dol[1]->isNull("number")) return 0;
+
+ if (!dol[1]->isNull("bool")) return 0;
+
+ if (dol[1]->isSet("name")) return 0;
+
+ if (dol[1]->isSet("number")) return 0;
+
+ if (!dol[1]->isSet("bool")) return 0;
+
+// dol2 is all set non-null, so all set
+
+ if (dol[2]->isNull("name")) return 0;
+
+ if (dol[2]->isNull("number")) return 0;
+
+ if (dol[2]->isNull("bool")) return 0;
+
+ if (!dol[2]->isSet("name")) return 0;
+
+ if (!dol[2]->isSet("number")) return 0;
+
+ if (!dol[2]->isSet("bool")) return 0;
+
+
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in setnull" << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::testsubs()
+{
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("companyNS","MainType");
+
+ mdg->addType("companyNS","SubType");
+ mdg->addType("companyNS","SuperType");
+ mdg->addType("companyNS","SubstituteType");
+ mdg->addType("companyNS","UnrelatedType");
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tmain = mdg->getType("companyNS","MainType");
+ const Type& sub = mdg->getType("companyNS","SubType");
+ const Type& super = mdg->getType("companyNS","SuperType");
+ const Type& subst = mdg->getType("companyNS","SubstituteType");
+ const Type& unrel = mdg->getType("companyNS","UnrelatedType");
+
+
+ mdg->addPropertyToType(tmain,"name",tstring);
+ mdg->addPropertyToType(tmain,"sub",super, false);
+ mdg->addPropertyToType(tmain,"subs",super, true);
+
+
+ mdg->setPropertySubstitute(tmain, "sub","wilbur", subst);
+ mdg->setPropertySubstitute(tmain, "subs","wilburs", subst);
+
+ mdg->setBaseType(sub,super);
+
+ //now sub and subs should accept all the three types
+
+ DataObjectPtr main = mdg->create((Type&)tmain);
+ main->setCString("name","SubstituteTest");
+
+ DataObjectList& dol = main->getList("subs");
+
+ DataObjectPtr sub1 = mdg->create(sub);
+ DataObjectPtr super1 = mdg->create(super);
+ DataObjectPtr subst1 = mdg->create(subst);
+ DataObjectPtr unrel1 = mdg->create(unrel);
+
+ dol.append(sub1);
+ dol.append(super1);
+ dol.append(subst1);
+ try
+ {
+ dol.append(unrel1);
+ return 0;
+ }
+ catch (SDOInvalidConversionException e)
+ {
+ //cout << "Normal failure to append wrong type" << endl;
+ }
+
+ dol.remove(0);
+ dol.remove(0);
+ dol.remove(0);
+
+ DataObjectList& dol2 = main->getList("wilburs");
+
+ dol2.append(sub1);
+ dol2.append(super1);
+ dol2.append(subst1);
+ try
+ {
+ dol2.append(unrel1);
+ return 0;
+ }
+ catch (SDOInvalidConversionException e)
+ {
+ //cout << "Normal failure to append wrong type" << endl;
+ }
+
+ main->setDataObject("sub",sub1);
+ main->setDataObject("sub",super1);
+ main->setDataObject("sub",subst1);
+
+ main->setDataObject("wilbur",sub1);
+ main->setDataObject("wilbur",super1);
+ main->setDataObject("wilbur",subst1);
+
+ try
+ {
+ main->setDataObject("sub", unrel1);
+ return 0;
+ }
+ catch (SDOInvalidConversionException e)
+ {
+ //cout << "Normal failure to set wrong type" << endl;
+ }
+ return 1;
+ }
+
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Substitute test failed" << endl << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::merle1()
+{
+
+ try {
+
+ // Dynamic setup of the metadata
+
+ FILE *f = fopen("merle1.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open merle1.dat" << endl;
+ return 0;
+ }
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("axis.xsd");
+
+ // or dynamically create, but that would get attributes for the strings, not elements
+ //mdg->addType("axis","ItemSearch",true); // sequenced
+ //mdg->addType("axis","ItemSearchRequest",true); // sequenced
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tsearch = mdg->getType("axis","ItemSearch");
+ const Type& treq = mdg->getType("axis","ItemSearchRequest");
+
+ //mdg->addPropertyToType(tsearch,"SubscriptionId",tstring);
+ //mdg->addPropertyToType(tsearch,"AssociateTag",tstring);
+ //mdg->addPropertyToType(tsearch,"XMLEscaping",tstring);
+ //mdg->addPropertyToType(tsearch,"Validate",tstring);
+ //mdg->addPropertyToType(tsearch,"Shared",treq, false, false, true);
+ //mdg->addPropertyToType(tsearch,"Request",treq, true, false, true);
+
+ //mdg->addPropertyToType(treq,"Keywords",tstring);
+ //mdg->addPropertyToType(treq,"SearchIndex",tstring);
+
+ // dynamic creation of the data
+
+ DataObjectPtr search = mdg->create((Type&)tsearch);
+
+ search->setCString("SubscriptionId","I am the subscription ID string");
+ search->setCString("AssociateTag","I am the associate Tag string");
+ search->setCString("XMLEscaping","I am the XML escaping string");
+ search->setCString("Validate","I am the Validate string");
+
+ DataObjectPtr shared = search->createDataObject("Shared");
+ shared->setCString("Keywords","SharedKeywordsString");
+ shared->setCString("SearchIndex","SearchIndexString");
+
+ DataObjectList& requests = search->getList("Request");
+ DataObjectPtr request1 = mdg->create(treq);
+ requests.append(request1);
+ request1->setCString("Keywords","RequestKeywords");
+ request1->setCString("SearchIndex","RequestSearchIndex");
+
+ // Read the data and put it into XML:
+
+ PropertyList properties = search->getInstanceProperties();
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+
+ for (unsigned int i=0;i<properties.size();i++)
+ {
+ Property& prop = properties[i];
+ switch (prop.getTypeEnum())
+ {
+
+ case Type::StringType:
+ fprintf(f,"<%s>%s</%s>\n",prop.getName(), search->getCString(prop),
+ prop.getName());
+ break;
+
+ case Type::DataObjectType:
+ if (prop.isMany())
+ {
+ // many valued property, such as Requests , so get the list
+ DataObjectList& rq = search->getList(prop);
+ for (unsigned int j=0;j<rq.size();j++)
+ {
+ DataObjectPtr dob = rq[j];
+ if (dob != 0)
+ {
+ XMLDocumentPtr doc = myXMLHelper->createDocument(dob,
+ "axis", prop.getName());
+ doc->setXMLDeclaration(false);
+ char* dobXML = myXMLHelper->save(doc);
+ fprintf(f,"DataObject \"%s\" as XML:\n",prop.getName());
+ fprintf(f,"%s\n", dobXML);
+ } // if dob
+ } // for
+ } // if many
+ else
+ {
+ DataObjectPtr dob = search->getDataObject(prop);
+ if (dob != 0)
+ {
+ XMLDocumentPtr doc = myXMLHelper->createDocument(dob,
+ "axis", prop.getName());
+ doc->setXMLDeclaration(false);
+ char* dobXML = myXMLHelper->save(doc);
+ fprintf(f,"DataObject \"%s\" as XML:\n",prop.getName());
+ fprintf(f, "%s\n", dobXML);
+ } // if
+ } // else
+ break;
+
+ default:
+ break;
+
+ } // switch
+ } // for
+ fclose(f);
+ return comparefiles("merle1.dat","merle1.txt");
+ } // try
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Merle 1 failed" << endl << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::graham3()
+{
+ try {
+
+ // Dynamic setup of the metadata
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("graham3.xsd");
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Graham1 failed " << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::graham1()
+{
+ try {
+
+ // Dynamic setup of the metadata
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("graham1.xsd");
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Graham1 failed " << e << endl;
+ return 0;
+ }
+}
+int sdotest::graham2()
+{
+ try {
+
+ // Dynamic setup of the metadata
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("graham2.xsd");
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Graham2 failed " << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::b46613()
+{
+ try {
+
+ // Dynamic setup of the metadata
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->create("rubbish","MyObject");
+
+ return 0;
+
+ }
+ catch (SDOTypeNotFoundException e)
+ {
+ //cout << "b46613 gave the correct exception" << endl;
+ return 1;
+ }
+}
+
+int sdotest::doctest()
+{
+ try {
+
+ FILE *f = fopen("doctest.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open doctest.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("doctest.xsd");
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("doctest.xml",
+ "companyNS");
+ fprintf(f,"RootURI=%s\n",myXMLDocument->getRootElementURI());
+ fprintf(f,"RootName=%s\n",myXMLDocument->getRootElementName());
+ fclose(f);
+ return comparefiles("doctest.dat","doctest.txt");
+ }
+ catch (SDOTypeNotFoundException e)
+ {
+ if (!silent)cout << "doctest failed" << endl;
+ return 0;
+ }
+
+}
+
+
+int sdotest::b46634()
+{
+ try {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("company_with_nillable_SN.xsd");
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("company_with_nillable_SN.xml",
+ "companyNS");
+
+ DataObjectPtr dob = myXMLDocument->getRootDataObject();
+ DataObjectList& dol = dob->getList("departments");
+ DataObjectPtr dept = dol[0];
+ DataObjectList& dol2 = dept->getList("employees");
+ DataObjectPtr emp = dol2[0];
+
+ if (!emp->isSet("SN"))
+ {
+ if (!silent)cout << "B46634 WRONG - isSet should be true" << endl;
+ return 0;
+ }
+ if (!emp->isNull("SN"))
+ {
+ if (!silent)cout << "B46634 WRONG - isNull should be true" << endl;
+ return 0;
+ }
+
+ // now write out the nill value and check its still nil
+ myXMLHelper->save(myXMLDocument->getRootDataObject(),
+ 0, "company", "b46634_out.xml");
+ return comparefiles("b46634_out.xml","b46634_out.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "b46634 failed" << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::testErrors()
+{
+ try {
+
+ unsigned int i,j;
+
+ FILE *f = fopen("testerrors.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open testerrors.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("error1.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ fprintf(f,"XSD reported some errors:\n");
+ for (j=0;j<i;j++)
+ {
+ const char* m = xsh->getErrorMessage(j);
+ if (m != 0) fprintf(f,"%s\n", m);
+ }
+ }
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("error1.xml",
+ "companyNS");
+
+ if ((i = myXMLHelper->getErrorCount()) > 0)
+ {
+ fprintf(f,"XML reported some errors:\n");
+ for (j=0;j<i;j++)
+ {
+ const char *m = myXMLHelper->getErrorMessage(j);
+ if (m != 0) fprintf(f,"%s\n",m);
+ }
+ }
+
+ fclose(f);
+ return comparefiles("testerrors.dat","testerrors.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "testErrors failed" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::b46734()
+{
+ try {
+
+ unsigned int i,j;
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("http://schemas.xmlsoap.org/wsdl/");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (true)
+ {
+ cout << "WSDL XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+ xsh->defineFile("http://schemas.xmlsoap.org/wsdl/soap/");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (true)
+ {
+ cout << "WSDL SOAP XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char* m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+ xsh->defineFile("http://schemas.xmlsoap.org/wsdl/http/");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (true)
+ {
+ cout << "WSDL HTTP XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char* m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("StockQuoteService.wsdl"
+ );
+
+ if ((i = myXMLHelper->getErrorCount()) > 0)
+ {
+ if (true)
+ {
+ cout << "XML reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char * m = myXMLHelper->getErrorMessage(j);
+ if (m != 0)cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (true)cout << "b46734 failed" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::b46693()
+{
+ try {
+
+ unsigned int i,j;
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("b46693.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "b46693 XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char* m = xsh->getErrorMessage(j);
+ if (m != 0)cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ // XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ // XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46693.xsd"
+ // );
+
+ // if ((i = myXMLHelper->getErrorCount()) > 0)
+ // {
+ // cout << "b46693 reported some errors:" << endl;
+ // for (j=0;j<i;j++)
+ // {
+ // const char* m = myXMLHelper->getErrorMessage(j);
+ // if (m != 0)cout << m;
+ // cout << endl;
+ // }
+ // }
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "b46693 failed" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::clonetest()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("companyNS","CompanyType");
+ mdg->addType("companyNS","DepartmentType");
+ mdg->addType("companyNS","EmployeeType");
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& tdept = mdg->getType("companyNS","DepartmentType");
+ const Type& temp = mdg->getType("companyNS","EmployeeType");
+
+ mdg->addPropertyToType(tcomp,"name",tstring);
+ mdg->addPropertyToType(tcomp,"departments",tdept,true,false,true);
+ mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp,false,false,false);
+ mdg->addPropertyToType(tcomp,"CEO",temp,false,false,true);
+
+ mdg->addPropertyToType(tdept,"employees",temp,true,false,true);
+ mdg->addPropertyToType(tdept,"name",tstring,false,false,true);
+ mdg->addPropertyToType(tdept,"location",tstring,false,false,true);
+ mdg->addPropertyToType(tdept,"number",tstring,false,false,true);
+
+ mdg->addPropertyToType(temp,"name",tstring,false,false,true);
+ mdg->addPropertyToType(temp,"SN",tstring,false,false,true);
+ mdg->addPropertyToType(temp,"manager",tbool,false,false,true);
+
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","The Company");
+
+ DataObjectPtr dept = mdg->create((Type&)tdept);
+
+ DataObjectList& dol = comp->getList("departments");
+ dol.append(dept);
+
+ dept->setCString("name","The Department");
+ dept->setCString("location","Botley");
+ dept->setCString("number","123");
+
+
+ // now clone the data factory, and add more types
+
+ DataFactoryPtr df2 = mdg->clone();
+
+ df2->addType("otherNS","DataSet");
+
+ df2->addPropertyToType("companyNS","DepartmentType","dataset",
+ "otherNS","DataSet", false, false, true);
+
+ const Type& tstring2 = df2->getType("commonj.sdo","String");
+ const Type& tbool2 = df2->getType("commonj.sdo","Boolean");
+ const Type& tcs2 = df2->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp2 = df2->getType("companyNS","CompanyType");
+ const Type& tdept2 = df2->getType("companyNS","DepartmentType");
+ const Type& temp2 = df2->getType("companyNS","EmployeeType");
+
+ DataObjectPtr comp2 = df2->create((Type&)tcomp2);
+ comp->setCString("name","The Company");
+
+ DataObjectPtr dept2 = df2->create((Type&)tdept2);
+
+ DataObjectList& dol2 = comp2->getList("departments");
+ dol2.append(dept2);
+
+ dept2->setCString("name","The Other Department");
+ dept2->setCString("location","Not Botley");
+ dept2->setCString("number","321");
+
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "clone failed " << e << endl;
+ return 0;
+ }
+
+
+}
+
+int sdotest::testUtil()
+{
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+
+ mdg->addType("companyNS","CompanyType");
+ // employee will be an open type...
+ mdg->addType("companyNS","EmployeeType", /*seq*/false,
+ /*open*/true,
+ /*abs */ false,
+ /*data*/ false);
+
+ mdg->addType("companyNS","DepartmentType");
+
+ mdg->addType("companyNS","OpenType");
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& tdept = mdg->getType("companyNS","DepartmentType");
+ const Type& temp = mdg->getType("companyNS","EmployeeType");
+ const Type& topen = mdg->getType("companyNS","OpenType");
+
+
+ mdg->addPropertyToType(tcomp,"name",tstring);
+ // not containment...
+ mdg->addPropertyToType(tcomp,"employeeOfTheMonth",temp, false,false,false);
+ mdg->addPropertyToType(tcomp,"departments",tdept, true);
+ mdg->addPropertyToType(tcomp,"cs",tcs);
+
+ mdg->addPropertyToType(tdept,"name",tstring);
+ mdg->addPropertyToType(tdept,"location",tstring);
+ mdg->addPropertyToType(tdept,"number",tstring);
+ mdg->addPropertyToType(tdept,"employees",temp,true);
+
+ mdg->addPropertyToType(temp, "name",tstring);
+ mdg->addPropertyToType(temp, "SN", tstring);
+ mdg->addPropertyToType(temp, "manager", tbool);
+
+ mdg->addPropertyToType(topen,"name",tstring);
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","ACME");
+
+ DataObjectPtr dept = mdg->create((Type&)tdept);
+ DataObjectList& dol = comp->getList("departments");
+ dol.append(dept);
+
+ dept->setCString("name","Advanced Technologies");
+ dept->setCString("location","NY");
+ dept->setCString("number","123");
+
+ DataObjectList& emps = dept->getList("employees");
+
+ DataObjectPtr emp1 = mdg->create(temp);
+ DataObjectPtr emp2 = mdg->create(temp);
+ DataObjectPtr emp3 = mdg->create(temp);
+
+ emps.append(emp1);
+ emps.append(emp2);
+ emps.append(emp3);
+
+ emp1->setCString("name","Albert");
+ emp1->setCString("SN","E0001");
+
+ emp2->setCString("name","Boris");
+ emp2->setCString("SN","E0002");
+ emp2->setBoolean("manager",true);
+
+ emp3->setCString("name","Carl");
+ emp3->setCString("SN","E0003");
+
+ emp1->setCString("openstring","Value Of Open String");
+ emp1->setBoolean("openboolean",true);
+
+ const char* c = emp1->getCString("openstring");
+
+ bool b = emp1->getBoolean("openboolean");
+
+ // unknown list type at present..
+ DataObjectList& dl = emp1->getList("openintlist");
+
+ int i = 45;
+ dl.append((short)i); // now the list must be primitive and short!!
+
+ // unknown list type at present..
+ DataObjectList& dl2 = emp1->getList("opendataobjectlist");
+
+ DataObjectPtr myopen = mdg->create("companyNS","OpenType");
+ myopen->setCString("name","MyOpenName");
+ dl2.append(myopen); // now the list must be of data objects
+
+ emp1->setDataObject("opendataobject", myopen);
+
+ filebuf fb;
+ fb.open ("testutils.dat",ios::out);
+ ostream os(&fb);
+ SDOUtils::printDataObject(os, comp);
+ fb.close();
+ return comparefiles("testutils.dat","testutils.txt");
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "ERROR in UTILS test" << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::printset(FILE *f, ChangeSummaryPtr cs)
+{
+ ChangedDataObjectList& cdl = cs->getChangedDataObjects();
+
+ // here there should be a creation of Ed, and a change to dept, which has a
+ // bool previously unset, and a int list previuously unset and an employees list
+ // previously unset
+
+ for (unsigned int i=0;i< cdl.size();i++)
+ {
+ if (cs->isModified(cdl[i]))
+ {
+
+ fprintf(f,"A modified of type %s#%s\n",cdl[i]->getType().getURI()
+ ,cdl[i]->getType().getName());
+
+ SettingList& sl = cs->getOldValues(cdl[i]);
+ if (sl.size() == 0)
+ {
+ fprintf(f,"No Settings found\n");
+ }
+ else
+ {
+ for (int j=0;j< sl.size(); j++)
+ {
+ fprintf(f,"Property %s",sl[j].getProperty().getName());
+ // this could be a many-valued property, and could be one which is
+ // a data object or a data type...
+ if (sl[j].getProperty().isMany())
+ {
+ fprintf(f,"[%s]",sl[j].getIndex());
+ }
+ if (!sl[j].isSet())
+ {
+ fprintf(f," was unset before the change\n");
+ }
+ else
+ {
+ fprintf(f," was set before the change !!\n");
+ }
+ }
+ }
+ }
+ }
+ return 1;
+}
+
+
+int sdotest::b46633()
+{
+ try {
+
+ FILE *f = fopen("b46633.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open b46633.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addPropertyToType("myspace","Root","cs",
+ "commonj.sdo","ChangeSummary", false, false, false);
+
+ mdg->addType("myspace","Company");
+ mdg->addType("myspace","Department");
+ mdg->addType("myspace","Manager");
+ mdg->addType("myspace","Employee");
+
+
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","Root","company",
+ "myspace","Company", false, false, true);
+
+ mdg->addPropertyToType("myspace","Company","departments",
+ "myspace","Department", true, false, true);
+
+
+ mdg->addPropertyToType("myspace","Department","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Department","ints",
+ "commonj.sdo","Integer", true, false, false);
+
+
+ mdg->addPropertyToType("myspace","Department","bool",
+ "commonj.sdo","Boolean", false, false, false);
+
+ mdg->addPropertyToType("myspace","Department","manager",
+ "myspace","Manager", false, false, true);
+
+ mdg->addPropertyToType("myspace","Department","employees",
+ "myspace","Employee", true, false, true);
+
+ mdg->addPropertyToType("myspace","Manager","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Employee","name",
+ "commonj.sdo","String", false, false, false);
+
+ const Type& tcc = mdg->getType("myspace","Root");
+
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ ChangeSummaryPtr cs = dor->getChangeSummary();
+
+ DataObjectPtr com = dor->createDataObject("company");
+ com->setCString("name","IBM");
+
+ DataObjectPtr dept = com->createDataObject("departments");
+ dept->setCString("name","JTC");
+
+ // employees initally unset
+
+ cs->beginLogging();
+
+ DataObjectPtr emp = dept->createDataObject("employees");
+ emp->setCString("name","Ed");
+
+
+
+ DataObjectList& dl = dept->getList("ints");
+ dl.append((long)400);
+
+ dept->setBoolean("bool", true);
+
+ printset(f,cs);
+
+ cs->endLogging();
+
+ // unset them all , restart logging, and get the same results
+
+ dept->unset("bool");
+ dept->unset("ints");
+ dept->unset("employees");
+
+ cs->beginLogging();
+
+ DataObjectPtr emp2 = dept->createDataObject("employees");
+ emp2->setCString("name","Ed2");
+
+ dl.append((long)600);
+
+ dept->setBoolean("bool", true);
+
+ printset(f, cs);
+
+ cs->endLogging();
+
+ fclose(f);
+
+ return comparefiles("b46633.dat","b46633.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "b46633 failed " << e << endl;
+ return 0;
+ }
+
+}
+
+
+
+int sdotest::testLoad()
+{
+ try
+ {
+ unsigned int i,j;
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ FILE* f = fopen("company_with_nillable_SN.xsd","r+");
+ char* buffer = new char[4000];
+ j = 0;
+ while ((i = fgetc(f)) != EOF)
+ {
+ buffer[j++] = (char)i;
+ }
+ buffer[j] = 0;
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->define(buffer);
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent) {
+ cout << "XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ FILE* f2 = fopen("company_with_nillable_SN.xml","r+");
+ j = 0;
+ while ((i = fgetc(f2)) != EOF)
+ {
+ buffer[j++] = (char)i;
+ }
+ buffer[j] = 0;
+
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->load(buffer);
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in testDAS " << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::includetest()
+{
+ try
+ {
+ unsigned int i,j;
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("include.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "INCLUDE XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ xsh->defineFile("../test/test/includeother.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "INCLUDE XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in include test" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::detachtest()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+
+ mdg->addType("myspace","Company");
+ mdg->addType("myspace","Department");
+ mdg->addType("myspace","Manager");
+ mdg->addType("myspace","Employee");
+
+
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","Root","company",
+ "myspace","Company", false, false, true);
+
+ mdg->addPropertyToType("myspace","Company","departments",
+ "myspace","Department", true, false, true);
+
+
+ mdg->addPropertyToType("myspace","Department","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","Department","manager",
+ "myspace","Manager", false, false, true);
+
+ mdg->addPropertyToType("myspace","Department","employees",
+ "myspace","Employee", true, false, true);
+
+ mdg->addPropertyToType("myspace","Manager","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Employee","name",
+ "commonj.sdo","String", false, false, false);
+
+ const Type& tcc = mdg->getType("myspace","Root");
+
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ DataObjectPtr com = dor->createDataObject("company");
+ com->setCString("name","IBM");
+
+ DataObjectPtr dept = com->createDataObject("departments");
+
+ dept->setCString("name","JTC");
+
+
+ DataObjectPtr emp = dept->createDataObject("employees");
+ emp->setCString("name","Ed");
+
+ DataObjectPtr emp2 = dept->createDataObject("employees");
+ emp2->setCString("name","Tom");
+
+ DataObjectList& dol = dept->getList("employees");
+
+ DataObjectPtr e = dol[0];
+ e->detach();
+
+ DataObjectPtr cont = emp->getContainer();
+
+ if (cont != 0)
+ {
+ if (!silent)cout << "EMP STILL ATTACHED - problem" << endl;
+ return 0;
+ }
+
+ DataObjectPtr cont2 = dol[0]->getContainer();
+
+ if (cont2 == 0)
+ {
+ if (!silent)cout << "SECOND DETACHED - problem" << endl;
+ return 0;
+ }
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "detach failed " << e << endl;
+ return 0;
+ }
+
+}
+
+
+int sdotest::leak()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+
+
+ mdg->addPropertyToType("myspace","Root","ints",
+ "commonj.sdo","Integer", true, false, false);
+
+
+ const Type& tcc = mdg->getType("myspace","Root");
+
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+
+ if (dor->isSet("ints")) return 0;
+
+ DataObjectList& dl = dor->getList("ints");
+
+ if (dor->isSet("ints")) return 0;
+
+ dl.append((long)400);
+
+ if (!dor->isSet("ints")) return 0;
+
+ dl.remove(0);
+
+ if (dor->isSet("ints")) return 0;
+
+ dl.append((long)400);
+
+ if (!dor->isSet("ints")) return 0;
+
+ dor->unset("ints");
+
+ if (dor->isSet("ints")) return 0;
+
+ dl.append((long)600);
+
+ if (!dor->isSet("ints")) return 0;
+
+ return 1;
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "leak failed " << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::twolists()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+
+ mdg->addPropertyToType("myspace","Root","ints",
+ "commonj.sdo","Integer", true, false, false);
+
+ mdg->addPropertyToType("myspace","Root","ints2",
+ "commonj.sdo","Integer", true, false, false);
+
+
+ const Type& tcc = mdg->getType("myspace","Root");
+
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ DataObjectList& dl2 = dor->getList("ints2");
+ dl2.append((long)400);
+
+
+ DataObjectList& dl = dor->getList("ints");
+ dl.append((long)400);
+ return 1;
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "twolists failed " << e << endl;
+ return 0;
+ }
+
+}
+
+
+int sdotest::graham4()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addType("myspace","ListItem");
+
+
+ mdg->addPropertyToType("myspace","ListItem","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ mdg->addPropertyToType("myspace","Root","ints",
+ "commonj.sdo","Integer", true, false, false);
+
+ mdg->addPropertyToType("myspace","Root","items",
+ "myspace","ListItem", true, false, true);
+
+
+ const Type& tcc = mdg->getType("myspace","Root");
+
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+
+ // first try with no elements in lists
+
+ try {
+ DataObjectPtr pitem = dor->getDataObject("items[name=\"hello\"]");
+ return 0;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+ //cout << "Normal exception in Graham4" << endl;
+ }
+
+ try {
+ int inty = dor->getInteger("ints[1]");
+ return 0;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+ //cout << "Normal exception in Graham4" << endl;
+ }
+
+ // now populate them
+
+ DataObjectPtr myitem = dor->createDataObject("items");
+ myitem->setCString("name","not hello");
+
+ try {
+ DataObjectPtr pitem2 = dor->getDataObject("items[name=\"hello\"]");
+ return 0;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+ //cout << "Normal exception in Graham4" << endl;
+ }
+
+ DataObjectList& dl = dor->getList("ints");
+ dl.append((long)100);
+
+ try {
+ int inty2 = dor->getInteger("ints[2]");
+ return 0;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+ //cout << "Normal exception in Graham4" << endl;
+ }
+
+ try
+ {
+ DataObjectPtr pitem2 = dor->getDataObject("items[name=\"not hello\"]");
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "ABNORMAL exception in Graham4" << endl;
+ return 0;
+ }
+
+ try {
+ int inty2 = dor->getInteger("ints[1]");
+ //cout << "Integer is " << inty2 << endl;
+ return 1;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+
+ if (!silent)cout << "ABNORMAL exception in Graham4" << endl;
+ return 0;
+ }
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "twolists failed " << e << endl;
+ return 0;
+ }
+
+}
+
+
+int sdotest::graham5()
+{
+ try
+ {
+ unsigned int i,j;
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("Order.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "INCLUDE XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+ return 1;
+ }
+ catch (SDORuntimeException r)
+ {
+ if (!silent)cout << "Graham5 failed " << r << endl;
+ return 0;
+ }
+}
+
+int sdotest::graham6()
+{
+ try
+ {
+ unsigned int i,j;
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("g/Order.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "INCLUDE XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr doc = xmh->loadFile("g/order.xml", "orderNS");
+
+ char* str = xmh->save(doc);
+ FILE* f = fopen("g/string-output.xml","w+");
+ if (f != 0)
+ {
+ fputs(str,f);
+ fclose(f);
+ }
+
+ xmh->save(doc,"g/graham6-output.xml");
+
+ // now get the root and try that
+ DataObjectPtr dob = doc->getRootDataObject();
+ char* str2 = xmh->save(dob,"orderNS","order");
+ FILE* f2 = fopen("g/string-output-2.xml","w+");
+ if (f2 != 0)
+ {
+ fputs(str2,f2);
+ fclose(f2);
+ }
+
+ xmh->save(dob,"orderNS","order", "g/graham6-output-2.xml");
+
+ if (!comparefiles("g/string-output.xml","g/string-output.txt"))return 0;
+ if (!comparefiles("g/graham6-output.xml","g/graham6-output.txt")) return 0;
+ if (!comparefiles("g/string-output-2.xml","g/string-output-2.txt")) return 0;
+ return 1;
+
+ }
+ catch (SDORuntimeException r)
+ {
+ if (!silent)cout << "Graham6 failed " << r << endl;
+ return 0;
+ }
+}
+
+int sdotest::b47137()
+{
+
+ try
+ {
+ FILE *f = fopen("b47137.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open b47137.dat" << endl;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("b47137.xsd");
+
+ DataObjectPtr dob = mdg->create("","guid");
+
+ const Type& t = dob->getType();
+
+ PropertyList pl = t.getProperties();
+
+ for (unsigned int i=0;i<pl.size();i++)
+ {
+ fprintf(f,"Property:%s\n", pl[i].getName());
+ }
+
+ dob->setCString("value","Hello");
+ dob->setBoolean("isPermaLink",true);
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ xmh->save(dob,"","fluid","b47137_out.xml");
+
+ // now try to read back the file ..
+
+ XMLDocumentPtr doc = xmh->loadFile("b47137_out.xml", "");
+
+ DataObjectPtr dob2 = doc->getRootDataObject();
+
+ const Type& t2 = dob2->getType();
+
+ PropertyList pl2 = t2.getProperties();
+
+ for (unsigned int j=0;j<pl2.size();j++)
+ {
+ fprintf(f,"Property:%s\n",pl2[j].getName());
+ fprintf(f, "Value:%s\n", dob2->getCString(pl2[j]));
+ }
+
+ fclose(f);
+ return comparefiles("b47137.dat","b47137.txt");
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "B47137 failed " << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::b47137b()
+{
+ unsigned int i,j;
+ try
+ {
+
+ FILE *f = fopen("b47137b.dat","w+");
+ if (f == 0)
+ {
+ if (!silent) cout << "Unable to open b47137b.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("b47137b.xsd");
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "INCLUDE XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ TypeList tl = mdg->getTypes();
+ for (unsigned int k=0;k<tl.size();k++)
+ {
+ fprintf(f,"Type:%s#%s\n",tl[k].getURI(),tl[k].getName());
+ }
+
+ DataObjectPtr dob = mdg->create("companyNS","CompanyType");
+
+ const Type& t = dob->getType();
+
+ PropertyList pl = t.getProperties();
+
+ for (unsigned int i=0;i<pl.size();i++)
+ {
+ fprintf(f, "Property:%s\n",pl[i].getName());
+ }
+
+ DataObjectPtr dobguid = dob->createDataObject("guid");
+
+ dobguid->setCString("value","Wilbur");
+ dobguid->setBoolean("isPermaLink",true);
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ xmh->save(dob,"","company","b47137b_out.xml");
+
+ // now try to read back the file ..
+
+ XMLDocumentPtr doc = xmh->loadFile("b47137b_out.xml", "");
+
+ DataObjectPtr dob2 = doc->getRootDataObject();
+
+ const Type& t2 = dob2->getType();
+
+ PropertyList pl2 = t2.getProperties();
+
+ for (unsigned int j=0;j<pl2.size();j++)
+ {
+
+ fprintf(f,"Property:%s\n",pl2[j].getName());
+ if (!strcmp(pl2[j].getName(),"guid"))
+ {
+ DataObjectPtr dobguid2 = dob2->getDataObject("guid");
+ if (dobguid2 != 0)
+ {
+ fprintf(f,"guid Value:%s\n",dobguid2->getCString("value"));
+ fprintf(f,"guid isPermaLink:",dobguid2->getCString("isPermaLink"));
+ }
+ else
+ {
+ fprintf(f,"GUID is empty\n");
+ }
+ }
+ }
+ fclose(f);
+ return comparefiles("b47137b.dat","b47137b.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "B47137b failed " << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::b47293()
+{
+ unsigned int i,j,k;
+ try
+ {
+ FILE *f = fopen("b47293.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open b47293.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("47293Catalog.xsd");
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "47293 XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ TypeList tl = mdg->getTypes();
+ for ( k=0;k<tl.size();k++)
+ {
+ fprintf(f,"Type:%s#%s",tl[k].getURI(),tl[k].getName());
+ }
+
+ xsh->generateFile(tl,"47293Catalog-out.xsd","catalogNS",0);
+
+ DataFactoryPtr mdg2 = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh2 = HelperProvider::getXSDHelper(mdg2);
+
+ xsh2->defineFile("47293Catalog-out.xsd");
+
+ if ((i = xsh2->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "47293-out XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh2->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ TypeList tl2 = mdg2->getTypes();
+ for (k=0;k<tl2.size();k++)
+ {
+ fprintf(f,"Type:%s#%s\n",tl2[k].getURI(),tl2[k].getName());
+ }
+ fclose(f);
+ return comparefiles("b47293.dat","b47293.txt");
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "B47137b failed " << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::b47802()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addType("myspace","ListItem");
+
+ mdg->addPropertyToType("myspace","Root","ints",
+ "commonj.sdo","Integer", true, false, false);
+
+ mdg->addPropertyToType("myspace","Root","items",
+ "myspace","ListItem", true, false, true);
+
+
+ const Type& tcc = mdg->getType("myspace","Root");
+ const Type& tcl = mdg->getType("myspace","ListItem");
+
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+
+ DataObjectList& dol1 = dor->getList("ints");
+
+ DataObjectList& dol2 = dor->getList("items");
+
+
+ dol1.append((long)34);
+ dol1.append((long)56);
+
+ DataObjectPtr li1 = mdg->create(tcl);
+ DataObjectPtr li2 = mdg->create(tcl);
+
+ dol2.append(li1);
+ dol2.append(li2);
+
+ dor->unset("ints[1]"); // should work
+ dor->unset("items.0"); // should work
+
+ try {
+
+ dor->unset("ints[2]"); // should not work
+ return 0;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+ //cout << "Normal index oor in 47802" << endl;
+ }
+
+ try {
+ dor->unset("items.1"); // should not work
+ return 0;
+ }
+ catch (SDOIndexOutOfRangeException e)
+ {
+ // cout << "Normal index oor in 47802" << endl;
+ }
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Problem in b47802" << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::b47663()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ DataFactoryPtr mdg2 = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+ mdg->addType("myspace","ListItem");
+ mdg->addType("myspace","Item");
+
+ mdg->addPropertyToType("myspace","Root","itemref",
+ "myspace","Item", false, false, false);
+
+ mdg->addPropertyToType("myspace","Root","itemcont",
+ "myspace","Item", false, false, true);
+
+ mdg->addPropertyToType("myspace","Root","items",
+ "myspace","ListItem", true, false, true);
+
+ mdg2->addType("myspace","Root");
+ mdg2->addType("myspace","ListItem");
+ mdg2->addType("myspace","Item");
+
+ mdg2->addPropertyToType("myspace","Root","itemref",
+ "myspace","Item", false, false, false);
+
+ mdg2->addPropertyToType("myspace","Root","itemcont",
+ "myspace","Item", false, false, true);
+
+ mdg2->addPropertyToType("myspace","Root","items",
+ "myspace","ListItem", true, false, true);
+
+
+
+ const Type& tcc = mdg->getType("myspace","Root");
+ const Type& tcl = mdg->getType("myspace","ListItem");
+ const Type& tci = mdg->getType("myspace","Item");
+
+ DataObjectPtr dor = mdg->create((Type&)tcc);
+ DataObjectPtr it1 = mdg->create((Type&)tci);
+ DataObjectList& dol1 = dor->getList("items");
+ DataObjectPtr li11 = mdg->create(tcl);
+ DataObjectPtr li12 = mdg->create(tcl);
+
+
+ const Type& tcc2 = mdg2->getType("myspace","Root");
+ const Type& tcl2 = mdg2->getType("myspace","ListItem");
+ const Type& tci2 = mdg2->getType("myspace","Item");
+ DataObjectPtr dor2 = mdg2->create((Type&)tcc2);
+ DataObjectPtr it2 = mdg2->create((Type&)tci2);
+ DataObjectList& dol2 = dor2->getList("items");
+ DataObjectPtr li21 = mdg2->create(tcl2);
+ DataObjectPtr li22 = mdg2->create(tcl2);
+
+
+ try
+ {
+ // append from wrong factory to list
+ dol1.append(li21);
+ //cout << "ERROR - 47764 should not append from wrong factory" << endl;
+ //cout << "Updated test case: Correctly used data object from compatible factory" <<
+ // endl;
+ }
+ catch (SDOInvalidConversionException e)
+ {
+ if (!silent)cout << "ERROR: Incorrect invalid conversion exception" << e << endl;
+ return 0;
+ }
+
+ try
+ {
+ // add object from wrong factory to reference.
+ dor2->setDataObject("itemref",it1);
+ return 0;
+ }
+ catch (SDOUnsupportedOperationException e)
+ {
+ // expected ,as a reference cannot be outside the graph
+ }
+
+ try
+ {
+ // add object from wrong factory to reference.
+ dor2->setDataObject("itemcont",it1);
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Add contained object from second factory not OK" << endl;
+ return 0;
+ }
+
+
+ dol2.append(li22); // OK
+
+ try
+ {
+ dol2.insert(0,li11);
+ //cout << "Updated test case: Correctly used data object from compatible factory" <<
+ // endl;
+ //cout << "ERROR - 47764 should not insert from wrong factory" << endl;
+ }
+ catch (SDOInvalidConversionException e)
+ {
+ if (!silent)cout << "Incorrect invalid conversion exception" << e << endl;
+ return 0;
+ }
+
+ try
+ {
+ dol2.setDataObject(0,li12);
+ //cout << "Updated test case: Correctly used data object from compatible factory" <<
+ // endl;
+ // cout << "ERROR - 47764 should not set in list from wrong factory" << endl;
+ }
+ catch (SDOInvalidConversionException e)
+ {
+ if (!silent)cout << "Incorrect invalid conversion exception" << e << endl;
+ return 0;
+ }
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Problem in b47663" << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::bunique()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("test","Root");
+ mdg->addType("test","Duplicate");
+ mdg->addType("nottest","Duplicate");
+ mdg->addType("test","Unique");
+ mdg->addType("test","Object");
+
+ mdg->addPropertyToType("test","Root","duplicate",
+ "test","Duplicate", false, false, true);
+
+ mdg->addPropertyToType("test","Root","duplicate2",
+ "nottest","Duplicate", false, false, true);
+
+ mdg->addPropertyToType("test","Root","unique",
+ "test","Unique", false, false, true);
+
+ mdg->addPropertyToType("test","Root","duplicatelist",
+ "test","Duplicate", true, false, true);
+
+ mdg->addPropertyToType("test","Root","duplicatelist2",
+ "nottest","Duplicate", true, false, true);
+
+ mdg->addPropertyToType("test","Root","uniquelist",
+ "test","Unique", true, false, true);
+
+ mdg->addPropertyToType("test","Duplicate","id",
+ "commonj.sdo","Integer", false, false, false);
+
+ mdg->addPropertyToType("nottest","Duplicate","id",
+ "commonj.sdo","Integer", false, false, false);
+
+ mdg->addPropertyToType("test","Unique","id",
+ "commonj.sdo","Integer", false, false, false);
+
+ mdg->addPropertyToType("test","Duplicate","ob",
+ "test","Object", false, false, true);
+
+ mdg->addPropertyToType("nottest","Duplicate","ob",
+ "test","Object", false, false, true);
+
+ mdg->addPropertyToType("test","Unique","ob",
+ "test","Object", false, false, true);
+
+ const Type& troot = mdg->getType("test","Root");
+ const Type& tdup1 = mdg->getType("test","Duplicate");
+ const Type& tdup2 = mdg->getType("nottest","Duplicate");
+ const Type& tuniq = mdg->getType("test","Unique");
+ const Type& tob = mdg->getType("test","Object");
+
+ DataObjectPtr rooty = mdg->create(troot);
+
+ DataObjectPtr dup1 = mdg->create(tdup1);
+ dup1->setInteger("id",1);
+ DataObjectPtr dup2 = mdg->create(tdup1);
+ dup2->setInteger("id",2);
+ DataObjectPtr dup3 = mdg->create(tdup2);
+ dup3->setInteger("id",3);
+ DataObjectPtr dup4 = mdg->create(tdup2);
+ dup4->setInteger("id",4);
+ DataObjectPtr uni1 = mdg->create(tuniq);
+ uni1->setInteger("id",5);
+ DataObjectPtr uni2 = mdg->create(tuniq);
+ uni2->setInteger("id",6);
+
+ DataObjectPtr ob1 = mdg->create(tob);
+ dup1->setDataObject("ob",ob1);
+ DataObjectPtr ob2 = mdg->create(tob);
+ dup2->setDataObject("ob",ob2);
+ DataObjectPtr ob3 = mdg->create(tob);
+ uni1->setDataObject("ob",ob3);
+
+ DataObjectList& dl1 = rooty->getList("duplicatelist");
+ DataObjectList& dl2 = rooty->getList("duplicatelist2");
+ DataObjectList& dl3 = rooty->getList("uniquelist");
+
+ rooty->setDataObject("duplicate",dup1);
+ dl1.append(dup2);
+
+ rooty->setDataObject("duplicate2",dup3);
+ dl2.append(dup4);
+
+ rooty->setDataObject("unique",uni1);
+
+ dl3.append(uni2);
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ TypeList tl = mdg->getTypes();
+
+ xsh->generateFile(tl,"bunique-out.xsd","test");
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ xmh->save(rooty,"","rooty","bunique-out.xml");
+
+ if (!comparefiles("bunique-out.xsd","bunique-out.txt")) return 0;
+ if (!comparefiles("bunique-out.xml","bunique-outxml.txt")) return 0;
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Problem in bunique" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::buniqueread()
+{
+ try {
+
+ unsigned int i,j,k;
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("bunique-out.xsd");
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "47293 XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ return 0;
+ }
+ }
+
+ TypeList tl = mdg->getTypes();
+ for ( k=0;k<tl.size();k++)
+ {
+ //cout << "Type:" << tl[k].getURI() << "#" << tl[k].getName() << endl;
+ }
+
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile("bunique-out.xml", "rooty");
+
+ DataObjectPtr rooty = doc->getRootDataObject();
+
+ xsh->generateFile(tl,"buniqueread-out.xsd","test");
+
+ xmh->save(rooty,"","rooty","buniqueread-out.xml");
+
+ return comparefiles("buniqueread-out.xml","buniqueread-out.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Problem in buniqueread" << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::testwsdl()
+{
+ try {
+
+ unsigned int i,j;
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("wsdl.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "WSDL XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+
+ }
+ return 0;
+ }
+ xsh->defineFile("wsdl-soap.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "WSDL SOAP XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char* m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+
+ }
+ return 0;
+ }
+ xsh->defineFile("wsdl-http.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "WSDL HTTP XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char* m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ TypeList tl = mdg->getTypes();
+
+ for (i=0;i<tl.size();i++)
+ {
+ //cout << "TYPE:" << tl[i].getURI() << "#" << tl[i].getName() << endl;
+ }
+
+ DataObjectPtr root = mdg->create("http://schemas.xmlsoap.org/wsdl/","tDefinitions");
+
+
+ DataObjectPtr mess = mdg->create("http://schemas.xmlsoap.org/wsdl/","tMessage");
+ mess->setCString("name","testRequest");
+
+ DataObjectPtr part = mdg->create("http://schemas.xmlsoap.org/wsdl/","tPart");
+ part->setCString("name","name");
+ part->setCString("type","http://www.w3.org/2001/XMLSchema-instance#string");
+
+ DataObjectPtr part2 = mdg->create("http://schemas.xmlsoap.org/wsdl/","tPart");
+ part2->setCString("name","name");
+ part2->setCString("type","http://I want/this/added/to/the/urls#string");
+
+
+ DataObjectList& dol = root->getList("message");
+
+ dol.append(mess);
+
+ DataObjectList& dol2 = mess->getList("part");
+
+ dol2.append(part);
+ dol2.append(part2);
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ xmh->save(root,"","definitions","testwsdl.xml");
+
+ return comparefiles("testwsdl.xml","testwsdl.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "testwsdl failed" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+
+
+int sdotest::travel()
+{
+ try {
+
+ unsigned int i,j;
+
+ FILE *f = fopen("travel.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open travel.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("TravelBookingSchema.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "WSDL XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ TypeList tl = mdg->getTypes();
+
+ fprintf(f, "*******************************TYPES**********************\n");
+
+ for (i=0;i<tl.size();i++)
+ {
+ fprintf(f,"TYPE:%s#%s\n",tl[i].getURI(),tl[i].getName());
+ }
+ fprintf(f, "*******************************END TYPES******************\n");
+
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile("TravelBookingUsingSchema.xml");
+
+ DataObjectPtr rooty = doc->getRootDataObject();
+
+ fprintf(f, "*******************************DATA**********************\n");
+ printDataObject(f, rooty);
+ fprintf(f,"***************************END DATA**********************\n");
+
+ fclose(f);
+ return comparefiles("travel.dat","travel.txt");
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "travel failed" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+
+int sdotest::oddchars()
+{
+ try {
+
+ unsigned int i,j;
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("OddChars.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "ODDCHARS XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile("OddChars.xml");
+
+ if ((i = xmh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "OddChars reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xmh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ DataObjectPtr rooty = doc->getRootDataObject();
+
+ FILE *f = fopen ("oddchars.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open oddchars.dat" << endl;
+ return 0;
+ }
+ printDataObject(f, rooty);
+
+ fclose(f);
+ return comparefiles("oddchars.dat","oddchars.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "oddchars failed" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::unsetlist()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("test","Root");
+ mdg->addType("test","ListItem");
+
+ mdg->addPropertyToType("test","Root","list",
+ "test","ListItem", true, false, true);
+
+ const Type& troot = mdg->getType("test","Root");
+ const Type& tlist = mdg->getType("test","ListItem");
+
+ DataObjectPtr rooty = mdg->create(troot);
+
+ DataObjectList& dl = rooty->getList("list");
+
+
+ DataObjectPtr li1 = mdg->create(tlist);
+ DataObjectPtr li2 = mdg->create(tlist);
+ DataObjectPtr li3 = mdg->create(tlist);
+
+
+ dl.append(li1);
+ dl.append(li2);
+ dl.append(li3);
+
+ rooty->unset("list[3]");
+
+ dl.append(li3);
+
+ rooty->unset("list.2");
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Problem in unsetlist" << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::notns()
+{
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+
+ mdg->addType("","Root");
+ mdg->addType("","ListItem");
+
+ mdg->addPropertyToType("","Root","list",
+ "","ListItem", true, false, true);
+
+ const Type& troot = mdg->getType("","Root");
+ const Type& tlist = mdg->getType("","ListItem");
+
+ DataObjectPtr rooty = mdg->create(troot);
+
+ DataObjectList& dl = rooty->getList("list");
+
+
+ DataObjectPtr li1 = mdg->create(tlist);
+ DataObjectPtr li2 = mdg->create(tlist);
+ DataObjectPtr li3 = mdg->create(tlist);
+
+
+ dl.append(li1);
+ dl.append(li2);
+ dl.append(li3);
+
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ xmh->save(rooty,"","root","notns.xml");
+
+ return comparefiles("notns.xml","notns.txt");
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "notns" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::badelement()
+{
+ try {
+
+ unsigned int i,j;
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("BadElement.xsd");
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "PROBLEM: BADELEMENT XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile("BadElement.xml");
+
+ if ((i = xmh->getErrorCount()) > 0)
+ {
+ FILE *f = fopen("badelement.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open badelement.dat" << endl;
+ return 0;
+ }
+ fprintf(f,"BADELEMENT correctly found errors:\n");
+ for (j=0;j<i;j++)
+ {
+ const char *m = xmh->getErrorMessage(j);
+ if (m != 0) fprintf(f,"%s\n", m);
+ }
+ fclose (f);
+ return comparefiles("badelement.dat","badelement.txt");
+ }
+ else
+ {
+ if (!silent)cout << "Expected errors, got none" << endl;
+ return 0;
+ }
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "badelement" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+
+int sdotest::testastyle(FILE *f, const char* style)
+{
+
+ unsigned int i,j;
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile(style);
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "PROBLEM: TESTSTYLES XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ TypeList tl = mdg->getTypes();
+
+ fprintf(f,"*****STYLE %s\n",style);
+
+ for (i=0;i<tl.size();i++)
+ {
+ fprintf(f,"Type: %s#%s\n", tl[i].getURI(),tl[i].getName());
+ if (!strcmp(tl[i].getName(),"library"))
+ {
+ PropertyList pl = tl[i].getProperties();
+ for (unsigned int j=0;j<pl.size();j++)
+ {
+ fprintf(f,"Property:%s\n",pl[j].getName());
+ }
+ }
+ }
+
+ fprintf(f, "*************\n");
+
+ // now try creating elements...
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->createDocument(); // with no name, URI - uses first in schema
+
+ DataObjectPtr root = doc->getRootDataObject();
+
+ fprintf(f,"Root is:%s#%s\n",root->getType().getURI(),
+ root->getType().getName());
+
+
+ XMLDocumentPtr doc1 = xmh->createDocument("library"); // with no URI - uses first in schema
+
+ DataObjectPtr root1 = doc1->getRootDataObject();
+
+ fprintf(f,"Root is:%s#%s\n",root1->getType().getURI(),
+ root1->getType().getName());
+
+ XMLDocumentPtr doc2 = xmh->createDocument("library","libraryNS"); // with URI
+
+ DataObjectPtr root2 = doc2->getRootDataObject();
+
+ fprintf(f, "Root is:%s#%s\n",root2->getType().getURI(),
+ root2->getType().getName());
+ return 1;
+
+
+}
+
+int sdotest::teststyles()
+{
+ try
+ {
+
+ FILE *f = fopen("teststyles.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open teststyles.dat" << endl;
+ return 0;
+ }
+ testastyle(f,"Style1.xsd");
+ testastyle(f,"Style2.xsd");
+ testastyle(f,"Style3.xsd");
+ //testastyle("Style4.xsd"); = groups not supported yet.
+ fclose(f);
+ return comparefiles("teststyles.dat","teststyles.txt");
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "teststyles" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+
+int sdotest::testinc2(const char* inc, const char* name1, const char* name2)
+{
+
+
+ unsigned int i,j;
+
+ try {
+
+ FILE *f = fopen(name1,"w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open " << name1 << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile(inc);
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "PROBLEM: TestInc2 XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ TypeList tl = mdg->getTypes();
+
+ //cout << "***** CALCULATOR ***************************************" << endl;
+
+ for (i=0;i<tl.size();i++)
+ {
+ fprintf(f, "Type:%s#%s\n", tl[i].getURI(),tl[i].getName());
+ PropertyList pl = tl[i].getProperties();
+ for (unsigned int j=0;j<pl.size();j++)
+ {
+ fprintf(f,"Property:%s\n",pl[j].getName());
+ }
+ }
+
+ //cout << "*******************************END TYPES******************" << endl;
+ fclose(f);
+ return comparefiles((char*)name1, (char*)name2);
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in testinc2" << endl;
+ return 0;
+ }
+
+}
+
+
+
+int sdotest::b48300()
+{
+ return testany("bug48300.xsd",0,"bug48300.xml",0);
+}
+
+
+int sdotest::testOrder(const char* x1, const char* x2, const char* name1,
+ const char* name2)
+{
+
+ unsigned int i,j;
+
+ try {
+
+ FILE *f = fopen(name1,"w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open " << name1 << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile(x1);
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "PROBLEM: Order XSD1 reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ fclose(f);
+ return 0;
+ }
+
+ xsh->defineFile(x2);
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "PROBLEM: Order XSD2 reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ fclose(f);
+ return 0;
+ }
+
+ TypeList tl = mdg->getTypes();
+
+ //cout << "***** TESTORDER ****************************************" << endl;
+
+ for (i=0;i<tl.size();i++)
+ {
+ if (!strcmp(tl[i].getURI(),"commonj.sdo")) continue;
+ fprintf(f,"Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
+ PropertyList pl = tl[i].getProperties();
+ for (unsigned int j=0;j<pl.size();j++)
+ {
+ fprintf(f,"Property:%s\n", pl[j].getName());
+ }
+ }
+
+ //cout << "*******************************END TYPES******************" << endl;
+
+ fclose(f);
+ return comparefiles((char*)name1, (char*)name2);
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in TestOrder" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::simple()
+{
+
+
+ unsigned int i,j;
+
+ try {
+
+ FILE *f = fopen("simple.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open simple.dat" << endl;
+ return 0;
+ }
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("simple.xsd");
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "PROBLEM: Order simple.xsd reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+
+ TypeList tl = mdg->getTypes();
+
+ //cout << "***** SIMPLE ****************************************" << endl;
+
+ for (i=0;i<tl.size();i++)
+ {
+ if (!strcmp(tl[i].getURI(),"commonj.sdo")) continue;
+ fprintf(f, "Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
+ PropertyList pl = tl[i].getProperties();
+ for (unsigned int j=0;j<pl.size();j++)
+ {
+ fprintf(f,"Property:%s\n",pl[j].getName());
+ fprintf(f, "Type of property:%s\n",pl[j].getType().getName());
+ fprintf(f, "IsMany?%d\n",pl[j].isMany());
+ }
+ }
+
+ //cout << "*******************************SIMPLE******************" << endl;
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile("simple.xml");
+
+ if ((i = xmh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "Simple found errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xmh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+
+ DataObjectPtr dob = doc->getRootDataObject();
+
+ printDataObject(f, dob);
+
+ fclose(f);
+ return comparefiles("simple.dat","simple.txt");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in TestAny" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::cdatatest()
+{
+ try
+ {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ /**
+ * Get an XSD helper to load XSD information into the
+ * data factory
+ */
+ XSDHelperPtr myXSDHelper = HelperProvider::getXSDHelper(mdg);
+ myXSDHelper->defineFile("cdata.xsd");
+
+ /**
+ * Check if there were any errors. The parse may still
+ * succeed, but errors indicate some elements were not
+ * understood
+ */
+ unsigned int i = 0;
+ unsigned int j = 0;
+ if ((i = myXSDHelper->getErrorCount()) > 0)
+ {
+ cout << "XSD Loading reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = myXSDHelper->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ return 0;
+ }
+ }
+
+ /**
+ * Use the same data factory to load XML corresponding to
+ * data objects adhering to the previously loaded schema
+ */
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("cdata-in.xml", "http://www.example.org/test");
+
+ /**
+ * Check if there were any errors. The parse may still
+ * succeed, but errors indicate some elements did not match
+ * the schema, or were malformed.
+ *
+ */
+ if ((i = myXMLHelper->getErrorCount()) > 0)
+ {
+ cout << "XML Loading reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = myXMLHelper->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ return 0;
+ }
+ }
+
+ // write the XML element back out to a file
+ myXMLHelper->save(myXMLDocument, "cdata-testout.xml");
+
+ return comparefiles("cdata-out.xml","cdata-testout.xml");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in cdata test" << endl;
+ cout << e.getMessageText();
+ return 0;
+ }
+}
+
+int sdotest::cloneopentest()
+{
+ try
+ {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ /**
+ * Get an XSD helper to load XSD information into the
+ * data factory
+ */
+ XSDHelperPtr myXSDHelper = HelperProvider::getXSDHelper(mdg);
+ myXSDHelper->defineFile("clone.xsd");
+
+ /**
+ * Check if there were any errors. The parse may still
+ * succeed, but errors indicate some elements were not
+ * understood
+ */
+ unsigned int i = 0;
+ unsigned int j = 0;
+ if ((i = myXSDHelper->getErrorCount()) > 0)
+ {
+ cout << "XSD Loading reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = myXSDHelper->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ return 0;
+ }
+ }
+
+ /**
+ * Use the same data factory to load XML corresponding to
+ * data objects adhering to the previously loaded schema
+ */
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("clone-in.xml", "http://www.example.org/test");
+
+ /**
+ * Check if there were any errors. The parse may still
+ * succeed, but errors indicate some elements did not match
+ * the schema, or were malformed.
+ *
+ */
+ if ((i = myXMLHelper->getErrorCount()) > 0)
+ {
+ cout << "XML Loading reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = myXMLHelper->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ return 0;
+ }
+ }
+
+ DataObjectPtr original = myXMLDocument->getRootDataObject();
+
+ // copy the data object we just read in
+ DataObjectPtr clone = CopyHelper::copy(original);
+
+ // create a new document based on this cloned data object
+ XMLDocumentPtr myNewXMLDocument = myXMLHelper->createDocument(clone,
+ "http://www.example.org/test",
+ "Clone");
+
+ // write the cloned document out to a file
+ myXMLHelper->save(myNewXMLDocument, "clone-testout.xml");
+
+#if defined(WIN32) || defined (_WINDOWS)
+
+ return comparefiles("clone-out-win.xml","clone-testout.xml");
+#else
+ return comparefiles("clone-out.xml","clone-testout.xml");
+#endif
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in clone test" << endl;
+ cout << e.getMessageText();
+ return 0;
+ }
+}
+
+int sdotest::elementFormDefaultQualified()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("StockQuoteService.wsdl");
+
+ DataObjectPtr doObj = mdg->create("http://swanandmokashi.com",
+ "GetQuotes");
+
+ doObj->setCString("QuoteTicker", "IBM");
+ XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(mdg);
+
+
+ XMLDocumentPtr doc =
+ xmlHelper->createDocument(doObj,
+ "http://swanandmokashi.com",
+ "GetQuotes");
+
+ xmlHelper->save(doc, "qualified-testout.xml");
+
+ return comparefiles("qualified.xml", "qualified-testout.xml");
+ }
+ catch (SDORuntimeException e) {
+ cout << "sdotest::elementFormDefaultQualified() failed" << endl << e << endl;
+ return 0;
+ }
+ return 0;
+}
+
+
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.h b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.h
new file mode 100644
index 0000000000..fb6c80906a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest.h
@@ -0,0 +1,219 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include "commonj/sdo/SDO.h"
+using namespace commonj::sdo;
+
+
+// test
+
+class sdotest {
+ public:
+
+ static bool silent;
+ static bool ramping;
+
+ /* utilities */
+
+ static int printseq(FILE *f, SequencePtr sptr);
+ static void printDataStructure(FILE *f,DataFactory* dd);
+ static void printDataObject(FILE *f, DataObjectPtr dol);
+ static void printValue(FILE *f, DataObjectPtr dob, const Property& prop);
+ static void printList(FILE *f, DataObjectPtr dob, const Property& prop);
+ static void printOldValues(FILE *f, ChangeSummaryPtr cs, DataObjectPtr dob);
+ static void dumpchangesummary(FILE *f, ChangeSummaryPtr cs);
+ static int comparefiles(char* fn1, char*fn2);
+ static int dumpproperties(FILE *f, DataObjectPtr root);
+ static int printset(FILE *f, ChangeSummaryPtr cs);
+ static void populateFactory(DataFactoryPtr dfp);
+
+
+ static int xsdtosdo();
+
+ static void changeSummaryHeader(ChangeSummaryPtr cs);
+ static void changeSummaryFooter();
+ static void changeSummaryChange(int level, ChangeSummaryPtr cs, DataObjectPtr dob);
+ static void changeSummaryDeletedObject(int indent, const char* name, ChangeSummaryPtr cs, DataObjectPtr dob);
+ static void changeSummaryElements(int indent, ChangeSummaryPtr cs, DataObjectPtr dob);
+ static void changeSummarySetting(Setting& s);
+ static bool changeSummaryAttributes(ChangeSummaryPtr cs, DataObjectPtr dol);
+ static char* convert(const char* uri);
+
+ /* work in progress - generation of structures */
+
+ static void generate(DataFactoryPtr fac);
+
+ /* tests */
+ static int xhtml1();
+ static int definetest();
+ static int stocktest();
+
+ static int scopetest();
+ static DataObjectPtr scopetest2();
+
+
+ static int pete();
+ static int testgenerate(const char* xsd, const char* output);
+ static int emptycs();
+ static int compatiblefactory();
+ static int transferto(DataObjectPtr d, DataFactoryPtr f, bool expecterror);
+ static int openseq();
+ static int testanytwo(const char* xsd,
+ const char* xsd2, const char* xml);
+ static int testany(const char* xsd,
+ const char* acceptedxsderror,
+ const char* xml,
+ const char* acceptedxmlerror);
+ static int testOrder(const char* x1, const char* x2,
+ const char* name1, const char* name2);
+ static int simple();
+ static int testinc2(const char* inc, const char* name1,
+ const char* name2);
+ static int testastyle(FILE *f, const char* style);
+ static int teststyles();
+ static int badelement();
+ static int oddchars();
+ static int notns();
+ static int unsetlist();
+ static int travel();
+ static int testwsdl();
+ static int bunique();
+ static int buniqueread();
+ static int propdefaulttest();
+ static int showdefault(FILE *f, const Type& tm);
+ static int graham6();
+ static int graham5();
+ static int graham4();
+ static int leak();
+ static int twolists();
+ static int detachtest();
+ static int includetest();
+ static int testLoad();
+ static int clonetest();
+ static int testUtil();
+ static int testErrors();
+ static int doctest();
+ static int notfound();
+ static int serializeChangeSummary(ChangeSummaryPtr cs);
+ static int cssave();
+ static int csload();
+ static int cssave2();
+ static int csload2();
+ static int bug1();
+ static int bug2();
+ static int setnull();
+ static int testsubsload();
+ static int testabstract();
+ static int testsubs();
+ static int testSCA();
+ static int testOpen();
+ static int saveOpen();
+ static int loadOpen();
+ static int testui();
+ static int merle1();
+ static int graham1();
+ static int graham2();
+ static int graham3();
+ static int loadManyOpen();
+ static int loadOpenNS();
+
+
+ static int eqhelpertest();
+ static int cohelpertest();
+ static int datetest();
+ static int matttest1();
+ static int adddeletetest();
+ static int carotest3();
+ static int carotest2();
+ static int carotest();
+ static int setmany();
+ static int noncontest();
+ static int versiontest();
+ static int defaulttest();
+ static int defaulttest_strobj();
+ static int querytest();
+ static int getproptest();
+ static int nulltest();
+ static int usertest();
+ static int rcptest();
+ static int boolbug();
+ static int scope1();
+ static int scope2();
+ static int scope3();
+ static int conversiontest();
+ static int changesummarytest();
+ static int scenario1();
+ static int scenario2();
+ static int scenario3();
+ static int scenario4();
+ static int scenario5();
+ static int seqtest();
+ static int printDataObject(DataObjectPtr dol);
+ static int printValue(DataObjectPtr dob, const Property& prop);
+ static int printList(DataObjectPtr dob, const Property& prop);
+ static int printOldValues(ChangeSummaryPtr cs, DataObjectPtr dob);
+ static int testGetters(DataObjectPtr dor);
+ static int testGetter(DataObjectPtr dor, char* str);
+ static int maintest();
+ static int jira490();
+ static int jira705();
+ static int jira546();
+ static int jira945();
+ static int jira980();
+
+
+ static int b48602();
+ static int b48736();
+ static int b48686();
+ static int b48601();
+ static int b48300();
+ static int b47663();
+ static int b47764();
+ static int b47802();
+ static int b47293();
+ static int b47137();
+ static int b47137b();
+ static int b46633();
+ static int b46734();
+ static int b46693();
+ static int b46634();
+ static int b46613();
+ static int b46617();
+ static int b46617b();
+ static int b45933();
+ static int testXPath();
+ static int cdatatest();
+ static int cloneopentest();
+ static int tuscany963();
+ static int tuscany562();
+ static int upandatom();
+ static int typedefinitionstest();
+ static int eBayTest();
+ static int jira1174();
+ static int jira1238();
+ static int loadWithoutSchema();
+ static int jira445();
+ static int jira1112();
+ static int elementFormDefaultQualified();
+ static int elementFormDefaultQualifiedSequence();
+ static int xsiTypeAbstract();
+ static int nullExtendedPrimitive();
+};
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest2.cpp b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest2.cpp
new file mode 100644
index 0000000000..da70dac0f6
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sdotest2.cpp
@@ -0,0 +1,2064 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include <stdio.h>
+
+#pragma warning(disable:4786)
+
+#include <iostream>
+#include <fstream>
+using namespace std;
+
+
+
+#include "sdotest.h"
+
+
+
+using namespace commonj::sdo;
+
+DataObjectPtr sdotest::scopetest2()
+{
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Root");
+
+ mdg->addType("myspace","Company");
+
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","id",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Root","company",
+ "myspace","Company", false, false, true);
+
+ const Type& tcc = mdg->getType("myspace","Root");
+
+ DataObjectPtr dop = mdg->create((Type&)tcc);
+
+ DataObjectPtr co = dop->createDataObject("company");
+
+ return dop;
+}
+
+int sdotest::scopetest()
+{
+ DataObjectPtr dob;
+ dob = scopetest2();
+
+ // fails on close?
+ return 1;
+}
+
+int sdotest::xsdtosdo()
+{
+const char* value;
+
+value = SDOUtils::XSDToSDO("string");
+if (!silent)cout << "XSDToSDO(string)=" << value << endl;
+if (strcmp(value,"String")) return 0;
+
+value = SDOUtils::XSDToSDO("int");
+if (!silent)cout << "XSDToSDO(int)="<< value << endl;
+if (strcmp(value,"Integer")) return 0;
+
+value = SDOUtils::XSDToSDO("notinlist");
+if (!silent)cout << "XSDToSDO(notinlist)="<< value << endl;
+if (strcmp(value,"String")) return 0;
+
+value = SDOUtils::XSDToSDO("");
+if (!silent)cout << "XSDToSDO(\"\")="<< value << endl;
+if (strcmp(value,"String")) return 0;
+
+value = SDOUtils::XSDToSDO(0);
+if (!silent)cout << "XSDToSDO(0)="<< value << endl;
+if (strcmp(value,"String")) return 0;
+
+value = SDOUtils::SDOToXSD("String");
+if (!silent)cout << "SDOToXSD(String)="<< value << endl;
+if (strcmp(value,"string")) return 0;
+
+value = SDOUtils::SDOToXSD("Long");
+if (!silent)cout << "SDOToXSD(Long)="<< value << endl;
+if (strcmp(value,"unsignedLong")) return 0;
+
+value = SDOUtils::SDOToXSD("notinlist");
+if (!silent)cout << "SDOToXSD(notinlist)="<< value << endl;
+if (strcmp(value,"string")) return 0;
+
+value = SDOUtils::SDOToXSD("");
+if (!silent)cout << "SDOToXSD(\"\")="<< value << endl;
+if (strcmp(value,"string")) return 0;
+
+value = SDOUtils::SDOToXSD(0);
+if (!silent)cout << "SDOToXSD(0)="<< value << endl;
+if (strcmp(value,"string")) return 0;
+
+return 1;
+
+}
+
+// The compatibleFactory() test creates a series of factories that are either
+// identical or very similar so we need a function that populates a data
+// factory with the common part.
+
+void sdotest::populateFactory(DataFactoryPtr dfp)
+{
+
+ dfp->addType("Namespace", "Project");
+ dfp->addType("Namespace", "WorkPackage");
+ dfp->addType("Namespace", "LineItem");
+ dfp->addType("Namespace", "StringHolder");
+
+ dfp->addType("Namespace", "Root");
+ dfp->addPropertyToType("Namespace","Root","project",
+ "Namespace","Project", false, false, true);
+ dfp->addPropertyToType("Namespace","Project","wp",
+ "Namespace","WorkPackage", false, false, false);
+
+ dfp->addPropertyToType("Namespace","StringHolder","value",
+ "commonj.sdo","String", false, false, false);
+
+ dfp->addPropertyToType("Namespace","StringHolder","proj",
+ "Namespace","Project", false, false, false);
+
+ dfp->addPropertyToType("Namespace","Project","id",
+ "commonj.sdo","String", false, false, false);
+
+ dfp->addPropertyToType("Namespace","Project","string",
+ "Namespace","StringHolder", false, false, true);
+
+ dfp->addPropertyToType("Namespace","WorkPackage","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ dfp->addPropertyToType("Namespace","WorkPackage","string",
+ "Namespace","StringHolder", false, false, true);
+
+ dfp->addPropertyToType("Namespace","LineItem","itemname",
+ "commonj.sdo","String", false, false, false);
+
+ dfp->addPropertyToType("Namespace","LineItem","string",
+ "Namespace","StringHolder", false, false, true);
+
+ dfp->addPropertyToType("Namespace","Project","packages",
+ "Namespace","WorkPackage", true, false, true);
+
+ dfp->addPropertyToType("Namespace","WorkPackage","lineitems",
+ "Namespace","LineItem", true, false, true);
+
+}
+
+int sdotest::compatiblefactory()
+{
+ DataFactoryPtr f1 = DataFactory::getDataFactory();
+ populateFactory(f1);
+
+ // project
+ // id (string)
+ // string (StringHolder)
+ // workpackages (WorkPackage)
+
+ // workpackage
+ // name (string)
+ // string (StringHolder)
+ // lineitems (LineItem)
+
+ // lineitem
+ // itemname (string)
+
+
+ // factories 1 and 2 are compatible
+
+ DataFactoryPtr f2 = DataFactory::getDataFactory();
+ populateFactory(f2);
+
+ // factory 3 has no project type
+
+ DataFactoryPtr f3 = DataFactory::getDataFactory();
+
+ f3->addType("Namespace","WorkPackage");
+ f3->addType("Namespace","LineItem");
+ f3->addType("Namespace","StringHolder");
+
+ f3->addType("Namespace","Root");
+ f3->addPropertyToType("Namespace","Root","project",
+ "Namespace","WorkPackage", false, false, true);
+
+
+ f3->addPropertyToType("Namespace","StringHolder","value",
+ "commonj.sdo","String", false, false, false);
+
+ f3->addPropertyToType("Namespace","WorkPackage","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ f3->addPropertyToType("Namespace","WorkPackage","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f3->addPropertyToType("Namespace","LineItem","itemname",
+ "commonj.sdo","String", false, false, false);
+
+ f3->addPropertyToType("Namespace","LineItem","string",
+ "Namespace","StringHolder", false, false, true);
+
+
+ f3->addPropertyToType("Namespace","WorkPackage","lineitems",
+ "Namespace","LineItem", true, false, true);
+
+
+ // factory 4 looks compatible - but stringholder is missing
+
+ DataFactoryPtr f4 = DataFactory::getDataFactory();
+
+ f4->addType("Namespace","Project");
+ f4->addType("Namespace","WorkPackage");
+ f4->addType("Namespace","LineItem");
+
+ f4->addType("Namespace","Root");
+ f4->addPropertyToType("Namespace","Root","project",
+ "Namespace","Project", false, false, true);
+
+
+ f4->addPropertyToType("Namespace","Project","id",
+ "commonj.sdo","String", false, false, false);
+
+
+ f4->addPropertyToType("Namespace","WorkPackage","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ f4->addPropertyToType("Namespace","LineItem","itemname",
+ "commonj.sdo","String", false, false, false);
+
+ f4->addPropertyToType("Namespace","Project","packages",
+ "Namespace","WorkPackage", true, false, true);
+
+ f4->addPropertyToType("Namespace","WorkPackage","lineitems",
+ "Namespace","LineItem", true, false, true);
+
+
+ // factory 5 looks compatible, but the lists are not lists
+
+ DataFactoryPtr f5 = DataFactory::getDataFactory();
+
+ f5->addType("Namespace","Project");
+ f5->addType("Namespace","WorkPackage");
+ f5->addType("Namespace","LineItem");
+ f5->addType("Namespace","StringHolder");
+
+ f5->addType("Namespace","Root");
+ f5->addPropertyToType("Namespace","Root","project",
+ "Namespace","Project", false, false, true);
+
+
+ f5->addPropertyToType("Namespace","StringHolder","value",
+ "commonj.sdo","String", false, false, false);
+
+ f5->addPropertyToType("Namespace","Project","id",
+ "commonj.sdo","String", false, false, false);
+
+ f5->addPropertyToType("Namespace","Project","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f5->addPropertyToType("Namespace","WorkPackage","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ f5->addPropertyToType("Namespace","WorkPackage","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f5->addPropertyToType("Namespace","LineItem","itemname",
+ "commonj.sdo","String", false, false, false);
+
+ f5->addPropertyToType("Namespace","LineItem","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f5->addPropertyToType("Namespace","Project","packages",
+ "Namespace","WorkPackage", false, false, true);
+
+ f5->addPropertyToType("Namespace","WorkPackage","lineitems",
+ "Namespace","LineItem", false, false, true);
+
+ // factory 6 looks OK, but the lineitems have no itemname field
+
+ DataFactoryPtr f6 = DataFactory::getDataFactory();
+
+ f6->addType("Namespace","Project");
+ f6->addType("Namespace","WorkPackage");
+ f6->addType("Namespace","LineItem");
+ f6->addType("Namespace","StringHolder");
+
+ f6->addType("Namespace","Root");
+ f6->addPropertyToType("Namespace","Root","project",
+ "Namespace","Project", false, false, true);
+
+
+ f6->addPropertyToType("Namespace","StringHolder","value",
+ "commonj.sdo","String", false, false, false);
+
+ f6->addPropertyToType("Namespace","Project","id",
+ "commonj.sdo","String", false, false, false);
+
+ f6->addPropertyToType("Namespace","Project","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f6->addPropertyToType("Namespace","WorkPackage","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ f6->addPropertyToType("Namespace","WorkPackage","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f6->addPropertyToType("Namespace","LineItem","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f6->addPropertyToType("Namespace","Project","packages",
+ "Namespace","WorkPackage", true, false, true);
+
+ f6->addPropertyToType("Namespace","WorkPackage","lineitems",
+ "Namespace","LineItem", true, false, true);
+
+
+ // factory 7 looks OK, but the identifiers are ints
+
+
+ DataFactoryPtr f7 = DataFactory::getDataFactory();
+
+ f7->addType("Namespace","Project");
+ f7->addType("Namespace","WorkPackage");
+ f7->addType("Namespace","LineItem");
+ f7->addType("Namespace","StringHolder");
+
+ f7->addType("Namespace","Root");
+ f7->addPropertyToType("Namespace","Root","project",
+ "Namespace","Project", false, false, true);
+
+ f7->addPropertyToType("Namespace","StringHolder","value",
+ "commonj.sdo","String", false, false, true);
+
+ f7->addPropertyToType("Namespace","Project","id",
+ "commonj.sdo","Integer", false, false, false);
+
+ f7->addPropertyToType("Namespace","Project","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f7->addPropertyToType("Namespace","WorkPackage","name",
+ "commonj.sdo","String", false, false, false);
+
+
+ f7->addPropertyToType("Namespace","WorkPackage","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f7->addPropertyToType("Namespace","LineItem","itemname",
+ "commonj.sdo","Integer", false, false, false);
+
+ f7->addPropertyToType("Namespace","LineItem","string",
+ "Namespace","StringHolder", false, false, true);
+
+ f7->addPropertyToType("Namespace","Project","packages",
+ "Namespace","WorkPackage", true, false, true);
+
+ f7->addPropertyToType("Namespace","WorkPackage","lineitems",
+ "Namespace","LineItem", true, false, true);
+
+
+ // create a tree from Root in factory 1
+
+ DataObjectPtr root = f1->create("Namespace","Root");
+ DataObjectPtr project = root->createDataObject("project");
+ project->setCString("id","The TTP Project");
+ DataObjectPtr str = project->createDataObject("string");
+ str->setCString("value","The Recursive Acronym Project");
+ DataObjectPtr wp1 = project->createDataObject("packages");
+ DataObjectPtr wp2 = project->createDataObject("packages");
+ wp1->setCString("name","Work Package 1");
+ wp2->setCString("name","Work Package 2");
+ DataObjectPtr li1 = wp1->createDataObject("lineitems");
+ DataObjectPtr li2 = wp1->createDataObject("lineitems");
+ DataObjectPtr li3 = wp2->createDataObject("lineitems");
+ DataObjectPtr li4 = wp2->createDataObject("lineitems");
+ li1->setCString("itemname","LineItem 1");
+ li2->setCString("itemname","LineItem 2");
+ li3->setCString("itemname","LineItem 3");
+ li4->setCString("itemname","LineItem 4");
+ DataObjectPtr str1 = li1->createDataObject("string");
+ DataObjectPtr str2 = li2->createDataObject("string");
+ DataObjectPtr str3 = li3->createDataObject("string");
+ DataObjectPtr str4 = li4->createDataObject("string");
+ str1->setCString("value","String1");
+ str2->setCString("value","String2");
+ str3->setCString("value","String3");
+ str4->setCString("value","String4");
+
+
+// cout << "DATA OBJECTS FROM FACTORY 1" << endl;
+// printDataObject(root);
+
+ if (!transferto(root,f2, false)) return 0;
+ if (!transferto(root,f3, true)) return 0;
+ // Following 4 tests do not now cause an error
+ if (!transferto(root,f4, false)) return 0;
+ if (!transferto(root,f5, false)) return 0;
+ if (!transferto(root,f6, false)) return 0;
+ if (!transferto(root,f7, false)) return 0;
+
+ // finally, lets move one which has a parent and cant be moved.
+
+ try {
+ DataObjectPtr project = root->getDataObject("project");
+
+ DataObjectPtr root2 = f2->create("Namespace","Root");
+
+ root2->setDataObject("project", project);
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ //cout << "Compatibility test correctly returned an error :" ;
+ //cout << e.getMessageText() << endl;
+ return 1;
+ }
+
+}
+
+int sdotest::transferto(DataObjectPtr root, DataFactoryPtr f2, bool expecterror)
+{
+ try {
+
+ // transfer the tree to factory 2...
+ DataObjectPtr rproject = root->getDataObject("project");
+
+ DataObjectPtr project = CopyHelper::copy(rproject);
+
+ DataObjectPtr root2 = f2->create("Namespace","Root");
+
+ root2->setDataObject("project", project);
+
+ //cout << "DATA OBJECTS TRANSFERRED" << endl;
+
+ //printDataObject(root2);
+
+ if (expecterror)
+ {
+ return 0;
+ }
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (expecterror){
+ //cout << "Compatibility test correctly returned an error :" ;
+ //cout << e.getMessageText() << endl;
+ return 1;
+ }
+ else
+ {
+ if (!silent)cout << "Compatibility test failed whilst transferring " << e << endl;
+ return 0;
+ }
+ }
+}
+
+
+int sdotest::b48602()
+{
+
+
+ int i,j;
+
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("b48602.xsd");
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "PROBLEM: b48602 XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+ return 0;
+ }
+ catch (SDOTypeNotFoundException e)
+ {
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ return 1;
+ }
+
+}
+
+int sdotest::testany(const char* xsd,
+ const char* acceptedxsderror,
+ const char* xml,
+ const char* acceptedxmlerror)
+{
+
+
+ unsigned int i,j;
+ int rc;
+
+ try {
+
+ char *c;
+
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ if (xsd)
+ {
+ char * name1 = new char[strlen(xsd)+5];
+ char * name3 = new char[strlen(xsd)+5];
+ strcpy(name1,xsd);
+ while ((c = strchr(name1,'.')) != 0)*c = '_';
+ strcpy(name3,name1);
+ strcat(name1,".dat");
+ strcat(name3,".txt");
+
+
+ FILE *f1 = fopen(name1,"w+");
+ if (f1 == 0)
+ {
+ if (!silent)cout << "Unable to open " << name1 << endl;
+ delete[] name1;
+ delete[] name3;
+ return 0;
+ }
+
+ xsh->defineFile(xsd);
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (acceptedxsderror != 0)
+ {
+ for (j=0;j<i;j++)
+ {
+ if (!strcmp(acceptedxsderror,xsh->getErrorMessage(j)))
+ {
+ fclose(f1);
+ delete[] name1;
+ delete[] name3;
+ return 1;
+ }
+ }
+ }
+ if (!silent)
+ {
+ cout << "PROBLEM: Testany XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ fclose(f1);
+ delete[] name1;
+ delete[] name3;
+ return 0;
+ }
+
+
+ TypeList tl = mdg->getTypes();
+
+ fprintf(f1, "***** TYPES BEFORE RESOLVE **********************************\n");
+
+ for (i=0;i<tl.size();i++)
+ {
+ fprintf(f1,"Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
+ PropertyList pl = tl[i].getProperties();
+ for (unsigned int j=0;j<pl.size();j++)
+ {
+ fprintf(f1,"Property:%s ",pl[j].getName());
+ if (pl[j].isMany())
+ fprintf(f1, "(many) ");
+ fprintf(f1, " of type %s\n",pl[j].getType().getName());
+ }
+ }
+
+ fprintf(f1, "*******************************END TYPES******************\n");
+
+ fclose(f1);
+
+
+ rc = comparefiles(name1,name3);
+
+ delete[] name1;
+ delete[] name3;
+
+ if (rc == 0)return rc;
+
+ }
+
+ if (xml == 0 || strlen(xml) == 0) return 1;
+
+ char * name2 = new char[strlen(xml)+5];
+ char * name4 = new char[strlen(xml)+5];
+ strcpy(name2,xml);
+ while ((c = strchr(name2,'.')) != 0)*c = '_';
+ strcpy(name4,name2);
+
+ strcat(name2,".dat");
+ strcat(name4,".txt");
+
+ FILE *f2 = fopen(name2,"w+");
+ if (f2 == 0)
+ {
+ if (!silent)cout << "Unable to open " << name2 << endl;
+ delete[] name2;
+ delete[] name4;
+ return 0;
+ }
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile(xml);
+
+ if ((i = xmh->getErrorCount()) > 0)
+ {
+ if (acceptedxmlerror != 0)
+ {
+ for (j=0;j<i;j++)
+ {
+ if (!strcmp(acceptedxmlerror,xmh->getErrorMessage(j)))
+ {
+ fclose(f2);
+ delete[] name2;
+ delete[] name4;
+ return 1;
+ }
+ }
+ }
+ if (!silent)
+ {
+ cout << "TestAny XML found errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xmh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ fclose(f2);
+ delete[] name2;
+ delete[] name4;
+ return 0;
+ }
+
+ else {
+ TypeList tl = mdg->getTypes();
+
+ fprintf(f2, "***** TYPES AFTER RESOLVE*********************************\n");
+
+ for (i=0;i<tl.size();i++)
+ {
+ fprintf(f2,"Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
+ PropertyList pl = tl[i].getProperties();
+ for (unsigned int j=0;j<pl.size();j++)
+ {
+ fprintf(f2, "Property:%s ",pl[j].getName());
+ if (pl[j].isMany())
+ fprintf(f2, "(many) ");
+ fprintf(f2, " of type %s\n",pl[j].getType().getName());
+ }
+ }
+
+ fprintf(f2, "*******************************END TYPES******************\n");
+
+
+ DataObjectPtr dob = doc->getRootDataObject();
+ printDataObject(f2, dob);
+
+ fclose(f2);
+
+ rc = comparefiles(name2,name4);
+
+ delete[] name2;
+ delete[] name4;
+
+ return rc;
+ }
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in TestAny" << e << endl;
+ return 0;
+ }
+}
+
+
+
+int sdotest::testanytwo(const char* xsd, const char* xsd2,
+ const char* xml)
+{
+ unsigned int i, j;
+
+ try
+ {
+ char * name1 = new char[strlen(xsd)+5];
+ char * name2 = new char[strlen(xml)+5];
+ char * name3 = new char[strlen(xsd)+5];
+ char * name4 = new char[strlen(xml)+5];
+
+ strcpy(name1,xsd);
+ strcpy(name2,xml);
+
+ char *c;
+
+ while ((c = strchr(name1,'.')) != 0)*c = '_';
+ while ((c = strchr(name2,'.')) != 0)*c = '_';
+
+ strcpy(name3,name1);
+ strcpy(name4,name2);
+
+ strcat(name1,".dat");
+ strcat(name2,".dat");
+ strcat(name3,".txt");
+ strcat(name4,".txt");
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ if (xsd)
+ {
+ xsh->defineFile(xsd);
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "PROBLEM: Testany XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ delete[] name1;
+ delete[] name2;
+ delete[] name3;
+ delete[] name4;
+
+ return 0;
+ }
+
+ }
+
+ if (xsd2)
+ {
+ xsh->defineFile(xsd2);
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "PROBLEM: Testany XSD2 reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+
+ delete[] name1;
+ delete[] name2;
+ delete[] name3;
+ delete[] name4;
+
+ return 0;
+ }
+ }
+
+ if (xsd)
+ {
+
+
+ FILE *f1 = fopen(name1,"w+");
+ if (f1 == 0)
+ {
+ if (!silent)cout << "Unable to open " << name1 << endl;
+
+ delete[] name1;
+ delete[] name2;
+ delete[] name3;
+ delete[] name4;
+
+ return 0;
+ }
+
+ TypeList tl = mdg->getTypes();
+
+ fprintf(f1,"***** TESTANY ******************************************\n");
+
+ for (i=0;i<tl.size();i++)
+ {
+ fprintf(f1,"Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
+ PropertyList pl = tl[i].getProperties();
+ for (unsigned int j=0;j<pl.size();j++)
+ {
+ fprintf(f1,"Property:%s ",pl[j].getName());
+ if (pl[j].isMany())
+ fprintf(f1, "(many) ");
+ fprintf(f1, " of type %s\n",pl[j].getType().getName());
+ }
+ }
+
+ fprintf(f1,"*******************************END TYPES******************\n");
+
+ fclose(f1);
+
+ if (!comparefiles(name1,name3))
+ {
+ delete[] name1;
+ delete[] name2;
+ delete[] name3;
+ delete[] name4;
+
+ return 0;
+ }
+ }
+
+
+ if (xml == 0 || strlen(xml) == 0)
+ {
+ delete[] name1;
+ delete[] name2;
+ delete[] name3;
+ delete[] name4;
+
+ return 1;
+ }
+
+ FILE *f2 = fopen(name2,"w+");
+ if (f2 == 0)
+ {
+ if (!silent)cout << "Unable to open " << name2 << endl;
+ delete[] name1;
+ delete[] name2;
+ delete[] name3;
+ delete[] name4;
+
+ return 0;
+ }
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile(xml);
+
+ if ((i = xmh->getErrorCount()) > 0)
+ {
+ if (!silent)
+ {
+ cout << "TestAny XML found errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xmh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ delete[] name1;
+ delete[] name2;
+ delete[] name3;
+ delete[] name4;
+
+ return 0;
+ }
+ else
+ {
+ DataObjectPtr dob = doc->getRootDataObject();
+ printDataObject(f2, dob);
+ }
+
+ fclose(f2);
+ int result = comparefiles(name2,name4);
+
+ delete[] name1;
+ delete[] name2;
+ delete[] name3;
+ delete[] name4;
+
+ return result;
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in TestAnyTwo" << e << endl;
+
+ return 0;
+ }
+}
+
+int sdotest::openseq()
+
+{
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ FILE *f = fopen("openseq.dat","w+");
+ if (f == 0)
+ {
+ if (!silent)cout << "Unable to open openseq.dat" << endl;
+ return 0;
+ }
+
+
+ mdg->addType("companyNS","CompanyType");
+ // employee will be an open sequenced type...
+ mdg->addType("companyNS","EmployeeType", /*seq*/true,
+ /*open*/true,
+ /*abs */ false,
+ /*data*/ false);
+
+
+ /* Now add the properties to the types...*/
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& temp = mdg->getType("companyNS","EmployeeType");
+
+
+ mdg->addPropertyToType(tcomp,"name",tstring);
+
+ mdg->addPropertyToType(tcomp,"employees",temp,true);
+
+ mdg->addPropertyToType(temp, "name",tstring);
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","ACME");
+
+ DataObjectPtr emp = mdg->create(temp);
+
+ emp->setCString("name","Albert");
+
+ emp->setCString("openstring","Value Of Open String");
+
+ /* now do the same with the employee seq...*/
+
+ SequencePtr seq = emp->getSequence();
+
+ seq->addCString("opensequencedstring","Value of sequenced string");
+
+ const char* c = emp->getCString("openstring");
+
+ fprintf(f, "Open Type string value: %s\n",c);
+
+ c = emp->getCString("opensequencedstring");
+
+ fprintf(f, "Open Sequenced string value: %s\n",c);
+
+ c = seq->getCStringValue(0);
+
+ fprintf(f, "Open Sequenced string value from seq: %s\n",c);
+
+ //cout << "END TEST: OpenSeq ======================================" << endl;
+ fclose(f);
+ return comparefiles("openseq.dat","openseq.txt");
+}
+
+int sdotest::b48601()
+{
+ return testany("48601.xsd",
+ "Schema contains a union which is not yet implemented",0,0);
+}
+
+int sdotest::b48686()
+{
+ return testany("48686.xsd",0,"48686.xml",0);
+}
+
+int sdotest::b48736()
+{
+ return testany("48736.xsd",0,"48736.xml",0);
+}
+
+
+int sdotest::testgenerate(const char* xsd, const char* output)
+{
+
+ int i,j;
+
+ try {
+
+ char * name1 = new char[strlen(output) + 5];
+ char * name2 = new char[strlen(output) + 5];
+ char * c;
+ strcpy(name1,output);
+ while ((c = strchr(name1,'.')) != 0)*c='_';
+ strcpy(name2,name1);
+ strcat(name1,".dat");
+ strcat(name2,".txt");
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ if (xsd)
+ {
+ xsh->defineFile(xsd);
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+
+ if (!silent)
+ {
+ cout << "PROBLEM: generation XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+ return 0;
+ }
+ else
+ {
+ mdg->generateInterface(name1,"Test");
+ return comparefiles(name1,name2);
+ }
+ }
+ return 0;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in TestGenerate" << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::emptycs()
+{
+try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("company.xsd");
+
+
+ const Type& tstring = mdg->getType("commonj.sdo","String");
+ const Type& tbool = mdg->getType("commonj.sdo","Boolean");
+ const Type& tcs = mdg->getType("commonj.sdo","ChangeSummary");
+ const Type& tcomp = mdg->getType("companyNS","CompanyType");
+ const Type& tdept = mdg->getType("companyNS","DepartmentType");
+ const Type& temp = mdg->getType("companyNS","EmployeeType");
+
+
+ // create a graph, then save it
+
+ DataObjectPtr comp = mdg->create((Type&)tcomp);
+ comp->setCString("name","ACME");
+
+ DataObjectPtr dept = mdg->create((Type&)tdept);
+ DataObjectList& dol = comp->getList("departments");
+ dol.append(dept);
+
+ dept->setCString("name","Advanced Technologies");
+ dept->setCString("location","NY");
+ dept->setCString("number","123");
+
+ DataObjectPtr emp1 = mdg->create(temp);
+ DataObjectPtr emp2 = mdg->create(temp);
+ DataObjectPtr emp3 = mdg->create(temp);
+
+ emp1->setCString("name","John Jones");
+ emp1->setCString("SN","E0001");
+
+ emp2->setCString("name","Mary Smith");
+ emp2->setCString("SN","E0002");
+ emp2->setBoolean("manager",true);
+
+ emp3->setCString("name","Jane Doe");
+ emp3->setCString("SN","E0003");
+
+ DataObjectList& dol2 = dept->getList("employees");
+ dol2.append(emp1);
+ dol2.append(emp2);
+ dol2.append(emp3);
+
+ comp->setDataObject("employeeOfTheMonth",emp2);
+
+ // right now, there is no change summary, and logging is
+ // off - we expect an empty change summary element
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr doc = xmh->createDocument(comp,"companyNS","company");
+
+ xmh->save(doc,"emptycs1.xml");
+
+ if (!comparefiles("emptycs1.xml","emptycs1.txt"))return 0;
+
+ ChangeSummaryPtr cs = comp->getChangeSummary();
+
+ cs->beginLogging();
+
+ xmh->save(doc,"emptycs2.xml");
+
+ if (!comparefiles("emptycs2.xml","emptycs2.txt"))return 0;
+
+ // now we expect and empty change summary with logging true
+
+ DataObjectPtr emp4 = mdg->create(temp);
+ emp4->setCString("name","Al Smith");
+ emp4->setCString("SN","E0004");
+ emp4->setBoolean("manager",true);
+
+ // first change - create employee 4
+ dol2.append(emp4);
+
+ cs->endLogging();
+
+ //serializeChangeSummary(cs);
+
+ xmh->save(doc,"emptycs3.xml");
+
+ if (!comparefiles("emptycs3.xml","emptycs3.txt"))return 0;
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "empty change summary save failed" << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::definetest()
+{
+ try {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ TypeDefinitions* ts = new TypeDefinitions();
+ if (ts) delete ts;
+ ts = new TypeDefinitions();
+
+
+ TypeDefinition* td = new TypeDefinition();
+
+ td->setName("MySmallObject");
+ td->setUri("MyNameSpace");
+ td->setIsDataType(false);
+
+ TypeDefinition* td2 = new TypeDefinition();
+ td2->setName("MyOtherObject");
+ td2->setUri("MyNameSpace");
+ td2->setIsDataType(false);
+
+
+ PropertyDefinition* pd = new PropertyDefinition();
+ pd->setName("MyIntegerProperty");
+ pd->setType("commonj.sdo","Integer");
+
+ PropertyDefinition* pd2 = new PropertyDefinition();
+ pd2->setName("MyObjectProperty");
+ pd2->setType("MyNameSpace","MyOtherObject");
+ pd2->setIsMany(true);
+
+ td->addPropertyDefinition(*pd);
+
+ td->addPropertyDefinition(*pd2);
+
+ ts->addTypeDefinition(*td);
+ ts->addTypeDefinition(*td2);
+
+ // should have an object of type MySmallObject, containing
+ // a single integer called MyIntegerProperty, and a list of
+ // objects called MyObjectProperty - of type MyOtherObject
+
+ xsh->defineTypes(*ts);
+
+ delete td;
+ delete td2;
+ delete ts;
+ delete pd;
+ delete pd2;
+
+ DataObjectPtr dob = mdg->create("MyNameSpace","MySmallObject");
+ dob->setInteger("MyIntegerProperty",43);
+
+ dob->createDataObject("MyObjectProperty");
+ dob->createDataObject("MyObjectProperty");
+ DataObjectList& dl = dob->getList("MyObjectProperty");
+
+ if (dl.size() != 2)
+ {
+ if (!silent) cout << "Define test list size is wrong" << endl;
+ return 0;
+ }
+ int value = dob->getInteger("MyIntegerProperty");
+ if (value != 43)
+ {
+ if (!silent) cout << "Define test integer value is wrong" << endl;
+ return 0;
+ }
+
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "define test failed" << endl << e << endl;
+ return 0;
+ }
+
+}
+
+
+int sdotest::stocktest()
+{
+ return sdotest::testany("stock.wsdl",0,"stock.xml",0);
+}
+
+
+/******************************************************
+int sdotest::stocktest()
+{
+ int i,j;
+
+ try {
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("stock.wsdl");
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ cout << "PROBLEM: Testany XSD reported some errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+
+ TypeList tl = mdg->getTypes();
+
+ printf("***** TYPES BEFORE RESOLVE **********************************\n");
+
+ for (i=0;i<tl.size();i++)
+ {
+ printf("Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
+ PropertyList pl = tl[i].getProperties();
+ for (int j=0;j<pl.size();j++)
+ {
+ printf("Property:%s ",pl[j].getName());
+ if (pl[j].isMany())
+ printf("(many) ");
+ printf(" of type %s\n",pl[j].getType().getName());
+ }
+ }
+
+ printf("*******************************END TYPES******************\n");
+
+
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile("stock.xml");
+
+ if ((i = xmh->getErrorCount()) > 0)
+ {
+ cout << "TestAny XML found errors:" << endl;
+ for (j=0;j<i;j++)
+ {
+ const char *m = xmh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ }
+
+
+ DataObjectPtr dob = doc->getRootDataObject();
+ printDataObject(stdout, dob);
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ if (!silent)cout << "Exception in TestAny" << e << endl;
+ return 0;
+ }
+}
+**************************************************/
+
+
+int sdotest::pete()
+{
+
+
+ unsigned int i,j;
+
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("pete.xsd");
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ return 0;
+ }
+
+
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile("pete.xml");
+
+ if ((i = xmh->getErrorCount()) > 0)
+ {
+ for (j=0;j<i;j++)
+ {
+ const char *m = xmh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ return 0;
+ }
+
+ TypeList tl = mdg->getTypes();
+
+ //printf("***** TYPES **********************************************\n");
+
+ for (i=0;i<tl.size();i++)
+ {
+ //printf("Type:%s#%s\n",tl[i].getURI(),tl[i].getName());
+ PropertyList pl = tl[i].getProperties();
+ for (unsigned int j=0;j<pl.size();j++)
+ {
+ //printf("Property:%s ",pl[j].getName());
+ //if (pl[j].isMany())
+ //printf( "(many) ");
+ //printf( " of type %s\n",pl[j].getType().getName());
+ }
+ }
+
+ //printf( "*******************************END TYPES******************\n");
+
+
+ DataObjectPtr dob = doc->getRootDataObject();
+ float f = dob->getFloat("Stock[1]/Last");
+ //printf("Float is %2.3f \r\n",f);
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in Pete" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::xhtml1()
+{
+
+
+ int i,j;
+
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("Atom1.0.xsd");
+ // SDOUtils::printTypes(cout, xsh->getDataFactory());
+
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ for (j=0;j<i;j++)
+ {
+ const char *m = xsh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ return 0;
+ }
+
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(mdg);
+
+ XMLDocumentPtr doc = xmh->loadFile("xhtml_in.xml");
+
+ if ((i = xmh->getErrorCount()) > 0)
+ {
+ for (j=0;j<i;j++)
+ {
+ const char *m = xmh->getErrorMessage(j);
+ if (m != 0) cout << m;
+ cout << endl;
+ }
+ return 0;
+ }
+
+
+ //DataObjectPtr dob = doc->getRootDataObject();
+
+ //ofstream myout("myfile");
+
+ //if (dob)SDOUtils::printDataObject(myout , dob);
+
+ xmh->save(doc,"xhtml_out.xml");
+
+ return comparefiles("xhtml_out.xml" ,"xhtml_out.txt");
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in xhtml1" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::testXPath()
+{
+
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("company.xsd");
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("b46617b.xml", "companyNS");
+ DataObjectPtr newdob = myXMLDocument->getRootDataObject();
+
+ DataObjectPtr dop = newdob->getDataObject("departments[name='Shoe']/employees[name='Sarah Jones']");
+ string x = "departments[name='Shoe']/employees[name='Sarah Jones']";
+ dop = newdob->getDataObject(x);
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in testXPath" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::jira945()
+{
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ mdg->addType("myspace","Company");
+ mdg->addType("myspace","Employee");
+ mdg->addPropertyToType("myspace","Employee","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","name",
+ "commonj.sdo","String", false, false, false);
+
+ mdg->addPropertyToType("myspace","Company","employees",
+ "myspace","Employee", true, false, true);
+
+ const Type& tc = mdg->getType("myspace","Company");
+
+ DataObjectPtr com = mdg->create((Type&)tc);
+ com->setCString("name","acme");
+
+ const Type& te = mdg->getType("myspace","Employee");
+ DataObjectPtr emp = mdg->create(te);
+ emp->setCString("name", "Mr Expendible");
+
+ const int propIndex = tc.getPropertyIndex("employees");
+
+ // This fails with Jira945
+ DataObjectList& emps = com->getList(propIndex);
+
+ emps.append(emp);
+
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in test jira945" << e << endl;
+ return 0;
+ }
+}
+int sdotest::tuscany963()
+{
+
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("tuscany963.xsd");
+ XMLHelperPtr myXMLHelper = HelperProvider::getXMLHelper(mdg);
+ XMLDocumentPtr myXMLDocument = myXMLHelper->loadFile("tuscany963.xml");
+ myXMLHelper->save(myXMLDocument, "tuscany963.out.xml");
+
+
+ return comparefiles("tuscany963.out.xml" ,"tuscany963.out.xml.txt");
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in tuscany963" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::tuscany562()
+{
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ mdg->addType("myspace", "Base");
+ mdg->addType("myspace", "Extended");
+ const Type &base = mdg->getType("myspace", "Base"),
+ &extended = mdg->getType("myspace", "Extended");
+ mdg->setBaseType(extended, base);
+ try
+ {
+ mdg->setBaseType(extended, extended);
+ cout << "Exception should have been thrown in tuscany562 (1)" << endl;
+ return 0;
+ }
+ catch (SDOIllegalArgumentException e)
+ {}
+ try
+ {
+ mdg->setBaseType(base, extended);
+ cout << "Exception should have been thrown in tuscany562 (2)" << endl;
+ return 0;
+ }
+ catch (SDOIllegalArgumentException e)
+ {}
+ return 1;
+}
+
+int sdotest::upandatom()
+{
+
+
+ try {
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+ DataFactoryPtr df = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+ xsh->defineFile("Atom/Atom1.0.xsd");
+
+ XSDHelperPtr xh = HelperProvider::getXSDHelper(df);
+ xh->defineFile("Atom/Atom1.0.xsd");
+
+ DataObjectPtr block = mdg->create("http://www.w3.org/1999/xhtml", "Block");
+ DataObjectPtr div = df->create("http://www.w3.org/1999/xhtml", "div");
+
+ block->setDataObject("div", div);
+ return 1;
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in upandatom" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::jira980()
+{
+
+ // Load both schema files into a single data factory and create content
+ // within an open type root element.
+ try
+ {
+ // Data factory to load both schema files.
+ DataFactoryPtr df_both = DataFactory::getDataFactory();
+ XSDHelperPtr xsh_both = HelperProvider::getXSDHelper(df_both);
+
+ // Load a root element definition, then the three animal types.
+ xsh_both->defineFile("jira980_jungle.xsd");
+ xsh_both->defineFile("jira980_animaltypes.xsd");
+
+ // Create three animals based on the preceding types.
+ DataObjectPtr baloo = df_both->create("", "bearType");
+ baloo->setCString("name", "Mummy bear");
+ baloo->setInteger("weight", 700);
+
+ DataObjectPtr bagheera = df_both->create("", "pantherType");
+ bagheera->setCString("name", "Bagheera");
+ bagheera->setCString("colour", "inky black");
+
+ DataObjectPtr kaa = df_both->create("", "snakeType");
+ kaa->setCString("name", "Kaa");
+ kaa->setInteger("length", 25);
+
+ // Create an output document
+ XMLHelperPtr xmh_both = HelperProvider::getXMLHelper(df_both);
+ XMLDocumentPtr document_both = xmh_both->createDocument();
+
+ DataObjectPtr jungle = document_both->getRootDataObject();
+
+ // Add the three animals as children of the document root. In this test
+ // that root will be a "jungle" element.
+ jungle->setDataObject("bear", baloo);
+ jungle->setDataObject("panther", bagheera);
+ jungle->setDataObject("snake", kaa);
+
+ xmh_both->save(document_both, "jira980_jungle_out.xml");
+ if (!comparefiles("jira980_jungle_out.txt" ,"jira980_jungle_out.xml"))
+ {
+ return 0;
+ }
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in jira980" << e << endl;
+ return 0;
+ }
+
+
+ // Load the schema files into two different data factories and then create
+ // content within an open type root element.
+ try
+ {
+ // Load the schema files into two different data factories.
+ DataFactoryPtr df_1 = DataFactory::getDataFactory();
+ DataFactoryPtr df_2 = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh_1 = HelperProvider::getXSDHelper(df_1);
+ XSDHelperPtr xsh_2 = HelperProvider::getXSDHelper(df_2);
+
+ xsh_1->defineFile("jira980_jungle.xsd");
+ xsh_2->defineFile("jira980_animaltypes.xsd");
+
+ // Create three animals based on the preceding types.
+ DataObjectPtr baloo = df_2->create("", "bearType");
+ baloo->setCString("name", "Mummy bear");
+ baloo->setInteger("weight", 700);
+
+ DataObjectPtr bagheera = df_2->create("", "pantherType");
+ bagheera->setCString("name", "Bagheera");
+ bagheera->setCString("colour", "inky black");
+
+ DataObjectPtr kaa = df_2->create("", "snakeType");
+ kaa->setCString("name", "Kaa");
+ kaa->setInteger("length", 25);
+
+ // Create an output document
+ XMLHelperPtr xmh_1 = HelperProvider::getXMLHelper(df_1);
+ XMLDocumentPtr document_1 = xmh_1->createDocument();
+
+ DataObjectPtr jungle = document_1->getRootDataObject();
+
+ // Add the three animals as children of the document root. In this test
+ // that root will be a "jungle" element.
+ jungle->setDataObject("bear", baloo);
+ jungle->setDataObject("panther", bagheera);
+ jungle->setDataObject("snake", kaa);
+
+ xmh_1->save(document_1, "jira980_splitJungle_out.xml");
+ if (!comparefiles("jira980_splitJungle_out.txt" ,"jira980_splitJungle_out.xml"))
+ {
+ return 0;
+ }
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in jira980" << e << endl;
+ return 0;
+ }
+
+ // Load both schema files into a single data factory and create content
+ // within an open type root element with mixed ie sequenced) content.
+ try
+ {
+ // Data factory to load both schema files.
+ DataFactoryPtr df_both = DataFactory::getDataFactory();
+ XSDHelperPtr xsh_both = HelperProvider::getXSDHelper(df_both);
+
+ // Load a root element definition, then the three animal types.
+ xsh_both->defineFile("jira980_mixedJungle.xsd");
+ xsh_both->defineFile("jira980_animaltypes.xsd");
+
+ // Create three animals based on the preceding types.
+ DataObjectPtr baloo = df_both->create("", "bearType");
+ baloo->setCString("name", "Mummy bear");
+ baloo->setInteger("weight", 700);
+
+ DataObjectPtr bagheera = df_both->create("", "pantherType");
+ bagheera->setCString("name", "Bagheera");
+ bagheera->setCString("colour", "inky black");
+
+ DataObjectPtr kaa = df_both->create("", "snakeType");
+ kaa->setCString("name", "Kaa");
+ kaa->setInteger("length", 25);
+
+ // Create an output document
+ XMLHelperPtr xmh_both = HelperProvider::getXMLHelper(df_both);
+ XMLDocumentPtr document_both = xmh_both->createDocument();
+
+ DataObjectPtr mixedJungle = document_both->getRootDataObject();
+
+ // Add the three animals as children of the document root. In this test
+ // that root will be a "mixedJungle" element.
+ mixedJungle->setDataObject("bear", baloo);
+ mixedJungle->setDataObject("panther", bagheera);
+ mixedJungle->setDataObject("snake", kaa);
+
+ xmh_both->save(document_both, "jira980_mixedJungle_out.xml");
+ return comparefiles("jira980_mixedJungle_out.txt" ,"jira980_mixedJungle_out.xml");
+
+ }
+
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in jira980" << e << endl;
+ return 0;
+ }
+
+}
+
+int sdotest::typedefinitionstest()
+{
+
+ // We re-use the parsed types from the company schema
+
+
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("company.xsd");
+
+ XSDHelperPtr clonedHelper = HelperProvider::getXSDHelper();
+ clonedHelper->defineTypes(xsh->getDefinedTypes());
+
+ xsh->generateFile(mdg->getTypes(),"typedefs.xsd", "companyNS", 0);
+ xsh->generateFile(clonedHelper->getDataFactory()->getTypes(),"typedefs_cloned.xsd", "companyNS", 0);
+
+ return comparefiles("typedefs_cloned.xsd" ,"typedefs.xsd");
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in typedefinitionstest" << e << endl;
+ return 0;
+ }
+}
+
+
+int sdotest::eBayTest()
+{
+
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ cout << "parsing" <<endl;
+ xsh->defineFile("eBaySvc.wsdl");
+ cout << "parsed" <<endl;
+
+ cout<< "number of types = " << xsh->getDefinedTypes().size() <<endl;
+ XSDHelperPtr clonedHelper = HelperProvider::getXSDHelper();
+ cout << "cloning" <<endl;
+ clonedHelper->defineTypes(xsh->getDefinedTypes());
+ cout << "cloned" <<endl;
+ cout<< "number of types = " << clonedHelper->getDefinedTypes().size() <<endl;
+
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in eBayTest" << e << endl;
+ return 0;
+ }
+ return 1;
+}
+
+int sdotest::jira1174()
+{
+
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("company.xsd");
+
+
+ DataObjectPtr comp = mdg->create("companyNS", "CompanyType");
+ DataObjectPtr dept = comp->createDataObject("departments");
+ DataObjectPtr ron = dept->createDataObject("employees");
+ ron->setCString("name", "Ron");
+ comp->setDataObject("employeeOfTheMonth", ron);
+ comp = NULL;
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in jira1174" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::jira1238()
+{
+
+ try {
+
+
+ DataFactoryPtr mdg = DataFactory::getDataFactory();
+
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper(mdg);
+
+ xsh->defineFile("overlappingtypes.xsd");
+
+ mdg->getType("http://www.example.org/AnnonTypes", "Overlapping");
+ mdg->getType("http://www.example.org/AnnonTypes", "Overlapping1");
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in jira1238" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::loadWithoutSchema()
+{
+
+ try {
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper();
+
+ XMLDocumentPtr doc = xmh->loadFile("pete.xml");
+ xmh->save(doc, "noschemaout.xml");
+ return comparefiles("noschemaout.xml" ,"noschema.xml");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in loadWithoutSchema" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::jira445()
+{
+
+ try {
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper();
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory());
+ xsh->defineFile("fidelity.xsd");
+ XMLDocumentPtr doc = xmh->loadFile("fidelity.xml");
+ xmh->save(doc, "jira445out.xml");
+ return comparefiles("jira445out.xml" ,"jira445expected.xml");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in jira445" << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::jira1112()
+{
+
+ try {
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper();
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory());
+ xsh->defineFile("types.xsd");
+ unsigned int i,j;
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ cout << "types.xsd reported some errors: " <<endl;
+ for (j=0;j<i;j++)
+ {
+ cout << xsh->getErrorMessage(j) <<endl;
+ }
+ }
+
+ DataObjectPtr person = xsh->getDataFactory()->create("http://www.test.com/info","personType");
+ DataObjectPtr name = person->createDataObject("name");
+ name->setCString("first", "Will");
+ name->setCString("last", "Shakespeare");
+
+ DataObjectPtr add = xsh->getDataFactory()->create("http://Component" , "add");
+ add->setDataObject("person", person);
+
+ XMLDocumentPtr doc = xmh->createDocument(add, "", "BOGUS");
+ xmh->save(doc, "jira1112out.xml", 2);
+ return comparefiles("jira1112out.xml" ,"jira1112expected.xml");
+
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in jira1112" << e << endl;
+ return 0;
+ }
+}
+int sdotest::elementFormDefaultQualifiedSequence()
+{
+
+ try {
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper();
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory());
+ xsh->defineFile("elementFormDefaultQualifiedSeq.xsd");
+ unsigned int i,j;
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ cout << "elementFormDefaultQualifiedSeq.xsd reported some errors: " <<endl;
+ for (j=0;j<i;j++)
+ {
+ cout << xsh->getErrorMessage(j) <<endl;
+ }
+ }
+
+
+ DataObjectPtr x = xsh->getDataFactory()->create("test","xT");
+ DataObjectPtr a = x->createDataObject("a");
+ a->setCString("a1.1", "test data");
+
+ XMLDocumentPtr doc = xmh->createDocument(a, "", "a");
+ xmh->save(doc, "elementFormDefaultQualifiedSeq_out.xml", 2);
+ return comparefiles("elementFormDefaultQualifiedSeq_out.xml" ,"elementFormDefaultQualifiedSeq_expected.xml");
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in elementFormDefaultQualifiedSequence: " << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::xsiTypeAbstract()
+{
+
+ try {
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper();
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory());
+ xsh->defineFile("xsiTypeAbstract.xsd");
+ unsigned int i,j;
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ cout << "xsiTypeAbstract.xsd reported some errors: " <<endl;
+ for (j=0;j<i;j++)
+ {
+ cout << xsh->getErrorMessage(j) <<endl;
+ }
+ }
+
+
+ DataObjectPtr x = xsh->getDataFactory()->create("","X");
+ DataObjectPtr concrete = xsh->getDataFactory()->create("","concreteType");
+ x->setDataObject("abstract", concrete);
+
+ XMLDocumentPtr doc = xmh->createDocument(x, "", "X");
+ xmh->save(doc, "xsiTypeAbstract_out.xml", 2);
+ return comparefiles("xsiTypeAbstract_out.xml" ,"xsiTypeAbstract_expected.xml");
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in xsiTypeAbstract: " << e << endl;
+ return 0;
+ }
+}
+
+int sdotest::nullExtendedPrimitive()
+{
+
+ try {
+ XSDHelperPtr xsh = HelperProvider::getXSDHelper();
+ XMLHelperPtr xmh = HelperProvider::getXMLHelper(xsh->getDataFactory());
+ xsh->defineFile("nullExtendedPrimitive.xsd");
+ unsigned int i,j;
+ if ((i = xsh->getErrorCount()) > 0)
+ {
+ cout << "nullExtendedPrimitive.xsd reported some errors: " <<endl;
+ for (j=0;j<i;j++)
+ {
+ cout << xsh->getErrorMessage(j) <<endl;
+ }
+ }
+ // SDOUtils::printTypes(cout, xsh->getDataFactory());
+
+ XMLDocumentPtr doc = xmh->loadFile("nullExtendedPrimitive.xml");
+
+ //cout << doc->getRootDataObject() <<endl;
+
+
+ return 1;
+ }
+ catch (SDORuntimeException e)
+ {
+ cout << "Exception in nullExtendedPrimitive: " << e << endl;
+ return 0;
+ }
+} \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sequence.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sequence.txt
new file mode 100644
index 0000000000..1a616a3d16
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/sequence.txt
@@ -0,0 +1,45 @@
+======================================
+======================================
+======================================
+I am Item 1 of string
+======================================
+======================================
+I am Item 1 of string
+I am the first free text
+======================================
+======================================
+I am Item 1 of string
+I am the first free text
+I am Item 2 of string
+======================================
+======================================
+I am Item 1 of string
+I am free text which has been modified
+I am Item 2 of string
+
+======================================
+======================================
+I am Item 1 of string
+I am free text which has been modified
+I am Item 2 of string
+department1
+======================================
+======================================
+I am Item 1 of string
+I am free text which has been modified
+I am Item 2 of string
+department1
+======================================
+======================================
+I am Item 1 of string
+I am free text which has been modified
+I am Item 2 of string
+department1
+======================================
+======================================
+I am Item 1 of string
+I am free text which has been modified
+I am Item 2 of string
+department1
+department2
+======================================
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/setmany.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/setmany.txt
new file mode 100644
index 0000000000..083ebf6b62
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/setmany.txt
@@ -0,0 +1,24 @@
+ School :King Norberts
+ Address1:The Place
+ Address2:1 The Avenue
+ Address3:Murchester
+ Address4:England
+ Class :Primary
+ Teacher :Mr Philbert Chloroform
+ Pupil1 :Witherspoon Jnr
+ Pupil2 :Snape
+ Pupil3 :Thannet
+ Class :Secondary
+ Teacher :Mr Brian Onasis
+ Pupil1 :Grimbling
+ Pupil2 :Snagget Minor
+ Pupil3 :Van Den Bograt
+Expected path not found exception caught
+Indexed as expected
+Indexed as expected
+Indexed as expected
+Indexed as expected
+Indexed as expected
+Normal index out of range caught
+Debatable behaviour - appended
+ Address4 :PostCode
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/setnull.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/setnull.txt
new file mode 100644
index 0000000000..f6fe0633e1
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/setnull.txt
@@ -0,0 +1,42 @@
+===== Modified Object Starts
+Xpath:#/
+The modified objects type is NullNS#NullMainType
+===== Old Property Values Begin
+Property asub of type DataObject object still exists
+
+Property bsub(UNSET) of type DataObject - object null or unset
+
+===== Old Property Values End
+=====Modified Object Ends
+===== Modified Object Starts
+Xpath:#/subs.0
+The modified objects type is NullNS#NullSubType
+===== Old Property Values Begin
+Property name of type String:All Initially set
+
+Property number of type Integer:100
+
+Property bool of type Boolean:0
+
+===== Old Property Values End
+=====Modified Object Ends
+===== Modified Object Starts
+Xpath:#/subs.1
+The modified objects type is NullNS#NullSubType
+===== Old Property Values Begin
+Property bool(UNSET) of type Boolean:0
+
+===== Old Property Values End
+=====Modified Object Ends
+===== Modified Object Starts
+Xpath:#/subs.2
+The modified objects type is NullNS#NullSubType
+===== Old Property Values Begin
+Property name(ISNULL) of type String:
+
+Property number(ISNULL) of type Integer:0
+
+Property bool(ISNULL) of type Boolean:0
+
+===== Old Property Values End
+=====Modified Object Ends
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/showdefault1.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/showdefault1.txt
new file mode 100644
index 0000000000..f49e95dd58
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/showdefault1.txt
@@ -0,0 +1,15 @@
+Boolean default is : 0
+Boolean default as a string is false
+Byte default is : 0
+Byte default as a string is 0
+Character default is : 0
+Character default as a string is 0
+Short default is : 0
+Integer default is : 0
+Integer many default is : 0
+Long default is : 0
+Float default is : 0.000
+Double default is : 0.000
+Date default is : 0
+String default is zero length
+Bytes default is zero length
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/showdefault2.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/showdefault2.txt
new file mode 100644
index 0000000000..a7bd1cba92
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/showdefault2.txt
@@ -0,0 +1,18 @@
+Boolean default is : 1
+Boolean default as a string is true
+Byte default is : 100
+Byte default as a string is 100
+Character default is : 101
+Character default as a string is 101
+Short default is : 300
+Integer default is : 400
+Integer many default is : 800
+Long default is : 500
+Float default is : 600.000
+Double default is : 700.000
+Date default is : 900
+String default length is 4
+HELP
+String default as a string is HELP
+Bytes default length is 4
+HELP
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.txt
new file mode 100644
index 0000000000..0b143e19a9
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.txt
@@ -0,0 +1,8 @@
+Type:#RootType
+Property:person
+Type of property:String
+IsMany?0
+===== DataObject contents =====
+person:string:someone
+
+===== End DataObject =====
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xml
new file mode 100644
index 0000000000..4896d30619
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<person>someone</person>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xsd
new file mode 100644
index 0000000000..f31d6e21d2
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/simple.xsd
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+<xs:element name="person" type="xs:string"/>
+</xs:schema>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock.wsdl b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock.wsdl
new file mode 100644
index 0000000000..d465f1beb2
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock.wsdl
@@ -0,0 +1,407 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://ws.invesbot.com/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://ws.invesbot.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <s:schema elementFormDefault="qualified" targetNamespace="http://ws.invesbot.com/">
+ <s:element name="GetQuotes">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="symbols" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetQuotesResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="GetQuotesResult">
+ <s:complexType mixed="true">
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetQuote">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="symbol" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetQuoteResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="GetQuoteResult">
+ <s:complexType mixed="true">
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetMarketIndex">
+ <s:complexType />
+ </s:element>
+ <s:element name="GetMarketIndexResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="GetMarketIndexResult">
+ <s:complexType mixed="true">
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetECNQuotes">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="symbols" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="GetECNQuotesResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1" name="GetECNQuotesResult">
+ <s:complexType mixed="true">
+ <s:sequence>
+ <s:any />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ </s:schema>
+ </wsdl:types>
+ <wsdl:message name="GetQuotesSoapIn">
+ <wsdl:part name="parameters" element="tns:GetQuotes" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesSoapOut">
+ <wsdl:part name="parameters" element="tns:GetQuotesResponse" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteSoapIn">
+ <wsdl:part name="parameters" element="tns:GetQuote" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteSoapOut">
+ <wsdl:part name="parameters" element="tns:GetQuoteResponse" />
+ </wsdl:message>
+ <wsdl:message name="GetMarketIndexSoapIn">
+ <wsdl:part name="parameters" element="tns:GetMarketIndex" />
+ </wsdl:message>
+ <wsdl:message name="GetMarketIndexSoapOut">
+ <wsdl:part name="parameters" element="tns:GetMarketIndexResponse" />
+ </wsdl:message>
+ <wsdl:message name="GetECNQuotesSoapIn">
+ <wsdl:part name="parameters" element="tns:GetECNQuotes" />
+ </wsdl:message>
+ <wsdl:message name="GetECNQuotesSoapOut">
+ <wsdl:part name="parameters" element="tns:GetECNQuotesResponse" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesHttpGetIn">
+ <wsdl:part name="symbols" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesHttpGetOut">
+ <wsdl:part name="Body" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpGetIn">
+ <wsdl:part name="symbol" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpGetOut">
+ <wsdl:part name="Body" />
+ </wsdl:message>
+ <wsdl:message name="GetMarketIndexHttpGetIn" />
+ <wsdl:message name="GetMarketIndexHttpGetOut">
+ <wsdl:part name="Body" />
+ </wsdl:message>
+ <wsdl:message name="GetECNQuotesHttpGetIn">
+ <wsdl:part name="symbols" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetECNQuotesHttpGetOut">
+ <wsdl:part name="Body" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesHttpPostIn">
+ <wsdl:part name="symbols" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuotesHttpPostOut">
+ <wsdl:part name="Body" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpPostIn">
+ <wsdl:part name="symbol" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpPostOut">
+ <wsdl:part name="Body" />
+ </wsdl:message>
+ <wsdl:message name="GetMarketIndexHttpPostIn" />
+ <wsdl:message name="GetMarketIndexHttpPostOut">
+ <wsdl:part name="Body" />
+ </wsdl:message>
+ <wsdl:message name="GetECNQuotesHttpPostIn">
+ <wsdl:part name="symbols" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetECNQuotesHttpPostOut">
+ <wsdl:part name="Body" />
+ </wsdl:message>
+ <wsdl:portType name="StockQuotesSoap">
+ <wsdl:operation name="GetQuotes">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Enter symbols, seperated by space, Quotes delayed in 20 minutes.</wsdl:documentation>
+ <wsdl:input message="tns:GetQuotesSoapIn" />
+ <wsdl:output message="tns:GetQuotesSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="GetQuote">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Enter one symbol, quote delayed in 20 minutes.</wsdl:documentation>
+ <wsdl:input message="tns:GetQuoteSoapIn" />
+ <wsdl:output message="tns:GetQuoteSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="GetMarketIndex">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get Dow, Nasdaq, S&amp;P500 index.</wsdl:documentation>
+ <wsdl:input message="tns:GetMarketIndexSoapIn" />
+ <wsdl:output message="tns:GetMarketIndexSoapOut" />
+ </wsdl:operation>
+ <wsdl:operation name="GetECNQuotes">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Enter symbols, seperated by space, Real-Time ECN quote.</wsdl:documentation>
+ <wsdl:input message="tns:GetECNQuotesSoapIn" />
+ <wsdl:output message="tns:GetECNQuotesSoapOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:portType name="StockQuotesHttpGet">
+ <wsdl:operation name="GetQuotes">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Enter symbols, seperated by space, Quotes delayed in 20 minutes.</wsdl:documentation>
+ <wsdl:input message="tns:GetQuotesHttpGetIn" />
+ <wsdl:output message="tns:GetQuotesHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="GetQuote">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Enter one symbol, quote delayed in 20 minutes.</wsdl:documentation>
+ <wsdl:input message="tns:GetQuoteHttpGetIn" />
+ <wsdl:output message="tns:GetQuoteHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="GetMarketIndex">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get Dow, Nasdaq, S&amp;P500 index.</wsdl:documentation>
+ <wsdl:input message="tns:GetMarketIndexHttpGetIn" />
+ <wsdl:output message="tns:GetMarketIndexHttpGetOut" />
+ </wsdl:operation>
+ <wsdl:operation name="GetECNQuotes">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Enter symbols, seperated by space, Real-Time ECN quote.</wsdl:documentation>
+ <wsdl:input message="tns:GetECNQuotesHttpGetIn" />
+ <wsdl:output message="tns:GetECNQuotesHttpGetOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:portType name="StockQuotesHttpPost">
+ <wsdl:operation name="GetQuotes">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Enter symbols, seperated by space, Quotes delayed in 20 minutes.</wsdl:documentation>
+ <wsdl:input message="tns:GetQuotesHttpPostIn" />
+ <wsdl:output message="tns:GetQuotesHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="GetQuote">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Enter one symbol, quote delayed in 20 minutes.</wsdl:documentation>
+ <wsdl:input message="tns:GetQuoteHttpPostIn" />
+ <wsdl:output message="tns:GetQuoteHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="GetMarketIndex">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Get Dow, Nasdaq, S&amp;P500 index.</wsdl:documentation>
+ <wsdl:input message="tns:GetMarketIndexHttpPostIn" />
+ <wsdl:output message="tns:GetMarketIndexHttpPostOut" />
+ </wsdl:operation>
+ <wsdl:operation name="GetECNQuotes">
+ <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Enter symbols, seperated by space, Real-Time ECN quote.</wsdl:documentation>
+ <wsdl:input message="tns:GetECNQuotesHttpPostIn" />
+ <wsdl:output message="tns:GetECNQuotesHttpPostOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="StockQuotesSoap" type="tns:StockQuotesSoap">
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="GetQuotes">
+ <soap:operation soapAction="http://ws.invesbot.com/GetQuotes" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetQuote">
+ <soap:operation soapAction="http://ws.invesbot.com/GetQuote" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetMarketIndex">
+ <soap:operation soapAction="http://ws.invesbot.com/GetMarketIndex" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetECNQuotes">
+ <soap:operation soapAction="http://ws.invesbot.com/GetECNQuotes" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="StockQuotesSoap12" type="tns:StockQuotesSoap">
+ <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="GetQuotes">
+ <soap12:operation soapAction="http://ws.invesbot.com/GetQuotes" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetQuote">
+ <soap12:operation soapAction="http://ws.invesbot.com/GetQuote" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetMarketIndex">
+ <soap12:operation soapAction="http://ws.invesbot.com/GetMarketIndex" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetECNQuotes">
+ <soap12:operation soapAction="http://ws.invesbot.com/GetECNQuotes" style="document" />
+ <wsdl:input>
+ <soap12:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap12:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="StockQuotesHttpGet" type="tns:StockQuotesHttpGet">
+ <http:binding verb="GET" />
+ <wsdl:operation name="GetQuotes">
+ <http:operation location="/GetQuotes" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content part="Body" type="text/xml" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetQuote">
+ <http:operation location="/GetQuote" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content part="Body" type="text/xml" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetMarketIndex">
+ <http:operation location="/GetMarketIndex" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content part="Body" type="text/xml" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetECNQuotes">
+ <http:operation location="/GetECNQuotes" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content part="Body" type="text/xml" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="StockQuotesHttpPost" type="tns:StockQuotesHttpPost">
+ <http:binding verb="POST" />
+ <wsdl:operation name="GetQuotes">
+ <http:operation location="/GetQuotes" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content part="Body" type="text/xml" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetQuote">
+ <http:operation location="/GetQuote" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content part="Body" type="text/xml" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetMarketIndex">
+ <http:operation location="/GetMarketIndex" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content part="Body" type="text/xml" />
+ </wsdl:output>
+ </wsdl:operation>
+ <wsdl:operation name="GetECNQuotes">
+ <http:operation location="/GetECNQuotes" />
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:content part="Body" type="text/xml" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="StockQuotes">
+ <wsdl:port name="StockQuotesSoap" binding="tns:StockQuotesSoap">
+ <soap:address location="http://ws.invesbot.com/stockquotes.asmx" />
+ </wsdl:port>
+ <wsdl:port name="StockQuotesSoap12" binding="tns:StockQuotesSoap12">
+ <soap12:address location="http://ws.invesbot.com/stockquotes.asmx" />
+ </wsdl:port>
+ <wsdl:port name="StockQuotesHttpGet" binding="tns:StockQuotesHttpGet">
+ <http:address location="http://ws.invesbot.com/stockquotes.asmx" />
+ </wsdl:port>
+ <wsdl:port name="StockQuotesHttpPost" binding="tns:StockQuotesHttpPost">
+ <http:address location="http://ws.invesbot.com/stockquotes.asmx" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock.xml
new file mode 100644
index 0000000000..435fc549ad
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<GetQuotesResponse xmlns="http://ws.invesbot.com/">
+<GetQuotesResult>
+<StockQuotes>
+<StockQuote>
+<Symbol>IBM</Symbol>
+<Price>&lt;big&gt;&lt;b&gt;82.72&lt;/b&gt;&lt;/big&gt;</Price>
+<Time>11:41AM ET</Time>
+<Change>&lt;img width=&quot;10&quot; height=&quot;14&quot; border=&quot;0&quot; src=&quot;http://us.i1.yimg.com/us.yimg.com/i/us/fi/03rd/down_r.gif&quot; alt=&quot;Down&quot;&gt;&amp;nbsp;&lt;b style=&quot;color:#cc0000;&quot;&gt;0.17 (0.21%)&lt;/b&gt;</Change>
+<PrevClose>82.89</PrevClose>
+<Open>82.49</Open>
+<Bid>N/A</Bid>
+<Ask>N/A</Ask>
+<YearTarget>95.94</YearTarget>
+<DayRange>82.40 - 82.80</DayRange>
+<YearRange>72.50 - 89.94</YearRange>
+<Volume>1,568,200</Volume>
+<AvgVol>5,301,380</AvgVol>
+<MarketCap>128.25B</MarketCap>
+<PE>16.15</PE>
+<EPS>5.12</EPS>
+<DivYield>1.20 (1.40%)</DivYield>
+</StockQuote>
+</StockQuotes>
+</GetQuotesResult>
+</GetQuotesResponse>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock_wsdl.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock_wsdl.txt
new file mode 100644
index 0000000000..47a11b4d3b
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock_wsdl.txt
@@ -0,0 +1,47 @@
+***** TYPES BEFORE RESOLVE **********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://ws.invesbot.com/#GetECNQuotes
+Property:symbols of type String
+Type:http://ws.invesbot.com/#GetECNQuotesResponse
+Property:GetECNQuotesResult of type GetECNQuotesResult
+Type:http://ws.invesbot.com/#GetECNQuotesResult
+Type:http://ws.invesbot.com/#GetMarketIndex
+Type:http://ws.invesbot.com/#GetMarketIndexResponse
+Property:GetMarketIndexResult of type GetMarketIndexResult
+Type:http://ws.invesbot.com/#GetMarketIndexResult
+Type:http://ws.invesbot.com/#GetQuote
+Property:symbol of type String
+Type:http://ws.invesbot.com/#GetQuoteResponse
+Property:GetQuoteResult of type GetQuoteResult
+Type:http://ws.invesbot.com/#GetQuoteResult
+Type:http://ws.invesbot.com/#GetQuotes
+Property:symbols of type String
+Type:http://ws.invesbot.com/#GetQuotesResponse
+Property:GetQuotesResult of type GetQuotesResult
+Type:http://ws.invesbot.com/#GetQuotesResult
+Type:http://ws.invesbot.com/#RootType
+Property:GetQuotes of type GetQuotes
+Property:GetQuotesResponse of type GetQuotesResponse
+Property:GetQuote of type GetQuote
+Property:GetQuoteResponse of type GetQuoteResponse
+Property:GetMarketIndex of type GetMarketIndex
+Property:GetMarketIndexResponse of type GetMarketIndexResponse
+Property:GetECNQuotes of type GetECNQuotes
+Property:GetECNQuotesResponse of type GetECNQuotesResponse
+*******************************END TYPES******************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock_xml.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock_xml.txt
new file mode 100644
index 0000000000..6aa493dfa3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/stock_xml.txt
@@ -0,0 +1,127 @@
+***** TYPES AFTER RESOLVE*********************************
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#OpenDataObject
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://ws.invesbot.com/#GetECNQuotes
+Property:symbols of type String
+Type:http://ws.invesbot.com/#GetECNQuotesResponse
+Property:GetECNQuotesResult of type GetECNQuotesResult
+Type:http://ws.invesbot.com/#GetECNQuotesResult
+Type:http://ws.invesbot.com/#GetMarketIndex
+Type:http://ws.invesbot.com/#GetMarketIndexResponse
+Property:GetMarketIndexResult of type GetMarketIndexResult
+Type:http://ws.invesbot.com/#GetMarketIndexResult
+Type:http://ws.invesbot.com/#GetQuote
+Property:symbol of type String
+Type:http://ws.invesbot.com/#GetQuoteResponse
+Property:GetQuoteResult of type GetQuoteResult
+Type:http://ws.invesbot.com/#GetQuoteResult
+Type:http://ws.invesbot.com/#GetQuotes
+Property:symbols of type String
+Type:http://ws.invesbot.com/#GetQuotesResponse
+Property:GetQuotesResult of type GetQuotesResult
+Type:http://ws.invesbot.com/#GetQuotesResult
+Type:http://ws.invesbot.com/#RootType
+Property:GetQuotes of type GetQuotes
+Property:GetQuotesResponse of type GetQuotesResponse
+Property:GetQuote of type GetQuote
+Property:GetQuoteResponse of type GetQuoteResponse
+Property:GetMarketIndex of type GetMarketIndex
+Property:GetMarketIndexResponse of type GetMarketIndexResponse
+Property:GetECNQuotes of type GetECNQuotes
+Property:GetECNQuotesResponse of type GetECNQuotesResponse
+*******************************END TYPES******************
+===== DataObject contents =====
+GetQuotesResult:dataObject
+===== Sequenced DataObject contents =====
+Setting of DO property StockQuotes[0]=
+===== Sequenced DataObject contents =====
+Setting of DO property StockQuote[0]=
+===== Sequenced DataObject contents =====
+Setting of DO property Symbol[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:IBM
+===== End Sequenced DataObject contents =
+Setting of DO property Price[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:<big><b>82.72</b></big>
+===== End Sequenced DataObject contents =
+Setting of DO property Time[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:11:41AM ET
+===== End Sequenced DataObject contents =
+Setting of DO property Change[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:<img width="10" height="14" border="0" src="http://us.i1.yimg.com/us.yimg.com/i/us/fi/03rd/down_r.gif" alt="Down">&nbsp;<b style="color:#cc0000;">0.17 (0.21%)</b>
+===== End Sequenced DataObject contents =
+Setting of DO property PrevClose[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:82.89
+===== End Sequenced DataObject contents =
+Setting of DO property Open[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:82.49
+===== End Sequenced DataObject contents =
+Setting of DO property Bid[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:N/A
+===== End Sequenced DataObject contents =
+Setting of DO property Ask[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:N/A
+===== End Sequenced DataObject contents =
+Setting of DO property YearTarget[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:95.94
+===== End Sequenced DataObject contents =
+Setting of DO property DayRange[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:82.40 - 82.80
+===== End Sequenced DataObject contents =
+Setting of DO property YearRange[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:72.50 - 89.94
+===== End Sequenced DataObject contents =
+Setting of DO property Volume[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:1,568,200
+===== End Sequenced DataObject contents =
+Setting of DO property AvgVol[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:5,301,380
+===== End Sequenced DataObject contents =
+Setting of DO property MarketCap[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:128.25B
+===== End Sequenced DataObject contents =
+Setting of DO property PE[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:16.15
+===== End Sequenced DataObject contents =
+Setting of DO property EPS[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:5.12
+===== End Sequenced DataObject contents =
+Setting of DO property DivYield[0]=
+===== Sequenced DataObject contents =====
+TEXT ELEMENT:1.20 (1.40%)
+===== End Sequenced DataObject contents =
+===== End Sequenced DataObject contents =
+===== End Sequenced DataObject contents =
+===== End Sequenced DataObject contents =
+
+===== End DataObject =====
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/include3.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/include3.xsd
new file mode 100644
index 0000000000..c661f6871e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/include3.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother.xsd
new file mode 100644
index 0000000000..3332ed6b53
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:include schemaLocation = "includeother1.xsd"/>
+ <xsd:include schemaLocation = "./includeother2.xsd"/>
+ <xsd:include schemaLocation = "../Debug/includeother3.xsd"/>
+
+
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother1.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother1.xsd
new file mode 100644
index 0000000000..3023ffaca5
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="cs" type="sdo:ChangeSummaryType"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" sdoxml:propertyType="company:EmployeeType"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother2.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother2.xsd
new file mode 100644
index 0000000000..5c05afdf36
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/t2/includeother2.xsd
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/include3.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/include3.xsd
new file mode 100644
index 0000000000..8b7ca5822b
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/include3.xsd
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother.xsd
new file mode 100644
index 0000000000..21f3ff25cb
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:include schemaLocation = "includeother1.xsd"/>
+ <xsd:include schemaLocation = "./includeother2.xsd"/>
+ <xsd:include schemaLocation = "../test2/includeother3.xsd"/>
+
+
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother1.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother1.xsd
new file mode 100644
index 0000000000..3023ffaca5
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother1.xsd
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:element name="company" type="company:CompanyType"/>
+ <xsd:complexType name="CompanyType">
+ <xsd:sequence>
+ <xsd:element name="departments" type="company:DepartmentType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="cs" type="sdo:ChangeSummaryType"/>
+ <xsd:attribute name="employeeOfTheMonth" type="xsd:IDREF" sdoxml:propertyType="company:EmployeeType"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother2.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother2.xsd
new file mode 100644
index 0000000000..5c05afdf36
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test/includeother2.xsd
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:complexType name="DepartmentType">
+ <xsd:sequence>
+ <xsd:element name="employees" type="company:EmployeeType" maxOccurs="unbounded"/>
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="location" type="xsd:string"/>
+ <xsd:attribute name="number" type="xsd:int"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test2/includeother3.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test2/includeother3.xsd
new file mode 100644
index 0000000000..8b7ca5822b
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/test2/includeother3.xsd
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+ <xsd:schema
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ xmlns:sdo="commonj.sdo"
+ xmlns:sdoxml="commonj.sdo/xml"
+ xmlns:company="companyNS"
+ targetNamespace="companyNS">
+
+ <xsd:complexType name="EmployeeType">
+ <xsd:attribute name="name" type="xsd:string"/>
+ <xsd:attribute name="SN" type="xsd:ID"/>
+ <xsd:attribute name="manager" type="xsd:boolean"/>
+ </xsd:complexType>
+ </xsd:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testabstract.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testabstract.txt
new file mode 100644
index 0000000000..80c1d03afe
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testabstract.txt
@@ -0,0 +1,5 @@
+Normal unsupportedoperation for creation of abstract type
+Publication is of type BookType
+Publication is of type MagazineType
+Book is of type BookType
+Magazine is of type MagazineType
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testerrors.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testerrors.txt
new file mode 100644
index 0000000000..fcecdf5bde
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testerrors.txt
@@ -0,0 +1,5 @@
+XSD reported some errors:
+Opening and ending tag mismatch: complexType line 44 and schema
+
+Premature end of data in tag schema line 22
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testinc2.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testinc2.txt
new file mode 100644
index 0000000000..837559562e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testinc2.txt
@@ -0,0 +1,21 @@
+Type:commonj.sdo#BigDecimal
+Type:commonj.sdo#BigInteger
+Type:commonj.sdo#Boolean
+Type:commonj.sdo#Byte
+Type:commonj.sdo#Bytes
+Type:commonj.sdo#ChangeSummary
+Type:commonj.sdo#Character
+Type:commonj.sdo#DataObject
+Type:commonj.sdo#Date
+Type:commonj.sdo#Double
+Type:commonj.sdo#Float
+Type:commonj.sdo#Integer
+Type:commonj.sdo#Long
+Type:commonj.sdo#Short
+Type:commonj.sdo#String
+Type:commonj.sdo#URI
+Type:http://example.org/Calculator#RootType
+Type:http://example.org/CalculatorTypes#AddArguments
+Property:a
+Property:b
+Type:http://example.org/CalculatorTypes#RootType
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testopen.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testopen.txt
new file mode 100644
index 0000000000..f1eef1ab5e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testopen.txt
@@ -0,0 +1,24 @@
+Normal exception for setting null on undefined prop
+Open Type string value: Value Of Open String
+Open Type boolean value: 1
+EMP1 type property: name ( many? 0) of type String
+EMP1 type property: SN ( many? 0) of type String
+EMP1 type property: manager ( many? 0) of type Boolean
+EMP1 inst property: name (many? 0) of type String
+EMP1 inst property: SN (many? 0) of type String
+EMP1 inst property: manager (many? 0) of type Boolean
+EMP1 inst property: openstring (many? 0) of type String
+EMP1 inst property: openboolean (many? 0) of type Boolean
+EMP1 inst property: opentypelist (many? 1) of type Short
+EMP1 inst property: name (many? 0) of type String
+EMP1 inst property: SN (many? 0) of type String
+EMP1 inst property: manager (many? 0) of type Boolean
+EMP1 inst property: openboolean (many? 0) of type Boolean
+EMP1 inst property: opentypelist (many? 1) of type Short
+EMP1 inst property: name (many? 0) of type String
+EMP1 inst property: SN (many? 0) of type String
+EMP1 inst property: manager (many? 0) of type Boolean
+EMP1 inst property: opentypelist (many? 1) of type Short
+EMP1 inst property: name (many? 0) of type String
+EMP1 inst property: SN (many? 0) of type String
+EMP1 inst property: manager (many? 0) of type Boolean
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testopen3.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testopen3.xml
new file mode 100644
index 0000000000..b16a75802e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testopen3.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdo="commonj.sdo" xmlns:sdoxml="commonj.sdo/xml" xmlns:tns="companyNS" targetNamespace="companyNS"><xsd:element name="companyType" type="tns:CompanyType"/><xsd:complexType name="CompanyType" sdo:aliasName="TheFirm TheBigFirm"><xsd:sequence><xsd:element name="departments" type="tns:DepartmentType" minOccurs="0" maxOccurs="unbounded" sdo:aliasName="TheDepartments MYDepartments"/></xsd:sequence><xsd:element name="changeSummary" type="sdo:ChangeSummaryType"/><xsd:attribute name="name" type="xsd:String"/><xsd:attribute name="employeeOfTheMonth" sdoxml:propertyType="tns:EmployeeType" type="xsd:anyURI"/></xsd:complexType><xsd:element name="departmentType" type="tns:DepartmentType"/><xsd:complexType name="DepartmentType"><xsd:sequence><xsd:element name="employees" type="tns:EmployeeType" minOccurs="0" maxOccurs="unbounded"/></xsd:sequence><xsd:attribute name="name" type="xsd:String"/><xsd:attribute name="location" type="xsd:String"/><xsd:attribute name="number" type="xsd:String"/></xsd:complexType><xsd:element name="employeeType" type="tns:EmployeeType"/><xsd:complexType name="EmployeeType"><xsd:attribute name="name" type="xsd:String"/><xsd:attribute name="SN" type="xsd:String"/><xsd:attribute name="manager" type="xsd:boolean"/><xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/><xsd:anyAttribute namespace="##any" processContents="lax"/></xsd:complexType><xsd:element name="openType" type="tns:OpenType"/><xsd:complexType name="OpenType"><xsd:attribute name="name" type="xsd:String"/></xsd:complexType><xsd:attribute name="openboolean" type="xsd:boolean"/><xsd:element name="opendataobject" type="tns:OpenType" minOccurs="0"/><xsd:element name="opendataobjectlist" type="tns:OpenType" minOccurs="0" maxOccurs="unbounded"/><xsd:element name="openintlist" type="xsd:short" minOccurs="0" maxOccurs="unbounded"/><xsd:attribute name="openstring" type="xsd:hexBinary"/></xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testorder.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testorder.txt
new file mode 100644
index 0000000000..4f46cbfecf
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testorder.txt
@@ -0,0 +1,19 @@
+Type:#Address
+Property:name
+Property:street
+Property:city
+Type:#RootType
+Property:employee
+Type:#UKAddress
+Property:value
+Property:postcode
+Type:#USAddress
+Property:value
+Property:zip
+Type:#fullpersoninfo
+Property:address
+Property:city
+Property:country
+Type:#personinfo
+Property:firstname
+Property:lastname
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/teststyles.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/teststyles.txt
new file mode 100644
index 0000000000..52de3ffc6a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/teststyles.txt
@@ -0,0 +1,93 @@
+*****STYLE Style1.xsd
+Type: commonj.sdo#BigDecimal
+Type: commonj.sdo#BigInteger
+Type: commonj.sdo#Boolean
+Type: commonj.sdo#Byte
+Type: commonj.sdo#Bytes
+Type: commonj.sdo#ChangeSummary
+Type: commonj.sdo#Character
+Type: commonj.sdo#DataObject
+Type: commonj.sdo#Date
+Type: commonj.sdo#Double
+Type: commonj.sdo#Float
+Type: commonj.sdo#Integer
+Type: commonj.sdo#Long
+Type: commonj.sdo#OpenDataObject
+Type: commonj.sdo#Short
+Type: commonj.sdo#String
+Type: commonj.sdo#URI
+Type: libraryNS#RootType
+Type: libraryNS#author
+Type: libraryNS#available
+Type: libraryNS#book
+Type: libraryNS#character
+Type: libraryNS#isbn
+Type: libraryNS#library
+Property:book
+Type: libraryNS#title
+*************
+Root is:libraryNS#character
+Root is:libraryNS#library
+Root is:libraryNS#library
+*****STYLE Style2.xsd
+Type: commonj.sdo#BigDecimal
+Type: commonj.sdo#BigInteger
+Type: commonj.sdo#Boolean
+Type: commonj.sdo#Byte
+Type: commonj.sdo#Bytes
+Type: commonj.sdo#ChangeSummary
+Type: commonj.sdo#Character
+Type: commonj.sdo#DataObject
+Type: commonj.sdo#Date
+Type: commonj.sdo#Double
+Type: commonj.sdo#Float
+Type: commonj.sdo#Integer
+Type: commonj.sdo#Long
+Type: commonj.sdo#OpenDataObject
+Type: commonj.sdo#Short
+Type: commonj.sdo#String
+Type: commonj.sdo#URI
+Type: libraryNS#RootType
+Type: libraryNS#author
+Type: libraryNS#available
+Type: libraryNS#book
+Type: libraryNS#character
+Type: libraryNS#isbn
+Type: libraryNS#library
+Property:book
+Type: libraryNS#title
+*************
+Root is:libraryNS#character
+Root is:libraryNS#library
+Root is:libraryNS#library
+*****STYLE Style3.xsd
+Type: commonj.sdo#BigDecimal
+Type: commonj.sdo#BigInteger
+Type: commonj.sdo#Boolean
+Type: commonj.sdo#Byte
+Type: commonj.sdo#Bytes
+Type: commonj.sdo#ChangeSummary
+Type: commonj.sdo#Character
+Type: commonj.sdo#DataObject
+Type: commonj.sdo#Date
+Type: commonj.sdo#Double
+Type: commonj.sdo#Float
+Type: commonj.sdo#Integer
+Type: commonj.sdo#Long
+Type: commonj.sdo#OpenDataObject
+Type: commonj.sdo#Short
+Type: commonj.sdo#String
+Type: commonj.sdo#URI
+Type: libraryNS#RootType
+Type: libraryNS#author
+Type: libraryNS#available
+Type: libraryNS#bookType
+Type: libraryNS#character
+Type: libraryNS#isbn
+Type: libraryNS#library
+Property:book
+Type: libraryNS#title
+*************
+Root is:libraryNS#character
+Root is:libraryNS#library
+Root is:libraryNS#library
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testsubsload.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testsubsload.txt
new file mode 100644
index 0000000000..43c16114c3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testsubsload.txt
@@ -0,0 +1,7 @@
+TEST: TestSubsLoad ==========================================
+Publication is of type PublicationType
+Publication is of type BookType
+Publication is of type MagazineType
+Book is of type BookType
+Magazine is of type MagazineType
+END TEST: TestSubsLoad ======================================
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testutils.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testutils.txt
new file mode 100644
index 0000000000..909f91bda8
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testutils.txt
@@ -0,0 +1,100 @@
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO
+DataObject type: companyNS#CompanyType
+ Property: name
+ Property Type: commonj.sdo#String
+ Property Value: ACME
+ Property: employeeOfTheMonth
+ Property Type: companyNS#EmployeeType
+ Property Value: not set
+ Property: departments
+ Property Type: companyNS#DepartmentType
+ Value 0
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO
+ DataObject type: companyNS#DepartmentType
+ Property: name
+ Property Type: commonj.sdo#String
+ Property Value: Advanced Technologies
+ Property: location
+ Property Type: commonj.sdo#String
+ Property Value: NY
+ Property: number
+ Property Type: commonj.sdo#String
+ Property Value: 123
+ Property: employees
+ Property Type: companyNS#EmployeeType
+ Value 0
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO
+ DataObject type: companyNS#EmployeeType
+ Property: name
+ Property Type: commonj.sdo#String
+ Property Value: Albert
+ Property: SN
+ Property Type: commonj.sdo#String
+ Property Value: E0001
+ Property: manager
+ Property Type: commonj.sdo#Boolean
+ Property Value: not set
+ Property: openstring
+ Property Type: commonj.sdo#String
+ Property Value: Value Of Open String
+ Property: openboolean
+ Property Type: commonj.sdo#Boolean
+ Property Value: true
+ Property: openintlist
+ Property Type: commonj.sdo#Short
+ Value 0
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO
+ DataObject type: commonj.sdo#Short
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do
+
+ Property: opendataobjectlist
+ Property Type: companyNS#OpenType
+ Value 0
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO
+ DataObject type: companyNS#OpenType
+ Property: name
+ Property Type: commonj.sdo#String
+ Property Value: MyOpenName
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do
+
+ Property: opendataobject
+ Property Type: companyNS#OpenType
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO
+ DataObject type: companyNS#OpenType
+ Property: name
+ Property Type: commonj.sdo#String
+ Property Value: MyOpenName
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do
+
+ Value 1
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO
+ DataObject type: companyNS#EmployeeType
+ Property: name
+ Property Type: commonj.sdo#String
+ Property Value: Boris
+ Property: SN
+ Property Type: commonj.sdo#String
+ Property Value: E0002
+ Property: manager
+ Property Type: commonj.sdo#Boolean
+ Property Value: true
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do
+
+ Value 2
+>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> start of DO
+ DataObject type: companyNS#EmployeeType
+ Property: name
+ Property Type: commonj.sdo#String
+ Property Value: Carl
+ Property: SN
+ Property Type: commonj.sdo#String
+ Property Value: E0003
+ Property: manager
+ Property Type: commonj.sdo#Boolean
+ Property Value: not set
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do
+
+<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end of do
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.txt
new file mode 100644
index 0000000000..025b797d96
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xsi:type="tDefinitions" xmlns:tns2="http://I want/this/added/to/the/urls" xmlns:tns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><message name="testRequest"><part name="name" type="xsi:string"/><part name="name" type="tns2:string"/></message></definitions>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.xml
new file mode 100644
index 0000000000..47f983d51e
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/testwsdl.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xsi:type="tDefinitions" xmlns:tns2="http://I want/this/added/to/the/urls" xmlns:tns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><message name="testRequest"><part name="name" type="xsi:string"/><part name="name" type="tns2:string"/></message></definitions>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/travel.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/travel.txt
new file mode 100644
index 0000000000..5311a919f8
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/travel.txt
@@ -0,0 +1,146 @@
+*******************************TYPES**********************
+TYPE:#Client
+TYPE:#Excursion
+TYPE:#Flight
+TYPE:#Holiday
+TYPE:#Hotel
+TYPE:#Party
+TYPE:#Person
+TYPE:#Room
+TYPE:#RootType
+TYPE:commonj.sdo#BigDecimal
+TYPE:commonj.sdo#BigInteger
+TYPE:commonj.sdo#Boolean
+TYPE:commonj.sdo#Byte
+TYPE:commonj.sdo#Bytes
+TYPE:commonj.sdo#ChangeSummary
+TYPE:commonj.sdo#Character
+TYPE:commonj.sdo#DataObject
+TYPE:commonj.sdo#Date
+TYPE:commonj.sdo#Double
+TYPE:commonj.sdo#Float
+TYPE:commonj.sdo#Integer
+TYPE:commonj.sdo#Long
+TYPE:commonj.sdo#OpenDataObject
+TYPE:commonj.sdo#Short
+TYPE:commonj.sdo#String
+TYPE:commonj.sdo#URI
+*******************************END TYPES******************
+*******************************DATA**********************
+===== DataObject contents =====
+Flight: list dataObject[0]=
+===== DataObject contents =====
+Departure:string:LHR
+
+Arrival:string:SNG
+
+flightNo:string:BA243
+
+===== End DataObject =====
+
+dataObject[1]=
+===== DataObject contents =====
+Departure:string:SNG
+
+Arrival:string:LHR
+
+flightNo:string:SG561
+
+===== End DataObject =====
+
+Hotel: list dataObject[0]=
+===== DataObject contents =====
+Name:string:Excelsior
+
+Phone:string:222-3333
+
+Room:dataObject
+===== DataObject contents =====
+value:string:303
+
+booked:boolean:1
+
+===== End DataObject =====
+
+cardsAccepted:boolean:1
+
+===== End DataObject =====
+
+dataObject[1]=
+===== DataObject contents =====
+Name:string:Seedy Lodge
+
+Phone:string:888-9999
+
+Room:dataObject
+===== DataObject contents =====
+value:string:14
+
+booked:boolean:1
+
+===== End DataObject =====
+
+cardsAccepted:boolean:0
+
+===== End DataObject =====
+
+dataObject[2]=
+===== DataObject contents =====
+Name:string:Hilton
+
+Phone:string:444-5555
+
+Room:dataObject
+===== DataObject contents =====
+value:string:456
+
+booked:boolean:0
+
+===== End DataObject =====
+
+cardsAccepted:boolean:1
+
+===== End DataObject =====
+
+Excursion:dataObject
+===== DataObject contents =====
+Title:string:Bird Baths of Singapore
+
+Cost:string:50
+
+===== End DataObject =====
+
+Client:dataObject
+===== DataObject contents =====
+Name:string:Steve
+
+Address:string:134 Shirley Road
+
+CreditCard:string:1234-8908-6543-900
+
+===== End DataObject =====
+
+Party:dataObject
+===== DataObject contents =====
+Person: list dataObject[0]=
+===== DataObject contents =====
+Name:string:John
+
+===== End DataObject =====
+
+dataObject[1]=
+===== DataObject contents =====
+Name:string:Jane
+
+===== End DataObject =====
+
+dataObject[2]=
+===== DataObject contents =====
+Name:string:Bill
+
+===== End DataObject =====
+
+===== End DataObject =====
+
+===== End DataObject =====
+***************************END DATA**********************
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.out.xml.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.out.xml.txt
new file mode 100644
index 0000000000..55bad5b09a
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.out.xml.txt
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<tns:content xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.w3.org/2005/Atom" base="blah" lang="blah2"/>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xml
new file mode 100644
index 0000000000..10b9ecd966
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<content xmlns="http://www.w3.org/2005/Atom" xmlns:tns="http://www.w3.org/2005/Atom"
+xml:base="blah" xml:lang="blah2" />
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xsd
new file mode 100644
index 0000000000..0cb28ca207
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/tuscany963.xsd
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+<xs:schema targetNamespace="http://www.w3.org/2005/Atom"
+xmlns="http://www.w3.org/2005/Atom" xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+<xs:import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml.xsd" />
+<xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="xhtml1-strict.xsd" />
+
+<xs:element name="content" type="contentType" minOccurs="0" />
+
+<xs:complexType name="contentType" mixed="true" >
+<xs:sequence>
+<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
+</xs:sequence>
+<xs:attribute name="type" type="xs:string" default="text" />
+<xs:attribute name="src" type="xs:string" /> <!-- uriType -->
+<xs:attributeGroup ref="commonAttributes"/>
+</xs:complexType>
+
+<xs:attributeGroup name="commonAttributes">
+<xs:attribute ref="xml:base" />
+<xs:attribute ref="xml:lang" />
+<xs:anyAttribute/>
+</xs:attributeGroup>
+
+</xs:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/types.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/types.xsd
new file mode 100644
index 0000000000..efcfab7b06
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/types.xsd
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:ns0="http://www.test.com/info"
+ targetNamespace="http://Component">
+ <xs:import schemaLocation="person.xsd"
+namespace="http://www.test.com/info"/>
+ <xs:element name="add">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element name="person" type="ns0:personType"
+ nillable="true"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
+
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/userdata.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/userdata.txt
new file mode 100644
index 0000000000..e24caba194
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/userdata.txt
@@ -0,0 +1,10 @@
+Expected 0xF1F1F1F1 F1F1F1F1
+Expected 0xF1F1F1F1 F1F1F1F1
+Expected 0x20 00000020
+Expected 0x40020 00040020
+Expected 0 00000000
+Expected 0 00000000
+Expected 120 00000120
+Expected 0 00000000
+Expected 640 00000640
+Expected 0x740 00000740
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/utils.cpp b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/utils.cpp
new file mode 100644
index 0000000000..d5facc832b
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/utils.cpp
@@ -0,0 +1,553 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/* $Rev$ $Date$ */
+
+#include <stdio.h>
+
+#pragma warning(disable:4786)
+
+#include <iostream>
+using namespace std;
+
+#include "sdotest.h"
+
+bool sdotest::silent = true;
+bool sdotest::ramping = false;
+
+void sdotest::printOldValues(FILE *f, ChangeSummaryPtr cs, DataObjectPtr dol)
+{
+ fprintf(f,"===== Old Property Values Begin\n");
+ SettingList& sl = cs->getOldValues(dol);
+ if (sl.size() == 0)
+ {
+ fprintf(f,"No Settings found\n");
+ }
+ else
+ {
+ for (int j=0;j< sl.size(); j++)
+ {
+ fprintf(f,"Property %s",sl[j].getProperty().getName());
+ // this could be a many-valued property, and could be one which is
+ // a data object or a data type...
+ if (sl[j].getProperty().isMany())
+ {
+ fprintf(f,"[%d]",sl[j].getIndex());
+ }
+ if (!sl[j].isSet())
+ {
+ fprintf(f,"(UNSET)");
+ }
+ if (sl[j].isNull())
+ {
+ fprintf(f,"(ISNULL)");
+ }
+
+ fprintf(f," of type ");
+ switch (sl[j].getProperty().getTypeEnum())
+ {
+ case Type::BooleanType:
+ fprintf(f,"Boolean:%d\n",sl[j].getBooleanValue());
+ break;
+ case Type::ByteType:
+ fprintf(f,"Byte:%d\n",sl[j].getByteValue());
+ break;
+ case Type::CharacterType:
+ fprintf(f,"Character:%d\n",sl[j].getCharacterValue());
+ break;
+ case Type::IntegerType:
+ fprintf(f,"Integer:%d\n",sl[j].getIntegerValue());
+ break;
+ case Type::ShortType:
+ fprintf(f,"Short:%d\n",sl[j].getShortValue());
+ break;
+ case Type::DoubleType:
+ fprintf(f,"Double:%.3f\n",(float)sl[j].getDoubleValue());
+ break;
+ case Type::FloatType:
+ fprintf(f,"Float:%.3f\n",sl[j].getFloatValue());
+ break;
+ case Type::LongType:
+ fprintf(f,"Long:%ld\n",sl[j].getIntegerValue());
+ break;
+ case Type::DateType:
+ fprintf(f,"Date:%d\n",sl[j].getDateValue().getTime());
+ break;
+ case Type::BigDecimalType:
+ case Type::BigIntegerType:
+ case Type::StringType:
+ case Type::UriType:
+ fprintf(f,"String:%s\n",sl[j].getCStringValue());
+ break;
+ case Type::BytesType:
+ fprintf(f,"Bytes:%s\n",sl[j].getCStringValue());
+ break;
+ case Type::OtherTypes:
+ case Type::DataObjectType:
+ case Type::ChangeSummaryType:
+ {
+ fprintf(f,"DataObject ");
+ DataObjectPtr dob = sl[j].getDataObjectValue();
+ if (!dob)
+ {
+ fprintf(f," - object null or unset\n");
+ }
+ else
+ {
+ DataObjectPtr mydo = sl[j].getDataObjectValue();
+ if (cs->isDeleted(mydo))
+ {
+ fprintf(f," - object deleted \n");
+ printOldValues(f, cs,mydo);
+ }
+ else
+ {
+ fprintf(f," object still exists \n");
+ }
+ }
+ }
+ break;
+ default:
+ {
+ fprintf(f,"Unknown object type\n");
+ }
+ break;
+ }
+ fprintf(f,"\n");
+ }
+ }
+ fprintf(f,"===== Old Property Values End \n");
+ return;
+}
+
+
+void sdotest::printDataStructure(FILE *f , DataFactory* dd)
+{
+ TypeList tt = dd->getTypes();
+ fprintf(f,"Printing Types\n");
+ for (unsigned int i = 0; i < tt.size(); ++i)
+ {
+ fprintf(f,"Type %s\n",tt[i].getName());
+ PropertyList pl = tt[i].getProperties();
+ for (unsigned int j = 0; j < pl.size() ; j++)
+ {
+ fprintf(f,"Has Property %s of type %s\n",
+ pl[j].getName(),pl[j].getType().getName());
+ }
+ }
+}
+
+
+void sdotest::printValue(FILE *f, DataObjectPtr dp, const Property& p)
+{
+ switch (p.getTypeEnum())
+ {
+ case Type::BooleanType:
+ fprintf(f,"boolean:%d\n",dp->getBoolean(p));
+ break;
+ case Type::ByteType:
+ fprintf(f,"Byte:%d\n",dp->getByte(p));
+ break;
+ case Type::CharacterType:
+ fprintf(f,"character:%d\n",dp->getCharacter(p));
+ break;
+ case Type::IntegerType:
+ fprintf(f,"integer:%d\n",dp->getInteger(p));
+ break;
+ case Type::ShortType:
+ fprintf(f,"short:%d\n",dp->getShort(p));
+ break;
+ case Type::DoubleType:
+ fprintf(f,"double:%.3f\n",(float)dp->getDouble(p));
+ break;
+ case Type::FloatType:
+ fprintf(f,"float:%.3f\n", dp->getFloat(p));
+ break;
+ case Type::LongType:
+ fprintf(f,"long:%ld\n",dp->getInteger(p));
+ break;
+ case Type::DateType:
+ fprintf(f,"date:%d\n",dp->getDate(p).getTime());
+ break;
+ case Type::BigDecimalType:
+ case Type::BigIntegerType:
+ case Type::StringType:
+ case Type::UriType:
+ fprintf(f,"string:%s\n", dp->getCString(p));
+ break;
+ case Type::BytesType:
+ fprintf(f,"bytes:%s\n",dp->getCString(p));
+ break;
+ case Type::OpenDataObjectType:
+ case Type::DataObjectType:
+ {
+ fprintf(f,"dataObject\n" );
+ DataObjectPtr dob = dp->getDataObject(p);
+ if (!dob)
+ {
+ fprintf(f," - null or unset\n");
+ }
+ else
+ {
+ printDataObject(f, dob);
+ }
+ }
+ break;
+ case Type::OtherTypes:
+ case Type::ChangeSummaryType:
+ default:
+ {
+ fprintf(f,"Unknown object type");
+ }
+ break;
+ }
+ fprintf(f,"\n");
+}
+
+void sdotest::printList(FILE *f, DataObjectPtr dp, const Property& p)
+{
+ DataObjectList& dobl = dp->getList(p);
+ fprintf(f," list ");
+
+ if (dobl.size() ==0) {
+ fprintf(f,"(empty)\n");
+ return;
+ }
+
+ for (unsigned int i=0;i<dobl.size();i++) {
+
+ switch (p.getTypeEnum())
+ {
+ case Type::BooleanType:
+ fprintf(f,"boolean[%d]=%d\n",i,dobl.getBoolean(i));
+ break;
+ case Type::ByteType:
+ fprintf(f,"byte[%d]=%d\n",i,dobl.getByte(i));
+ break;
+ case Type::CharacterType:
+ fprintf(f,"character[%d]=%d\n",i,dobl.getCharacter(i));
+ break;
+ case Type::IntegerType:
+ fprintf(f,"integer[%d]=%d\n",i,dobl.getInteger(i));
+ break;
+ case Type::ShortType:
+ fprintf(f,"short[%d]=%d",i, dobl.getShort(i));
+ break;
+ case Type::DoubleType:
+ fprintf(f,"double[%d]=%.3f\n",i,(float)dobl.getDouble(i));
+ break;
+ case Type::FloatType:
+ fprintf(f,"float[%d]=%.3f\n",i,dobl.getFloat(i));
+ break;
+ case Type::LongType:
+ fprintf(f,"long[%d]=%ld\n",i,dobl.getInteger(i));
+ break;
+ case Type::DateType:
+ fprintf(f,"date[%d]=%d\n",i,dobl.getDate(i).getTime());
+ break;
+ case Type::BigDecimalType:
+ case Type::BigIntegerType:
+ case Type::StringType:
+ case Type::UriType:
+ fprintf(f,"string[%d]=%s\n",i,dobl.getCString(i));
+ break;
+ case Type::BytesType:
+ fprintf(f,"bytes[%d]=%s\n",i,dobl.getCString(i));
+ break;
+ case Type::OpenDataObjectType:
+ case Type::DataObjectType:
+ {
+ fprintf(f,"dataObject[%d]=\n",i);
+ DataObjectPtr dob = dobl[i];
+ if (!dob)
+ {
+ fprintf(f," null or unset\n");
+ }
+ else
+ {
+ printDataObject(f, dob);
+ }
+ }
+ break;
+ case Type::OtherTypes:
+ case Type::ChangeSummaryType:
+ default:
+ {
+ fprintf(f,"Unknown object type\n");;
+ }
+ break;
+ }
+ fprintf(f,"\n");
+ }
+}
+
+void sdotest::printDataObject(FILE *f, DataObjectPtr dol)
+{
+ if (dol == 0) return;
+
+ if (dol->getType().isSequencedType())
+ {
+ fprintf(f,"===== Sequenced DataObject contents =====\n");
+ SequencePtr sq = dol->getSequence();
+ if (sq != 0)
+ {
+ for (unsigned int k=0;k<sq->size();k++)
+ {
+ if (sq->isText(k))
+ {
+ fprintf(f,"TEXT ELEMENT:%s\n",sq->getCStringValue(k));
+ }
+ else
+ {
+ const Property& p = sq->getProperty(k);
+ if (p.isMany())
+ {
+ unsigned int index = sq->getListIndex(k);
+ DataObjectList& dl = dol->getList(p);
+ if (p.getType().isDataType())
+ {
+ fprintf(f,"Setting of property %s[%d]=%s\n",
+ p.getName(),index,dl.getCString(index));
+ }
+ else
+ {
+ fprintf(f,"Setting of DO property %s[%d]=\n",
+ p.getName(),index);
+ printDataObject(f,dl.getDataObject(index));
+ }
+ }
+ else
+ {
+ if (p.getType().isDataType())
+ {
+ fprintf(f,"Setting of property %s=%s\n",
+ p.getName(),dol->getCString(p));
+ }
+ else
+ {
+ fprintf(f,"Setting of DO property %s=\n",
+ p.getName());
+ printDataObject(f,dol->getDataObject(p));
+ }
+ }
+ }
+ }
+ }
+ fprintf(f,"===== End Sequenced DataObject contents =\n");
+ }
+ else
+ {
+ fprintf(f,"===== DataObject contents =====\n");
+ PropertyList pl = dol->getInstanceProperties();
+
+ for (unsigned int j=0;j< pl.size(); j++)
+ {
+ fprintf(f,"%s:",pl[j].getName());
+ // this could be a many-valued property, and could be one which is
+ // a data object or a data type...
+ if (pl[j].isMany())
+ {
+ printList(f, dol,pl[j]);
+ }
+ else {
+ printValue(f, dol,pl[j]);
+ }
+ }
+ fprintf(f,"===== End DataObject =====\n");
+ }
+}
+
+
+
+void sdotest::dumpchangesummary(FILE *f, ChangeSummaryPtr cs)
+{
+
+ ChangedDataObjectList& cdol = cs->getChangedDataObjects();
+
+ // the changed data object list contains only the objects whose properties have
+ // been changed.
+ // a changed and subsequently deleted object will not appear, but necessarily its
+ // container will appear, so we can rebuild it.
+
+ for (unsigned int i=0;i< cdol.size();i++)
+ {
+ if (cs->isCreated(cdol[i]))
+ {
+ fprintf(f,"Created object in changed list\n");
+ // So its in the created list, it must exist in the tree...
+ fprintf(f,"The object is %s#%s\n",
+ cdol[i]->getType().getURI(),
+ cdol[i]->getType().getName());
+ }
+ if (cs->isModified(cdol[i]))
+ {
+ fprintf(f,"===== Modified Object Starts\n");
+ // get to a DAS data object...
+ DataObject* temp = cdol[i];
+ fprintf(f,"Xpath:%s\n",((DataObject*)temp)->objectToXPath());
+
+ if (cs->isDeleted(cdol[i]))
+ {
+ fprintf(f,"PROBLEM: DELETED OBJECT IN CHANGED LIST: \n");
+ // As the item is in the deleted list - its still present..
+ fprintf(f,"The type is %s#%s\n",
+ cdol[i]->getType().getURI(),
+ cdol[i]->getType().getName());
+ }
+ else {
+ fprintf(f,"The modified objects type is %s#%s\n",
+ cdol[i]->getType().getURI(),
+ cdol[i]->getType().getName());
+
+ printOldValues(f, cs, cdol[i]);
+ }
+ fprintf(f,"=====Modified Object Ends \n");
+ }
+ if (cs->isDeleted(cdol[i]))
+ {
+ fprintf(f,"=====Deleted Object Starts \n");
+ printOldValues(f, cs, cdol[i]);
+ fprintf(f,"=====Deleted Object Ends \n");
+ }
+ }
+}
+
+
+int sdotest::comparefiles(char* fn1, char*fn2)
+{
+ FILE *f1, *f2;
+ f1 = fopen(fn1,"r+");
+ if (f1 == 0)
+ {
+ if (!silent) cout << "Cannot open file:" << fn1 << endl;
+ return 0;
+ }
+ f2 = fopen(fn2,"r+");
+ if (f2 == 0)
+ {
+ if (!silent) cout << "Cannot open file:" << fn2 << endl;
+ if (ramping)
+ {
+ cout << "Creating it" << endl;
+ f2 = fopen(fn2,"w+");
+ if (f2 == 0)
+ {
+ cout << "Cannot ramp up - failed on " << fn2 << endl;
+ return 0;
+ }
+ int c;
+ do
+ {
+ c = fgetc(f1);
+ if (!feof(f1)) fputc(c,f2);
+ else break;
+ } while (1);
+ fclose(f1);
+ fclose(f2);
+ return 1;
+ }
+ else
+ {
+ fclose(f1);
+ return 0;
+ }
+ }
+
+ while (!feof(f1))
+ {
+ if (fgetc(f1) != fgetc(f2))
+ {
+ fclose(f1);
+ fclose(f2);
+ return 0;
+ }
+ }
+ fclose (f1);
+
+ if (!feof(f2))
+ {
+ fclose(f2);
+ return 0;
+ }
+
+ fclose(f2);
+ return 1;
+}
+
+
+int sdotest::printseq(FILE *f, SequencePtr sptr)
+{
+ fprintf(f, "======================================\n");
+ for (unsigned int i=0;i< sptr->size();i++)
+ {
+ try {
+ if (!sptr->isText(i))
+ {
+ const Property& prp = sptr->getProperty(i);
+ if (!strcmp(prp.getType().getName(),"Department"))
+ {
+ DataObjectPtr pdep = sptr->getDataObjectValue(i);
+ if (pdep != 0)
+ {
+ const char * cs = pdep->getCString("name");
+ if (cs != 0)
+ {
+ fprintf(f, "%s\n",cs);
+ }
+ else
+ {
+ fprintf(f," is empty \n");
+ }
+ }
+ }
+ else
+ {
+ const char* stx = sptr->getCStringValue(i);
+ if (stx != 0)
+ {
+ fprintf(f,"%s\n",stx);
+ }
+ else
+ {
+ fprintf(f," is empty \n");
+ }
+ }
+ }
+ else
+ {
+ const char* st = sptr->getCStringValue(i);
+ if (st != 0)
+ {
+ fprintf(f,"%s\n", st);
+ }
+ else
+ {
+ fprintf(f," is empty \n");
+ }
+ }
+ }
+ catch (SDOPropertyNotSetException)
+ {
+ if (!silent) cout << "WRONG - got a property not set exception!!!" << endl;
+ return 0;
+ }
+ }
+ fprintf(f, "======================================\n");
+ return 1;
+}
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_in.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_in.xml
new file mode 100644
index 0000000000..e897ece9c1
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_in.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+ <feed xmlns="http://www.w3.org/2005/Atom">
+ <title type="text">dive into mark</title>
+ <subtitle type="html">
+ A &lt;em&gt;lot&lt;/em&gt; of effort
+ went into making this effortless
+ </subtitle>
+ <updated>2005-07-31T12:29:29Z</updated>
+ <id>tag:example.org,2003:3</id>
+ <link rel="alternate" type="text/html" hreflang="en" href="http://example.org/"/>
+ <link rel="self" type="application/atom+xml" href="http://example.org/feed.atom"/>
+ <rights>Copyright (c) 2003, Mark Pilgrim</rights>
+ <generator uri="http://www.example.com/" version="1.0">
+ Example Toolkit
+ </generator>
+ <entry>
+ <title>Atom draft-07 snapshot</title>
+ <link rel="alternate" type="text/html" href="http://example.org/2005/04/02/atom"/>
+ <link rel="enclosure" type="audio/mpeg" length="1337" href="http://example.org/audio/ph34r_my_podcast.mp3"/>
+ <id>tag:example.org,2003:3.2397</id>
+ <updated>2005-07-31T12:29:29Z</updated>
+ <published>2003-12-13T08:29:29-04:00</published>
+ <author>
+ <name>Mark Pilgrim</name>
+ <uri>http://example.org/</uri>
+ <email>f8dy@example.com</email>
+ </author>
+ <contributor>
+ <name>Sam Ruby</name>
+ </contributor>
+ <contributor>
+ <name>Joe Gregorio</name>
+ </contributor>
+ <content type="xhtml" xml:lang="en" xml:base="http://diveintomark.org/">
+ <div xmlns="http://www.w3.org/1999/xhtml">
+ <p><i>[Update: The Atom draft is finished.]</i></p>
+ <div class="myclass"><p>Hello</p></div>
+ </div>
+ </content>
+ </entry>
+ </feed> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_out.txt b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_out.txt
new file mode 100644
index 0000000000..05f82bc258
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xhtml_out.txt
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom" xmlns:tns2="http://www.w3.org/1999/xhtml" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:tns="http://www.w3.org/2005/Atom">
+ <title type="text">dive into mark</title>
+ <subtitle type="html">
+ A <em>lot</em> of effort
+ went into making this effortless
+ </subtitle>
+ <updated>2005-07-31T12:29:29Z</updated>
+ <id>tag:example.org,2003:3</id>
+ <link href="http://example.org/" rel="alternate" type="text/html" hreflang="en"></link>
+ <link href="http://example.org/feed.atom" rel="self" type="application/atom+xml"></link>
+ <rights>Copyright (c) 2003, Mark Pilgrim</rights>
+ <generator uri="http://www.example.com/" version="1.0">
+ Example Toolkit
+ </generator>
+ <entry>
+ <title>Atom draft-07 snapshot</title>
+ <link href="http://example.org/2005/04/02/atom" rel="alternate" type="text/html"></link>
+ <link href="http://example.org/audio/ph34r_my_podcast.mp3" rel="enclosure" type="audio/mpeg" length="1337"></link>
+ <id>tag:example.org,2003:3.2397</id>
+ <updated>2005-07-31T12:29:29Z</updated>
+ <published>2003-12-13T08:29:29-04:00</published>
+ <author>
+ <name>Mark Pilgrim</name>
+ <uri>http://example.org/</uri>
+ <email>f8dy@example.com</email>
+ </author>
+ <contributor>
+ <name>Sam Ruby</name>
+ </contributor>
+ <contributor>
+ <name>Joe Gregorio</name>
+ </contributor>
+ <content type="xhtml" lang="en" base="http://diveintomark.org/">
+ <tns2:div xsi:type="tns2:div">
+ <tns2:p><tns2:i>[Update: The Atom draft is finished.]</tns2:i></tns2:p>
+ <tns2:div class="myclass"><tns2:p>Hello</tns2:p></tns2:div>
+ </tns2:div>
+ </content>
+ </entry>
+ </feed>
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract.xsd b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract.xsd
new file mode 100644
index 0000000000..51e11baf49
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract.xsd
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+
+
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+ <xsd:element name="abstract" type="abstractType"/>
+
+ <xsd:complexType name="abstractType" abstract="true"/>
+
+ <xsd:complexType name="concreteType">
+ <xsd:complexContent>
+ <xsd:extension base="abstractType">
+ <xsd:sequence minOccurs="0" maxOccurs="unbounded">
+ <xsd:element name="prop1" type="xsd:string"/>
+ </xsd:sequence>
+ </xsd:extension>
+ </xsd:complexContent>
+ </xsd:complexType>
+
+ <xsd:element name="X">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element ref="abstract"/>
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+</xsd:schema> \ No newline at end of file
diff --git a/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract_expected.xml b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract_expected.xml
new file mode 100644
index 0000000000..5bb847dcc3
--- /dev/null
+++ b/sdo-cpp/branches/sdo-cpp-pre2.1/runtime/core/test/xsiTypeAbstract_expected.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<X xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <abstract xsi:type="concreteType"/>
+</X>