Appian Community
Site
Search
Sign In/Register
Site
Search
User
DISCUSS
LEARN
SUCCESS
SUPPORT
Documentation
AppMarket
More
Cancel
I'm looking for ...
State
Not Answered
Replies
4 replies
Subscribers
7 subscribers
Views
3358 views
Users
0 members are here
Share
More
Cancel
Related Discussions
Home
»
Discussions
»
General
How to properly include a CDT from a different namespace
Adel Ammari
over 7 years ago
Below is a sample CRT structure. What I have is an old CDT which is in an old namespace, and I am creating a new CDT in a new namespace, I would like to use the old cdt object from the old namespace in my new cdt but it is not working, please advise.
<xsd:schema
targetNamespace="new_CDT_Schema"
xmlns:types1="new_CDT_Schema" xmlns:types2="Old_CDT_Schema" xmlns:xsd="
www.w3.org/.../XMLSchema">
<xsd:include schemaLocation="{Old_CDT_Schema}Old_CDT.xsd"/>
<xsd:complexType name="New_CDT">
<xsd:sequence>
<xsd:element name="ID" type="xsd:int">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">
@Column(nullable=false)
@Id
@GeneratedValue
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="Sample" type="types2:Old_CDT">
<xsd:annotation>
<xsd:appinfo source="appian.jpa">
@Column(nul...
OriginalPostID-233415
Discussion posts and replies are publicly visible
0
Adel Ammari
over 7 years ago
...lable=true)
@ManyToOne(cascade=CascadeType.NONE)
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Adel Ammari
over 7 years ago
I get this error, attached:
- An error occurred while trying to save the type information to the primary data source. No types have been imported. Cause: The type {ucExchangeRates}UC_ExchangeRates is referenced, but is not defined in the XSD. (APNX-1-4050-002)
- XSD Parsing Message: XSD: The location '{ucExchangeRates}UC_ExchangeRates.xsd' may not resolve to something other than a schema (APNX-2-4047-000)
- XSD Parsing Message: XSD: Type reference 'ucExchangeRates#UC_ExchangeRates' is unresolved (APNX-2-4047-000)
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Stefan Helzle
A Score Level 3
over 7 years ago
I think it should work this way. But why not create the CDT in Appian, add the child element there, download the XSD and then add the annotations. This way you use Appian to get the import of the other CDT right.
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel
0
Adel Ammari
over 7 years ago
Thanks, this helped me find a solution, all i had to do is replace:
<xsd:include schemaLocation="{Old_CDT_Schema}Old_CDT.xsd"/>
with:
<xsd:import namespace="Old_CDT_Schema" schemaLocation="{Old_CDT_Schema}Old_CDT.xsd"/>
Cancel
Vote Up
0
Vote Down
Sign in to reply
Verify Answer
Cancel