IBM Support

PK89247: UML2WSDL:'WSDL: The X element referenced by the Y part cannot be resolved' using 'TargetNamespacePrefix' global types

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • string
    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 stereot
    ype 'serviceSpecification'
    11. add an operation testOp to the interface with an in paramete
    r '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 targe
    t.
    13. run the transformation and the following is generated
    Result:
    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/XMLSc
    hema'
     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?
    
    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 refe
    renced by the aParam part cannot be resolved
    
    Expected:
    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?
    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?
    
    Workaround:
    Like you did in steps 6,
    1. go the the package testSchema schema stereotype property
    2. remove 'tns' from the 'Schema targetNamespacePrefix' property
    or add an other string such as xd1 to the 'Schema targetNamespac
    ePrefix' property
    

Local fix

Problem summary

  • The problem happens if the WSDL file or the inline schema
    under it are trying to import another xsd schema that has a
    namespace prefix that is used is the wsdl file.
    So in this case, user created teh XSD types in a package
    with ??Schema?? stereotype. and he sets the prefix to be
    tns.
    The transformation uses tns as the default prefix for WSDL
    files. so collesion happens leading to different behaviors (
    RATLC00574895 , RATLC00574901 ).
    so if the XSD is an element declaration, the transformation
    will not add the prefix/namespace to the definision since
    the prefix already exists. leading to broken link.
    
    so if the XSD is an element Complex Type, the transformation
    will add the prefix/namespace to the inline schema under the
    defintion. and it looks that the wsdl core will complain
    about the inline schema and the containing definition having
    same prefix for different namespace. and it will cause an
    exception which will make the transformation apport .
    

Problem conclusion

  • Fixed in release RSx 754.
    
    Added an API to generate a unique prefix for any imported
    schema.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PK89247

  • Reported component name

    RSA-SE WIN

  • Reported component ID

    5724V8800

  • Reported release

    750

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2009-06-18

  • Closed date

    2009-09-25

  • Last modified date

    2009-09-25

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    RSA-SE WIN

  • Fixed component ID

    5724V8800

Applicable component levels

  • R750 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS4JE2","label":"Rational Software Architect Standard Edition"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"7.5","Edition":"","Line of Business":{"code":"LOB36","label":"IBM Automation"}}]

Document Information

Modified date:
25 September 2009