Oracle SOA Suite Composite Deployment - Global Type declaration/definition of name *are duplicated - Part1
Sometimes we used to get the below error message while deploying the composites to theOracle SOA Suite server.oracle.fabric.common.wsdl.XSDException: Global element declaration/definition of name '{http://xmlns.oracle.com/GlobalDeclaration/employee}Employee' are duplicated at the following locations:
http://localhost:8000/soa-infra/services/default/EmployeeServer/employeeserver_client_ep?XSD=xsd/EmployeeServer.xsd
[line#: 4]
http://localhost:8000/soa-infra/services/default/EmployeeServer/xsd/EmployeeServer.xsd
[line#: 3]
file:/reuters/shared/11g/software/soa_deploy/code/Utilities/EmployeeClient/xsd/EmployeeClient.xsd
[line#: 6]
There are at
least two of them looking different:
http://localhost:8000/soa-infra/services/default/EmployeeServer/employeeserver_client_ep?XSD=xsd/EmployeeServer.xsd
[difference starting at line#:7]
file:/reuters/shared/11g/software/soa_deploy/code/Utilities/EmployeeClient/xsd/EmployeeClient.xsd
[difference starting at line#:9]
The exception states the
definition of the element Employee with the names spaces
“http://xmlns.oracle.com/GlobalDeclaration/employee” differs in the following
location.
file:/code/Utilities/EmployeeClient/xsd/EmployeeClient.xsd
I am having two composites EmployeeClient and EmployeeServer,
EmployeeClient invokes EmployeeServer via parnerlink, EmployeeClient and
EmployeeServer composites are defined with the following xsd’s
EmployeeClient/EmployeeClient.xsd:
<?xml
version="1.0" encoding="UTF-8"?>
<schema
attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/GlobalDeclaration/employee"
xmlns="http://www.w3.org/2001/XMLSchema">
<element
name="Employee">
<complexType>
<sequence>
<element
name="empid" type="string"/>
</sequence>
</complexType>
</element>
</schema>
EmployeeServer/EmployeeServer.xsd:
<?xml
version="1.0" encoding="UTF-8"?>
<schema
attributeFormDefault="unqualified"
elementFormDefault="qualified"
targetNamespace="http://xmlns.oracle.com/GlobalDeclaration/employee"
xmlns="http://www.w3.org/2001/XMLSchema">
<element name="Employee">
<complexType>
<sequence>
<element
name="empid" type="string"/>
<element name="empname" type="string"/>
<element name="contactno" type="string"/>
<element name="state" type="string"/>
</sequence>
</complexType>
</element>
</schema>
Both the schemas are defined
with same namespace (http://xmlns.oracle.com/GlobalDeclaration/employee) and has
the same element name (Employee) but different contents (first schema has one
element defined inside Employee but second schema has 4 elements) so that the
compilation failed.
If two schemas defined in same
namespace then SOA expects the definition of the elements with the same name (e.g.
Employee) should be identical including the annotations and documentations.
There are three solutions to overcome this issue:
- Match the xsd definition of Employee element in EmployeeClient.xsd with the content of Employee element from EmployeeServer.xsd.
- Change the Employee element name in EmployeeClient .xsd to something else.
- Change the target namespace of the schema EmployeeClient.xsd to something else other than http://xmlns.oracle.com/GlobalDeclaration/employee".
Thank you for this blog entry. You made my day.
ReplyDeleteHi Albin......
ReplyDeleteThank you for this blog entry..
Kindly suggests me how can we integrate SOA with Microsoft share point. what are the adapters required?
Hi
DeleteI never tried integrating SOA with Microsoft SharePoint but i know Microsoft SharePoint exposes all its operations as a webservice.
You can try consuming the corresponding wsdls in the soa and invoke the the required operations.
Refer the following url for the details on Microsoft SharePoint wsdls -
http://msdn.microsoft.com/en-us/library/ms479390(v=office.12).aspx
Regards
Albin I
thank you Albin.
DeleteCan we create web service with out ISG(integrated SOA gateway),
Is there any differences between SOA and ISG in E-Business suite..
ISG is a SOA platform as part of E-Business suite, it will help E-Business Suite to expose the web service and integrate with different applications. ISG is build on top of Oracle Fusion Middleware and service-oriented architecture (SOA) technology.
DeleteThere is a standalone integration product Oracle SOA Suite, this will help as to integrate discrete applications through web services and different adapters.
Regards
Albin I
very good article, this occurs due to xsd in mds and server are not same.
ReplyDelete