You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Surinder Pal Singh Bindra (JIRA)" <tu...@ws.apache.org> on 2008/03/18 12:41:24 UTC

[jira] Created: (TUSCANY-2098) Bidirectional properties are not working in XSD2JavaGenerator

Bidirectional properties are not working in XSD2JavaGenerator
-------------------------------------------------------------

                 Key: TUSCANY-2098
                 URL: https://issues.apache.org/jira/browse/TUSCANY-2098
             Project: Tuscany
          Issue Type: Bug
          Components: Java SDO Tools
    Affects Versions: Java-SDO-1.0
            Reporter: Surinder Pal Singh Bindra
            Priority: Blocker


Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.

<xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
    xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
    xmlns:lib="http://www.generated.example.sdo.org/Library"
    sdoJava:package="org.sdo.example.generated.library">
    
	<xsd:complexType name="Book">			
		<xsd:sequence>
		    <xsd:element name="title" type="xsd:string"/>
			<xsd:element name="pages" type="xsd:int"/>
			<xsd:element name="category" type="lib:BookCategory"/>
			<xsd:element name="author" type="xsd:IDREF" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Writer">		
		<xsd:sequence>
		    <xsd:element name="name" type="xsd:string"/>
			<xsd:element name="books" type="xsd:IDREFS" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Library">	    
		<xsd:sequence>	
            <xsd:element name="name" type="xsd:string"/>		
			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="BookCategory">
		<xsd:restriction base="xsd:NCName">
			<xsd:enumeration value="Mystery"/>
			<xsd:enumeration value="ScienceFiction"/>
			<xsd:enumeration value="Biography"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-2098) Bidirectional properties are not working in XSD2JavaGenerator

Posted by "Surinder Pal Singh Bindra (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Surinder Pal Singh Bindra updated TUSCANY-2098:
-----------------------------------------------

    Attachment:     (was: library.xsd)

> Bidirectional properties are not working in XSD2JavaGenerator
> -------------------------------------------------------------
>
>                 Key: TUSCANY-2098
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2098
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0
>            Reporter: Surinder Pal Singh Bindra
>            Priority: Blocker
>         Attachments: library.xsd, libraryDataGraphGenerated.xml, SdoClient.java
>
>
> Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
>     xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
>     xmlns:lib="http://www.generated.example.sdo.org/Library"
>     sdoJava:package="org.sdo.example.generated.library">
>     
> 	<xsd:complexType name="Book">			
> 		<xsd:sequence>
> 		    <xsd:element name="title" type="xsd:string"/>
> 			<xsd:element name="pages" type="xsd:int"/>
> 			<xsd:element name="category" type="lib:BookCategory"/>
> 			<xsd:element name="author" type="lib:Writer" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Writer">		
> 		<xsd:sequence>
> 		    <xsd:element name="name" type="xsd:string"/> 
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Library">	    
> 		<xsd:sequence>	
>             <xsd:element name="name" type="xsd:string"/>		
> 			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:simpleType name="BookCategory">
> 		<xsd:restriction base="xsd:NCName">
> 			<xsd:enumeration value="Mystery"/>
> 			<xsd:enumeration value="ScienceFiction"/>
> 			<xsd:enumeration value="Biography"/>
> 		</xsd:restriction>
> 	</xsd:simpleType>
> </xsd:schema>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-2098) Bidirectional properties are not working in XSD2JavaGenerator

Posted by "Surinder Pal Singh Bindra (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Surinder Pal Singh Bindra updated TUSCANY-2098:
-----------------------------------------------

    Attachment: SdoClient.java
                libraryDataGraphGenerated.xml
                library.xsd

