Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Referencing Xsd Files in Other Project

Matthias BuckMay 3 2016 — edited May 3 2016

Hi all,

We've been working with Web Services in the Eclipse development environment and we have an extensive library of xsd schemas and wsdls that we use as our canonical model.

We want to reuse our canonical model in JDeveloper as well but we haven't found a good way to keep our library structure with relative paths so that one source can be used by both, Eclipse and JDeveloper.

(Note, we can't fully switch to JDeveloper at this point and we don't want to maintain two sets of libraries for the same objects)

These xsd and wsdl files are located in multiple projects which reference each other. For example, we have a customer library project that contains the customer object which references another library project, the common library, which contains an Address object. Customer -> Address

In Eclipse, we setup project references to allow one project to be able to reference the other using relative paths.

The Customer xsd, contains an import to the other xsd for reference because it contains an element of type Address.

<xsd:import schemaLocation="../../../bo/_2013/_11/Address.xsd"

Notice, the relative reference does not include the name of the Common Library because the files in this library are available to the Customer Library via project reference.

When we try to use these library projects in JDeveloper, the relative paths don't resolve to the files and we tried to add project dependencies (via Project / Properties / Dependencies) to achieve this. Unfortunately this doesn't work.

The only way we got this to work was to update the relative paths in the import statement by extending the relative path to go up higher in the directory structure and back down, using the Common Library name in the path. For the example I gave above, it would look like the following:

<xsd:import schemaLocation="../../../../../CommonLibrary/bo/_2013/_11/Address.xsd"


Unfortunately this is not an option since updating the relative paths would break the references for Eclipse.

If you happen to have any insights into how this can be done, we'd love to hear from you.

Thank you in advance.

-Matthias

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 31 2016
Added on May 3 2016
0 comments
260 views