axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter Wisnovsky (JIRA)" <>
Subject [jira] Commented: (AXIS-849) WSDL2Java ignores fixed elements/attributes
Date Fri, 03 Jun 2005 23:36:40 GMT
    [ ] 

Peter Wisnovsky commented on AXIS-849:
-------------------------------------- schema is huge at this point, and is spread over 8 files. But I can give you:

 <xs:complexType name="ParentDateRangeRuleType" final="true">
   <xs:extension base="pvParametric:BusinessRuleType">
    <xs:attribute name="overrideable" type="xs:boolean" fixed="true"/>

This generates

    private boolean overrideable;  // attribute

    public BusinessRuleType() {

    public BusinessRuleType(
           boolean overrideable) {
           this.overrideable = overrideable;

     * Gets the overrideable value for this BusinessRuleType.
     * @return overrideable
    public boolean isOverrideable() {
        return overrideable;

     * Sets the overrideable value for this BusinessRuleType.
     * @param overrideable
    public void setOverrideable(boolean overrideable) {
        this.overrideable = overrideable;

I would also observe that "use=prohibited" has no effect. Now I'm not sure what effect it
should have, though if I have a supertype of the one above of the form 

 <xs:complexType name="BusinessRuleType" abstract="true">
  <xs:attribute name="overrideable" type="xs:boolean" use="prohibited"/>

Then it might make sense to emit

public abstract setOverrideable(boolean);
public abstract boolean isOverrideable();

Its certainly handy to be able to express this pattern in the generated classes.

Also I notice that AXIS1264 is a dup of this.

Thanks for looking at this,


> WSDL2Java ignores fixed elements/attributes
> -------------------------------------------
>          Key: AXIS-849
>          URL:
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.0-rc2
>  Environment: Operating System: Other
> Platform: Other
>     Reporter: Nikolay Metchev
>     Assignee: Axis Developers Mailing List

> If in the types section of a wsdl document you specify a type which has an 
> attribute/element that has a fixed value. The client code that gets generated 
> does not enforce that by disallowing the setting of that attribute externally.
> On a similar note if a type has an element and an attribute with the same name 
> then the generated code does not compile.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message