> Bidirectional properties are not working in XSD2JavaGenerator
> -------------------------------------------------------------
>
>                 Key: TUSCANY-2098
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2098
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0
>            Reporter: Surinder Pal Singh Bindra
>            Priority: Blocker
>         Attachments: library.xsd, library.xsd, libraryDataGraphGenerated.xml, SdoClient.java
>
>
> Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
>     xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
>     xmlns:lib="http://www.generated.example.sdo.org/Library"
>     sdoJava:package="org.sdo.example.generated.library">
>     
> 	<xsd:complexType name="Book">			
> 		<xsd:sequence>
> 		    <xsd:element name="title" type="xsd:string"/>
> 			<xsd:element name="pages" type="xsd:int"/>
> 			<xsd:element name="category" type="lib:BookCategory"/>
> 			<xsd:element name="author" type="lib:Writer" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Writer">		
> 		<xsd:sequence>
> 		    <xsd:element name="name" type="xsd:string"/> 
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Library">	    
> 		<xsd:sequence>	
>             <xsd:element name="name" type="xsd:string"/>		
> 			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:simpleType name="BookCategory">
> 		<xsd:restriction base="xsd:NCName">
> 			<xsd:enumeration value="Mystery"/>
> 			<xsd:enumeration value="ScienceFiction"/>
> 			<xsd:enumeration value="Biography"/>
> 		</xsd:restriction>
> 	</xsd:simpleType>
> </xsd:schema>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Reopened: (TUSCANY-2098) Bidirectional properties are not working in XSD2JavaGenerator

Posted by "Surinder Pal Singh Bindra (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Surinder Pal Singh Bindra reopened TUSCANY-2098:
------------------------------------------------


Hi Kelvin Goodson ,
  Looks like even dynamic SDO api's do not work in this case. I am attaching the client code, the schema file and the generated xml file. Just notice that new book is not getting appended at the books node under  library node, but it is getting added under author node.


> Bidirectional properties are not working in XSD2JavaGenerator
> -------------------------------------------------------------
>
>                 Key: TUSCANY-2098
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2098
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0
>            Reporter: Surinder Pal Singh Bindra
>            Priority: Blocker
>         Attachments: library.xsd
>
>
> Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
>     xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
>     xmlns:lib="http://www.generated.example.sdo.org/Library"
>     sdoJava:package="org.sdo.example.generated.library">
>     
> 	<xsd:complexType name="Book">			
> 		<xsd:sequence>
> 		    <xsd:element name="title" type="xsd:string"/>
> 			<xsd:element name="pages" type="xsd:int"/>
> 			<xsd:element name="category" type="lib:BookCategory"/>
> 			<xsd:element name="author" type="lib:Writer" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Writer">		
> 		<xsd:sequence>
> 		    <xsd:element name="name" type="xsd:string"/> 
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Library">	    
> 		<xsd:sequence>	
>             <xsd:element name="name" type="xsd:string"/>		
> 			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:simpleType name="BookCategory">
> 		<xsd:restriction base="xsd:NCName">
> 			<xsd:enumeration value="Mystery"/>
> 			<xsd:enumeration value="ScienceFiction"/>
> 			<xsd:enumeration value="Biography"/>
> 		</xsd:restriction>
> 	</xsd:simpleType>
> </xsd:schema>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-2098) Bidirectional properties are not working in XSD2JavaGenerator

Posted by "Surinder Pal Singh Bindra (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Surinder Pal Singh Bindra updated TUSCANY-2098:
-----------------------------------------------

    Attachment: XmlDMSImpl.java
                XmlDMS.java

> Bidirectional properties are not working in XSD2JavaGenerator
> -------------------------------------------------------------
>
>                 Key: TUSCANY-2098
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2098
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0
>            Reporter: Surinder Pal Singh Bindra
>            Priority: Blocker
>         Attachments: library.xsd, libraryDataGraphGenerated.xml, SdoClient.java, XmlDMS.java, XmlDMSImpl.java
>
>
> Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
>     xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
>     xmlns:lib="http://www.generated.example.sdo.org/Library"
>     sdoJava:package="org.sdo.example.generated.library">
>     
> 	<xsd:complexType name="Book">			
> 		<xsd:sequence>
> 		    <xsd:element name="title" type="xsd:string"/>
> 			<xsd:element name="pages" type="xsd:int"/>
> 			<xsd:element name="category" type="lib:BookCategory"/>
> 			<xsd:element name="author" type="lib:Writer" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Writer">		
> 		<xsd:sequence>
> 		    <xsd:element name="name" type="xsd:string"/> 
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Library">	    
> 		<xsd:sequence>	
>             <xsd:element name="name" type="xsd:string"/>		
> 			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:simpleType name="BookCategory">
> 		<xsd:restriction base="xsd:NCName">
> 			<xsd:enumeration value="Mystery"/>
> 			<xsd:enumeration value="ScienceFiction"/>
> 			<xsd:enumeration value="Biography"/>
> 		</xsd:restriction>
> 	</xsd:simpleType>
> </xsd:schema>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-2098) Bidirectional properties are not working in XSD2JavaGenerator

