Hello,

We are trying to upgrade our castor from .9.3.9 to .9.5.3 and we seem to have run into a little problem which I am having trouble figuring out an answer to. The generated code for the set/gets is now using the restriction base type instead of the simpleType that was being used before. So we would like to avoid a bunch of code change. There must be somethine that I haven't found yet that controls this.

Thanks

Eric

For the schema that looks like this:

        <xsd:simpleType name="ChannelProtectionType_T">
                <xsd:restriction base="xsd:integer">
                        <xsd:enumeration value = "CPT_NA" />
                        <xsd:enumeration value = "CPT_S" />
                        <xsd:enumeration value = "CPT_P" />
                        <xsd:enumeration value = "CPT_Y" />
                        <xsd:enumeration value = "CPT_R" />
                </xsd:restriction>
        </xsd:simpleType>

which is used in somethine like this:

        <xsd:complexType name="LinkConnection_T">
                <xsd:sequence>
                        <xsd:element name="aNEId" type="ObjectReference_T"/>
                        <xsd:element name="zNEId" type="ObjectReference_T"/>
                        <xsd:element name="channelProtType" type="ChannelProtectionType_T"/>
                        <xsd:element name="channelServerProtType" type="ChannelServerProtectionType_T"/>
                </xsd:sequence>
                <xsd:attributeGroup ref="LinkConnectionAttr"/>
        </xsd:complexType>

 

used to generate code that looked like this:

public abstract class LinkConnection_T implements java.io.Serializable {

.

.

private com.lucent.oms.xml.routingData.types.ChannelProtectionType_T _channelProtType;

.

.

    public void setChannelProtType(com.lucent.oms.xml.routingData.types.ChannelProtectionType_T channelProtType)
    {
        this._channelProtType = channelProtType;
    } //-- void setChannelProtType(com.lucent.oms.xml.routingData.types.ChannelProtectionType_T)

 

But now generates code that looks like this:

public class LinkConnection_T implements java.io.Serializable {

.

.

private int _channelProtType;

.

.

    public void setChannelProtType(int channelProtType)
    {
        this._channelProtType = channelProtType;
        this._has_channelProtType = true;
    } //-- void setChannelProtType(int)

 

<<attachment: Blank Bkgrd.gif>>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-user

Reply via email to