Oracle SOA Suite Online Training

Interested in learning Oracle SOA Suite 12c?
Learn from the author of this blog!
A complete and comprehensive course on the #1 platform on SOA - Oracle SOA Suite

Click here to find the complete course details
Click here to check the first session on Oracle SOA Suite 12c


Error: Global element declaration/definition of name are duplicated at the following locations

Sometimes, your composite suddenly stopped working after you've started referring to a new xsd file - via a service/reference/component.

Your composite was getting deployed properly, and suddenly after few changes, it gets the following error

Error: Global element declaration/definition of name '{}part1' are duplicated at the following locations:


Error(80): query "/ns2:part1/ns2:firstName" is invalid, because Global element declaration/definition of 
name '{}part1' are duplicated at the following locations:

Sometimes, you get this error when your composite is working with more than one schema(xsd) files.

Reason for this is that if both the partname and the namespace are exactly same, then their definitions also have to be exactly same.

A simple scenario would be, if you are using one xsd in your composite and there is an other xsd being referred by one of the components/services/references in your composite. And lets say that both the xsd's have the same part name. In such cases, both the parts have to be exaclty same, even annotations in that part.

For example, in this composite, this is the xsd being used
And lets say one of the references/services in the composite is either using/referring to an xsd as below

If you observe these two schemas, and the corresponding source,
Both are having the same namespace as well as the part names(part1 in this case). But second xsd is having a different annotation
Thumb rule is that when the namespaces are the same and the part names are same, then the definitions for those parts across the xsd's should be exacly same.

Resolution to this is that, if you change the annotation of second xsd from "A sample element1" to "A sample element", the issue gets resolved.

 Hope this helps you. Cheers.

No comments:

Post a Comment