Posted by "Surinder Pal Singh Bindra (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Surinder Pal Singh Bindra updated TUSCANY-2098:
-----------------------------------------------

    Description: 
Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
    xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
    xmlns:lib="http://www.generated.example.sdo.org/Library"
    sdoJava:package="org.sdo.example.generated.library">
    
	<xsd:complexType name="Book">			
		<xsd:sequence>
		    <xsd:element name="title" type="xsd:string"/>
			<xsd:element name="pages" type="xsd:int"/>
			<xsd:element name="category" type="lib:BookCategory"/>
			<xsd:element name="author" type="lib:Writer" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Writer">		
		<xsd:sequence>
		    <xsd:element name="name" type="xsd:string"/> 
			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Library">	    
		<xsd:sequence>	
            <xsd:element name="name" type="xsd:string"/>		
			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="BookCategory">
		<xsd:restriction base="xsd:NCName">
			<xsd:enumeration value="Mystery"/>
			<xsd:enumeration value="ScienceFiction"/>
			<xsd:enumeration value="Biography"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>


  was:
Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.

<xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
    xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
    xmlns:lib="http://www.generated.example.sdo.org/Library"
    sdoJava:package="org.sdo.example.generated.library">
    
	<xsd:complexType name="Book">			
		<xsd:sequence>
		    <xsd:element name="title" type="xsd:string"/>
			<xsd:element name="pages" type="xsd:int"/>
			<xsd:element name="category" type="lib:BookCategory"/>
			<xsd:element name="author" type="xsd:IDREF" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Writer">		
		<xsd:sequence>
		    <xsd:element name="name" type="xsd:string"/>
			<xsd:element name="books" type="xsd:IDREFS" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
		</xsd:sequence>
	</xsd:complexType>
	<xsd:complexType name="Library">	    
		<xsd:sequence>	
            <xsd:element name="name" type="xsd:string"/>		
			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
		</xsd:sequence>
	</xsd:complexType>
	<xsd:simpleType name="BookCategory">
		<xsd:restriction base="xsd:NCName">
			<xsd:enumeration value="Mystery"/>
			<xsd:enumeration value="ScienceFiction"/>
			<xsd:enumeration value="Biography"/>
		</xsd:restriction>
	</xsd:simpleType>
</xsd:schema>



> Bidirectional properties are not working in XSD2JavaGenerator
> -------------------------------------------------------------
>
>                 Key: TUSCANY-2098
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2098
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0
>            Reporter: Surinder Pal Singh Bindra
>            Priority: Blocker
>
> Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
>     xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
>     xmlns:lib="http://www.generated.example.sdo.org/Library"
>     sdoJava:package="org.sdo.example.generated.library">
>     
> 	<xsd:complexType name="Book">			
> 		<xsd:sequence>
> 		    <xsd:element name="title" type="xsd:string"/>
> 			<xsd:element name="pages" type="xsd:int"/>
> 			<xsd:element name="category" type="lib:BookCategory"/>
> 			<xsd:element name="author" type="lib:Writer" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Writer">		
> 		<xsd:sequence>
> 		    <xsd:element name="name" type="xsd:string"/> 
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Library">	    
> 		<xsd:sequence>	
>             <xsd:element name="name" type="xsd:string"/>		
> 			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:simpleType name="BookCategory">
> 		<xsd:restriction base="xsd:NCName">
> 			<xsd:enumeration value="Mystery"/>
> 			<xsd:enumeration value="ScienceFiction"/>
> 			<xsd:enumeration value="Biography"/>
> 		</xsd:restriction>
> 	</xsd:simpleType>
> </xsd:schema>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Updated: (TUSCANY-2098) Bidirectional properties are not working in XSD2JavaGenerator

Posted by "Surinder Pal Singh Bindra (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Surinder Pal Singh Bindra updated TUSCANY-2098:
-----------------------------------------------

    Attachment: library.xsd

