IBM Support

PM07185: RSA: UML to WSDL operation return unexpected results, return typ e void instead of type

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Using RSA 7.0.0.6
    
    On a UML diagram in a Service model.
    
    Create an operation 'echo' in the class EchoI.
    
    Operation parameters contain a Return Parameter with the Name re
    sult. Set the  Type? String. Create a UML to WSD transformation
    configuration and
    Transform to WSDL. Transformation Completes.
    
    Go to the project generated.wsdl.
    
    look for the file EchoI.wsdl.
    
    Open the file.
    
    Inside the file see the statement:
    
    ?xsd:element name='result' type='xsd:string'/?
    
    
    This is the unexpected result.
    
    Expected result is:
    
    
    ?xsd:element name='return' type='xsd:string'/?
    
    
    I was able to get the same thing using RSA 7.5.5
    
    
    This defected code will cause a java method of no return to be
    
    generated when we try to r-click EchoI.wsdl file and choose?Web
    
    services?generate client.
    
    
    
    public void echo{}  (not desired java code).
    
    The desired code is:
    
    public String echo{}
    

Local fix

Problem summary

  • The UML-WSDL transformation uses the UML-XSD transformation
    to create the XSD elements in the WSDL definition.
    The UML-XSD transformation is using the name that is in the
    model as the name of the corresponding XSD element.
    
    So, in this case the parameter name is "result" so it
    generates an XSD element called "result" as expected.
    ?xsd:element name="result" type="xsd:string"/?
    
    
    In this case when the customer use the "Generate Web Client"
    tool on the generated WSDL file, it will generate a Java
    operation with output parameter called "result" and void
    return type, which is not what the customer wants.
    public void echo{String result}
    
    The customer wants the "Generate Web Client" tool to
    generate a Java operation with no parameter called "result"
    and a return type of the "results" type (String in this
    example)
    public String echo{}
    
    The expected Java code that the customer expects can be
    achieved by changing the name of the parameter "result" to
    be called "return"
    the UML-WDL transformation will generate XSD element called
    "_return" (because the "return" is a reserved Java word so
    we add '_' before it)
    ?xsd:element name="_return" type="xsd:string"/?
    
    
    In 7.5.5
    And when you use the "Generate Web Client" tool to generate
    the Java operation, you will get the Java operation with no
    parameter called "result" and a return type of the "results"
    type (String in this example) as the customer expects.
    public String echo{}
    
    In 7.0.0.6
    Do in the same steps will result in the incorrect code.
    public void echo{String result}
    
    So, the "Generate Web Client" tool has been fixed in 7.5.5
    but it has the defect in 7.0.0.6.
    This tool is not owned by our team. I think it is open
    source tool that is may be owned by the Web tools team.
    
    I know that the the open source team may not fix this
    problem in 7006, so I provided a work around hot fix for the
    client satisfaction.
    But in reality, I wouldn't fix it in my side.
    

Problem conclusion

  • - The UML-WSDL transformation works as designed.
    - After the hot fix that I provided it to this issue to this
    client, there is no need to fix this problem in the
    "Generate Web Client" tool. Although the correct fix should
    have been done in the "Generate Web Client" tool.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM07185

  • Reported component name

    SW ARCHITECT WI

  • Reported component ID

    5724I7001

  • Reported release

    700

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-02-09

  • Closed date

    2010-04-01

  • Last modified date

    2010-04-01

  • 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

    SW ARCHITECT WI

  • Fixed component ID

    5724I7001

Applicable component levels

  • R700 PSN

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSYKBQ","label":"Rational Software Architect Designer for WebSphere Software"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"700","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}},{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SS4JCV","label":"Rational Software Architect for WebSphere Software"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"700","Edition":"","Line of Business":{"code":"LOB15","label":"Integration"}}]

Document Information

Modified date:
01 April 2010