Enum type as SOAP service inputs

I am trying to consume a SOAP webservice which takes ENUM as input. I couldn't found a way to pass value to enum type parameter in webservicequery function or callwebservice smart service. Any help is appreciated.

  Discussion posts and replies are publicly visible

Parents
  • Hello Ramakrishna

    Can you share the definition of the enumeration?

    It can be defined as string with the restriction of values as enumeration.

    Can you mention more details of what you have tried so far? Is there any public service that can be tested with it?

    Other questions just for the sake of curiosity, is that SOAP coming from .Net? Java?

    Jose
Reply
  • Hello Ramakrishna

    Can you share the definition of the enumeration?

    It can be defined as string with the restriction of values as enumeration.

    Can you mention more details of what you have tried so far? Is there any public service that can be tested with it?

    Other questions just for the sake of curiosity, is that SOAP coming from .Net? Java?

    Jose
Children
  • Hi Josep,
    It's JAVA enum. I tried defining it as string but it's not converted.

    Input to webservice query:
    inputVar: {
    MerchantSearchField: "DisplayName",
    searchValue: "ABCD"
    }

    Enum structure:
    @XmlType(name = "MerchantSearchField")
    @XmlEnum
    public enum MerchantSearchField {

    @XmlEnumValue("TaxId")
    TAX_ID("TaxId"),
    @XmlEnumValue("UserNumber")
    USER_NUMBER("UserNumber"),
    @XmlEnumValue("DisplayName")
    DISPLAY_NAME("DisplayName");
    private final String value;
  • Hello Ramakrishna ,


    1) I see that the Type String is missing @XmlEnum(String.class) i am not sure how the XSD looks like now.
    As far as i know the <xsd:restriction> are ignored in the CDTs . So if the XSD looks like this?
    <xs:simpleType name="MerchantSearchField">
    <xs:restriction base="xs:string"/>
    <xs:enumeration value="TaxId"/>

    But well that is totally another world so maybe we can just say it is not supported as Carlos mentioned.

    2) In the other hand you can try the Advanced Web service call plugin
    forum.appian.com/.../summary

    3) Maybe it is really not needed the plugin but who knows try to take a look at the other options

    Hope this helps

    Jose