Troubleshooting
Problem
If there are two or more WSDL files which have the same namespace, they cannot both be used within the same BPEL process. This will result in an error ("Duplicate key value").
Cause
The usage of two or more WSDL files which have the same namespace results in two or more imports in the Artifacts WSDL for the same namespace such as the following:
<import location="MyInterface1.wsdl" namespace=" http://MyModule/MyInterface"/> |
Resolving The Problem
There are two workarounds available to solve this problem.
The following steps provide the first workaround for this problem:
- Find the Artifacts WSDL by selecting the process in the Business Integration view and selecting Show Files. The Physical Resources view opens.
- From here, it shows that the error is connected with the MyProcessArtifacts.wsdl. Create a copy of that WSDL (for example, call it MyProcessArtifacts2.wsdl). The resulting errors can be ignored, they will disappear later.
- Open both WSDLs with the text editor. The content is similar to this one:
- Modify the original WSDL so that it only contains the partnerLinkType(s) for the process (here it is marked in blue) and the partnerLinkType for the first portType (here it is marked in green). Ensure that the needed import stays with the partnerLinkType. The resulting MyProcessArtifacts.wsdl should look like the following:
- Modify the copy so that it only contains the second partnerLinkType. If needed, remove the namespace marked in red. It is the one for the process portType which have been removed from the copy:
- Open the BPEL with the text editor. Search for the filename of the original Artifacts WSDL. This should be referenced in the import by the location attribute:
- Duplicate this import and adapt the filename to the one of the copied WSDL:
- Save these change and rebuild the workspace.
![]() |
![]() |
![]() |
<bpws:import importType="http://schemas.xmlsoap.org/wsdl/" location="MyProcessArtifacts.wsdl" namespace="http://MyModule/MyProcessArtifacts"/> |
<bpws:import importType="http://schemas.xmlsoap.org/wsdl/" location="MyProcessArtifacts2.wsdl" namespace="http://MyModule/MyProcessArtifacts"/> |
Note: In contrast to WSDL 1.1, BPEL does allow multiple imports with the same value for the namespace attribute. Therefore, changing the targetnamespace of the copied WSDL and the namespace attribute in this step duplicated import in the BPEL is NOT required. |
The following steps provide the second workaround for this problem:
Note: This workaround should only be used when you are allowed to change one of the WSDLs, in this case MyInterface1.wsdl. The Artifacts WSDL is generated by WebSphere Integration Developer and can be changed to fix this problem. The other two (or multiple) WSDLs can be imported from existing Web services/applications and you might not be able to change them.
- Find the Artifacts WSDL by selecting the process in the Business Integration view and selecting Show Files. The Physical Resources view opens.
- From here, it shows that the error is connected with the MyProcessArtifacts.wsdl. Open this WSDL with the text editor. The content is similar to this one:
- Find one of the imported WSDLs referenced in one of the problematic imports, in this case either MyInterface1.wsdl (marked in green) or MyInterface2.wsdl (marked in pink).
- Open this WSDL with the text editor, for example, MyInterface1.wsdl.
- From the MyProcessArtifacts.wsdl, copy and remove, or just cut, the import for the unopened WSDL (in this case, the import for MyInterface2.wsdl) and paste it at the end of MyInterface1.wsdl, before the
</wsdl:definitions>
end tag. If needed, add thewsdl:
prefix to the import. The resulting MyInterface1.wsdl should look like the following:
- Save these changes and rebuild the workspace.
![]() |
![]() |
This solution is referred to as the chaining of WSDLs. In case you have multiple WSDLs, ensure that they import each other in a chain, where the Artifacts WSDL only imports the WSDL which is at the end of the chain, meaning that all other WSDLs can be found following the chain. |
Was this topic helpful?
Document Information
More support for:
WebSphere Integration Developer
Software version:
6.1.2, 6.1.0.1, 6.1, 6.0.2.2, 6.0.2, 6.0.1.2, 6.0.1.1, 6.0.1, 6.0
Operating system(s):
Linux, Windows
Document number:
346991
Modified date:
15 June 2018
UID
swg21231969