How to: Resolve 'Load of wsdl with Message part element undefined in wsdl'

Because Oracle BPEL 10G does not have a as strong validation of BPEL processes as in Oracle 11G it is possible that 10G services which appeared in 10g syntactically correct fail to compile after migrating to 11G. One error which can occur is 'Error: Load of wsdl "{WSDL_A} with Message part element undefined in wsdl [{WSDL_B}] part name = parameters type = …" failed'.

The error is caused by a conflicting namespace in one of the imported WSDL or Schema files. This can be a WSDL or Schema directly imported in the composite.xml or a WSDL or Schema imported by another WSDL. The error is misleading, the root cause of the error will with any certainty not be in the reported file WSDL_A. When having more complex BPEL services with multiple partnerlinks it can be challenging to find the namespace conflict. Here a structured way to get to the source of the problem.

Open your composite.xml and start surrounding the first import with XML comment tags and make (Crtl-F9) your project in JDeveloper. (See fragment of composite.xml below) Repeat this step for all imports until the error does not show up in the compiler log window anymore.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<composite xmlns="http://xmlns.oracle.com/sca/1.0"
           xmlns:ui="http://xmlns.oracle.com/soa/designer/" mode="active"
           name="Poll_Queue" revision="2.0" state="on"
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <!--
    <import location="PutInErrorQueue_.wsdl"
            namespace="http://xmlns.oracle.com/pcbpel/adapter/file/PutInErrorQueue_/"/>
    -->
	<import location="GetStatus.wsdl"
            namespace="http://xmlns.oracle.com/pcbpel/adapter/db/GetStatus"/>
    <import location="DeleteMe.wsdl"
            namespace="http://xmlns.oracle.com/pcbpel/adapter/db/DeleteMe/"/>
	<import location="Poll_Messages.wsdl"
            namespace="http://xmlns.oracle.com/pcbpel/adapter/file/Poll_Messages/"/>
	...
	<service name="....

The source of the error is now somewhere in the file assigned to the location attribute of the last import element placed between comment elements. When in the example above, the error is not reported anymore after placing the last import statement between comment elements, the root-cause is in Poll_Messages.wsdl file. Now uncomment all import statements from the composite.xml and open the file specified in the location attribute of the last commented import statement.

Repeat the process again for all imports of WSDL files or Schema types of the just opened file. When the error is no longer being displayed in the Compiler Log of JDeveloper after a make you are one step further to the source of the problem. Repeat this step when the last commented import statement was an import of another WSDL, otherwise open the schema file of the imported type. In the example file below, Poll_Messages.wsdl, the compilation was successful after placing the import of the DeleteMe.xsd schema file between comments.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?binding.jca Poll_Messages_file.jca?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
            ....
             targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/file/Poll_Messages/">

    <plt:partnerLinkType name="ReadMe_plt">
        <plt:role name="ReadMe_role">
            <plt:portType name="tns:ReadMe_ptt"/>
        </plt:role>
    </plt:partnerLinkType>
    <!--
    <import location="http://somewhere.company.com:7777/orabpel/default/SchemaRepository/1.0/Exceptions.wsdl"
            namespace="http://integration.company.com/exceptions/1.0"/>
	-->
    <types>
	    ...
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:import namespace="http://somewhere.company.com/esb/rompa/deleteme1.0"
                        schemaLocation="From-delete.xsd"/>
        </xsd:schema>
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:import namespace="http://somewhere.company.com/esb/rompa/updateme/1.0"
                        schemaLocation="From-update.xsd"/>
        </xsd:schema>
		<!--
        <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
            <xsd:import namespace="http://somewhere.company.com/esb/pma/deleteme/1.0"
                        schemaLocation="DeleteMe.xsd"/>
        </xsd:schema>
		-->
    </types>
	...

When verifying the namespace of the schema import and the targetnamespace the URIs probably (certainly) will not match. Correct this by equalizing the namespace URIs. The example below of file DeleteMe.xsd shows no targetNamespace URI, while it is imported in DeleteMe.xsd with namespace http://somewhere.company.com/esb/pma/deleteme/1.0 something which does not result in errors on Oracle BPEL 10g. It can simply be fixed by adding the targetnamespace http://somewhere.company.com/esb/pma/deleteme/1.0 to the DeleteMe.xsd file.
	<?xml version="1.0" encoding="UTF-8" standalone="no"?>
	<schema xmlns="http://www.w3.org/2001/XMLSchema"
        xmlns:ns2="http://somewhere.company.com/esb/pma/deleteme1.0"
        attributeFormDefault="qualified" elementFormDefault="qualified">
	<element name="DeleteMe">
    <complexType>
	....

blog comments powered by Disqus