> Bidirectional properties are not working in XSD2JavaGenerator
> -------------------------------------------------------------
>
>                 Key: TUSCANY-2098
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2098
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0
>            Reporter: Surinder Pal Singh Bindra
>            Priority: Blocker
>         Attachments: library.xsd
>
>
> Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
>     xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
>     xmlns:lib="http://www.generated.example.sdo.org/Library"
>     sdoJava:package="org.sdo.example.generated.library">
>     
> 	<xsd:complexType name="Book">			
> 		<xsd:sequence>
> 		    <xsd:element name="title" type="xsd:string"/>
> 			<xsd:element name="pages" type="xsd:int"/>
> 			<xsd:element name="category" type="lib:BookCategory"/>
> 			<xsd:element name="author" type="lib:Writer" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Writer">		
> 		<xsd:sequence>
> 		    <xsd:element name="name" type="xsd:string"/> 
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Library">	    
> 		<xsd:sequence>	
>             <xsd:element name="name" type="xsd:string"/>		
> 			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:simpleType name="BookCategory">
> 		<xsd:restriction base="xsd:NCName">
> 			<xsd:enumeration value="Mystery"/>
> 			<xsd:enumeration value="ScienceFiction"/>
> 			<xsd:enumeration value="Biography"/>
> 		</xsd:restriction>
> 	</xsd:simpleType>
> </xsd:schema>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org


[jira] Resolved: (TUSCANY-2098) Bidirectional properties are not working in XSD2JavaGenerator

Posted by "Kelvin Goodson (JIRA)" <tu...@ws.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-2098?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kelvin Goodson resolved TUSCANY-2098.
-------------------------------------

    Resolution: Duplicate

Surinder,  you have uncovered a known problem.  It was reported in https://issues.apache.org/jira/browse/TUSCANY-1725
Unfortunately we haven't been able to tackle it yet.    However,  I think if you wanted to try to get your schema running using dynamic SDO you would need to add some xsd:ID properties to Writer and Book.  I put up an example of this kind of thing the other day,  see  http://www.mail-archive.com/tuscany-user@ws.apache.org/msg02626.html

Is there a chance you might be able to help us fix TUSCANY-1725?

> Bidirectional properties are not working in XSD2JavaGenerator
> -------------------------------------------------------------
>
>                 Key: TUSCANY-2098
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2098
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SDO Tools
>    Affects Versions: Java-SDO-1.0
>            Reporter: Surinder Pal Singh Bindra
>            Priority: Blocker
>         Attachments: library.xsd
>
>
> Bidirectional relations seems to be broken in XSD2JavaGenerator. It generates code which can't be compiled. Here is the sample schema.
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema targetNamespace="http://www.generated.example.sdo.org/Library" 
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sdoXML="commonj.sdo/xml" 
>     xmlns:sdoJava="commonj.sdo/java" xmlns:sdo="commonj.sdo" 
>     xmlns:lib="http://www.generated.example.sdo.org/Library"
>     sdoJava:package="org.sdo.example.generated.library">
>     
> 	<xsd:complexType name="Book">			
> 		<xsd:sequence>
> 		    <xsd:element name="title" type="xsd:string"/>
> 			<xsd:element name="pages" type="xsd:int"/>
> 			<xsd:element name="category" type="lib:BookCategory"/>
> 			<xsd:element name="author" type="lib:Writer" sdoXML:oppositeProperty="books" sdoXML:propertyType="lib:Writer"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Writer">		
> 		<xsd:sequence>
> 		    <xsd:element name="name" type="xsd:string"/> 
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" sdoXML:oppositeProperty="author" sdoXML:propertyType="lib:Book"/>
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:complexType name="Library">	    
> 		<xsd:sequence>	
>             <xsd:element name="name" type="xsd:string"/>		
> 			<xsd:element name="writers" type="lib:Writer" minOccurs="0" maxOccurs="unbounded" />
> 			<xsd:element name="books" type="lib:Book" minOccurs="0" maxOccurs="unbounded" />
> 		</xsd:sequence>
> 	</xsd:complexType>
> 	<xsd:simpleType name="BookCategory">
> 		<xsd:restriction base="xsd:NCName">
> 			<xsd:enumeration value="Mystery"/>
> 			<xsd:enumeration value="ScienceFiction"/>
> 			<xsd:enumeration value="Biography"/>
> 		</xsd:restriction>
> 	</xsd:simpleType>
> </xsd:schema>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-dev-help@ws.apache.org