4 Replies Latest reply on Aug 29, 2014 8:29 AM by OneLove

    consuming webservice with input type of enum

    eight_is_great
      When trying to consume a webservice (temporarily located on a server within my intranet) I get this Cold Fusion Error:

      Web service operation "getIndustries" with parameters {CareerStart} could not be found.

      This is what is in the wdsl file for the function I am trying to access:

      - <s:element name="getIndustries">
      - <s:complexType>
      - <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="getIndustriesRequest" type="tns:CareerTrack" />
      </s:sequence>
      </s:complexType>
      </s:element>
      - <s:simpleType name="CareerTrack">
      - <s:restriction base="s:string">
      <s:enumeration value="CareerStart" />
      <s:enumeration value="ContinuingEd" />
      </s:restriction>
      </s:simpleType>
      - <s:element name="getIndustriesResponse">
      - <s:complexType>
      - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="getIndustriesResult" type="tns:ArrayOfKeyValuePair" />
      </s:sequence>
      </s:complexType>
      </s:element>
      - <s:complexType name="ArrayOfKeyValuePair">
      - <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded" name="KeyValuePair" nillable="true" type="s1:KeyValuePair" />
      </s:sequence>
      </s:complexType>
      - <s:complexType name="KeyValuePair">
      - <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="Key" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="Value" type="s:string" />
      </s:sequence>
      </s:complexType>

      I am attempting to use this function with cold fusion like so:

      <CFPARAM name="CareerTrack" default="CareerStart" type="string">
      <CFOBJECT webservice="#webservice#"
      name="regExchange">

      <cfset aArrayOfKeyValuePair = regExchange.getIndustries(#CareerTrack#)>

      Is there something about passing in values to a type of enum that is special?

      I think I should have visibility to the webservice based on the evidence that when I set the wdsl url in Dreamweaver, it shows me the service function definitions and I can drag and drop them into my code.