
Hi
I'm not sure what vkumar meant by 'connector source'. Are you referring to the 'Case' as the connector source?
I've followed vkumar's instructions, but, no matter where I put them, the tagged value values have no effect on the XSD generation. I've tried several different approaches (see below), but none of them worked. EA seems to completely ignore the tag values and stubbornly produces the following (incorrect) XSD:
<xs:complexType name="Case">
<xs:sequence>
<xs:element ref="Party" minOccurs="0"/>
<xs:element ref="Party" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
Ironically, I've not had the same problems in EA4.1, where it worked just fine, thank you very much.
I have to make a purchase decision next week and until I can get this to work, I won't be able to justify the purchase of EA to my boss, so I need to get this working.
Here's the context for my attempts:
1. EA Program Version: 5.00.767
Not Registered - 30 day trial version (I'm not going to buy the bloody tool if it doesn't do what its supposed to!)
2. I imported the XSD data types XMI in XSDDataTypes.xml (downloaded from Sparx Systems site)
3. I imported the UML Profile for XML from XSDProfile.xml (downloaded from Sparx Systems site)
4. I have created a package called 'Test', which I refer to as the parent package, below. This package contains two classes (Case and Party). The following two associations exist between case and party:
- Case-Party, where Party has a target role of 'company' and multiplicity '0..1', and
- Case-Party, where Party has a target role of 'applicant' and multiplitiy '0..1'.
Here's a list of my attempts. (To be certain that I was starting from a 'clean' version of EA, I re-installed the trial version of EA5 before doing anything.)
During Attempts 1 and 2 I used the 'Code Engineering' two-step approach - first I transformed the parent package and then I code generated the XSD from the XSD stereotyped sub-package generated by the code transform.
During Attempt 3, I used code generated to XSD directly from the parent package.
Attempt 1:
1. I used 'Transform Current Package' and selected XSD.
2. EA generated a sub-package with the expected XSD stereotype tags.
3. I added the following tags to the 'Case' class:
- anonymousRole (set to false), and
- anonymousType (set to true)
4. I used 'Code Engineering -> Generate XML Schema' to generate the XSD.
5. When I examined the generated XSD, it was the same, wrong schema (see above.)
6. I deleted the sub-package generated by 'Transform Current Package', deleted the parent package, saved the model and then re-created the parent package and its contents.
Attempt 2:
1. I used 'Transform Current Package' and selected XSD.
2. EA generated a sub-package with the expected XSD stereotype tags.
3. I added the following tags to this sub-package:
- anonymousRole (set to false), and
- anonymousType (set to true)
4. I used 'Code Engineering -> Generate XML Schema' to generate the XSD.
5. When I examined the generated XSD, it was the same, wrong schema (see above.)
6. I deleted the sub-package generated by 'Transform Current Package', deleted the parent package, saved the model and then re-created the parent package and its contents.
Attempt 3:
1. I added the following tags to the 'Case' class:
- anonymousRole (set to false), and
- anonymousType (set to true)
2. I used 'Code Engineering -> Generate XML Schema' to generate the XSD.
3. When I examined the generated XSD, it was the same, wrong schema (see above.)
4. I deleted the sub-package generated by 'Transform Current Package', deleted the parent package, saved the model and then re-created the parent package and its contents.
Attempt 4:
1. I added the following tags to the parent package ('Test'):
- anonymousRole (set to false), and
- anonymousType (set to true)
2. I used 'Code Engineering -> Generate XML Schema' to generate the XSD.
3. When I examined the generated XSD, it was the same, wrong schema (see above.)
4. I deleted the sub-package generated by 'Transform Current Package', deleted the parent package, saved the model and then re-created the parent package and its contents.
Regards
Kline