Generation error in package-info.java

Description

package-info.java with wrong content (see attachment).

Environment

Ubuntu 10.04 / Java 1.6. UML14 model.

Activity

Show:
Bob Fields
July 20, 2010, 4:45 AM

I'm not sure why WebServicePackageLogicImpl.handleGetAttributeFormDefault would return null, It reads the value from the taggedValue (stereotype attribute) andromda_xml_attributeFormDefault and returns "UNQUALIFIED" if none is found or if set to 'default'. The test output from the webservice cartridge UML2 test model produces package-info.java correctly. Is it reproducible in your 3.4-SNAPSHOT source tree using the same UML2 test model?

/**

  • @return findTaggedValue(WebServiceGlobals.ATTRIBUTE_FORM_DEFAULT) or DEFAULT_ATTRIBUTE_FORM

  • @see org.andromda.cartridges.webservice.metafacades.WebServicePackage#getAttributeFormDefault()
    */
    protected String handleGetAttributeFormDefault()
    {
    String style = (String)this.findTaggedValue(WebServiceGlobals.ATTRIBUTE_FORM_DEFAULT);
    if (StringUtils.isEmpty(style) || style.equals(DEFAULT))
    {
    style = DEFAULT_ATTRIBUTE_FORM;
    }
    return style;
    }

Another possibility is that the $pkg reference returns a Package instead of a WebServicePackage type within package-info.java template, which does not have the method. The metafacade mapping looks right in the cartridge though.

Walter Mourão
July 20, 2010, 6:43 AM

I was using an uml 1.4 model, after migrating it to uml2 it is working fine.

Bob Fields
July 20, 2010, 11:50 AM

I forgot to add the UML14 mapping from Package to WebServicePackage. It's fixed now.

Bob Fields
July 20, 2010, 11:54 AM

Fixed, awaiting verification.

Assignee

Bob Fields

Reporter

Walter Mourão

Labels

None

Components

Fix versions

Affects versions

Due date

2010/07/20

Priority

Major
Configure