Thursday, October 14, 2010

"Failed to open source schema" when migrating ESB 10g project to Mediator 11g

Problem:

We migrated an ESB 10g project successfully to 11g, and all routing rules were migrated successfully. However, when we tried creating a mapper (i.e., xsl) file, we received the following error through JDeveloper.
Failed to open the source schema:
Duplicated definition for: 'SystemIDType'
Duplicated definition for: 'ActionCodeType'
Duplicated definition for: 'DataEventCodeType'
Duplicated definition for: 'PriceTypeCodeType'
Investigation:

When opening up the mapper file, the left hand side had the following mapping source:

<mapSources>
<source type="WSDL">
<schema location="http://namespaceserver/AIAComponents/ApplicationObjectLibrary/MyApp/Address/CreateAddressReqABCSImpl.wsdl"/>
<rootElement name="CreateAddressBookEntry" namespace="http://ns.ipnweb.com/MyApp/AddressService/20090101"/>
</source>
</mapSources>

The right hand side had the following:

<mapTargets>
<target type="WSDL">
<schema location="http://soa11gserver:8001/soa-infra/services/EBS/CustomerPartyEBS/CustomerPartyEBS_ep?WSDL"/>
<rootElement name="CreateCustomerPartySyncEBM" namespace="http://xmlns.oracle.com/EnterpriseObjects/Core/EBO/CustomerParty/V2"/>
</target>
</mapTargets>

There was nothing syntactically wrong the XSL file. We kept traversing down the tree, looking for issues with any of our imported WSDLs and XSDs. It turned out that one of the XSDs was missing a rather critical tag.

Resolution:

On of our imported schemas was missing the following tag from the top:
<?xml version="1.0" encoding="utf-8" ?>
We added the tag, pushed out the schema to our namespace server, and the issue was resolved.

No comments: