Using groovy ws with enum types?
- by Jared
I'm trying to use groovy ws to call a webservice. One of the properties of the generated class is it's self a class with an enum type. Although the debug messages show that the com.test.FinalActionType is created at runtime when the WSDL is read I can't create an instance of it using code like
proxy.create("com.test.FinalActionType")
When I try and assign a string to my class uin place of an instance of FinalActionType groovy is not able to do the conversion. How can I get an instance of this class to use in a webservice call? I've pasted the important part of the WSDL below.
        <xsd:simpleType name="FinalActionType">
            <xsd:restriction base="xsd:string">
                <xsd:enumeration value="stop"/>
                <xsd:enumeration value="quit"/>
                <xsd:enumeration value="continue"/>
                <xsd:whiteSpace value="collapse"/>
            </xsd:restriction>
        </xsd:simpleType>