About cookies on this site Our websites require some cookies to function properly (required). In addition, other cookies may be used with your consent to analyze site usage, improve the user experience and for advertising. For more information, please review your options. By visiting our website, you agree to our processing of information as described in IBM’sprivacy statement. To provide a smooth navigation, your cookie preferences will be shared across the IBM web domains listed here.
Troubleshooting
Problem
The Error "WSDL: The X element referenced by the Y part cannot be resolved" will show in the WSDL editor of IBM Rational Software Architect after running the UML-to-WSDL transformation with a global complexType if the user has specified "tns" in the Schema TargetNamespacePrefix" of the source xsd model.
Symptom
Steps to reproduce:
1. Create a model called XSD Model to which you import the XSD Model Library
2. Add a package called test to the model
3. Apply the XSD transformation profile to the model
4. Apply the stereotype schema to the package testSchema
5. Add a class testGlobalComplexType to the package testSchema, to which you apply the stereotypes
<<complexType>>
and <<global>>
. Then add an attribute test of type XSDDataTypes::XSDDataTypes::string</code>]
6. Go the the package testSchema shcema stereotype property and add the tns to the schema
TargetNamespacePrefix property
7. Save the model
8. Create a model pacakge called TestService
9. Add to the model a package called com
10 Add an interface called phonebookInterface with the stereotype serviceSpecification
11. Add an operation testOp to the interface with an in parameter aParam of type
testGlobalComplexType
12. Create a UML-to-WSDL transformation with the default options selecting PhonebookInterfaceModel
as the source and a project where resides the model as the target.
13. Run the transformation and the following is generated
Actual Result:
The com.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="
http://com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
name="com" targetNamespace=["http://com/">
<wsdl:import location="../test/test.xsd" namespace="
http://test/" />
<wsdl:types>
<xsd:schema targetNamespace="
http://com/" />
</wsdl:types>
<wsdl:message name="phonebookInterfacetestopRequest">
<wsdl:part element="test" name="aParam" />
</wsdl:message>
<wsdl:portType name="phonebookInterface">
<wsdl:operation name="testop">
<wsdl:input message="tns:phonebookInterfacetestopRequest" />
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
The test.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:tns="
http://test/" targetNamespace="http://test/">
<xsd:element name="test" type="xsd:string" />
</xsd:schema>
The wsdl editor gives you an error saying "The test element referenced by the aParam part cannot be resolved " as shown below:
Expected Result:
The com.wsdl
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="
http://com/"
xmlns:wsdl_1="
http://test/"
xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
name="com" targetNamespace="http://com/">
<wsdl:import location="../test/test.xsd" namespace="
http://test/" />
<wsdl:types>
<xsd:schema targetNamespace="
http://com/" />
</wsdl:types>
<wsdl:message name="phonebookInterfacetestopRequest">
<wsdl:part element="wsdl_1:test" name="aParam" />
</wsdl:message>
<wsdl:portType name="phonebookInterface">
<wsdl:operation name="testop">
<wsdl:input message="tns:phonebookInterfacetestopRequest" />
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
The test.xsd
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd="
http://www.w3.org/2001/XMLSchema"
xmlns:tns="
http://test/" targetNamespace="http://test/">
<xsd:element name="test" type="xsd:string" />
</xsd:schema>
Cause
This issue has been identified as a product defect and has been logged as a Authorized Program Analysis Report (APAR) PK89247.
Diagnosing The Problem
The following is a screenshot of the error:

Resolving The Problem
To resolve the issue:
1. Go the the package testSchema schema stereotype property
2. Remove tns from the schema TargetNamespacePrefix property or add another string such as xd1 to the schema TargetNamespacePrefix property
[{"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Web Services Development","Platform":[{"code":"PF016","label":"Linux"}],"Version":"7.5;7.5.1;7.5.2;7.5.3","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}},{"Product":{"code":"SS4JE2","label":"Rational Software Architect Standard Edition"},"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Component":"Web Services Development","Platform":[{"code":"PF033","label":"Windows"}],"Version":"7.5;7.5.1;7.5.2;7.5.3","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]
Product Synonym
RSA/RSA4WS/RSASE
Was this topic helpful?
Document Information
More support for:
Rational Software Architect for WebSphere Software
Software version:
7.5, 7.5.1, 7.5.2, 7.5.3
Operating system(s):
Linux
Document number:
390553
Modified date:
16 June 2018
UID
swg21390881