5 Replies Latest reply on Sep 3, 2009 1:28 AM by Phil.Arnold

    Consuming an ASP web service which responds with complex data types...

    Phil.Arnold Level 1

      Here's my problem - I'm trying to consume a web service from a provider that uses complex data types.

       

      The starting part of the WSDL looks like this (I've not included the whole thing) - named have been changed to protect the innocent:

      <wsdl:definitions targetNamespace="http://domain_name">
      <wsdl:types>
      <s:schema elementFormDefault="qualified" targetNamespace="http://domain_name">
      <s:element name="Authentication">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="Username" type="s:string"/>
      <s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string"/>
      <s:element minOccurs="0" maxOccurs="1" name="Token"/>
      </s:sequence>
      </s:complexType>
      </s:element>
      <s:element name="AuthenticateResponse">
      <s:complexType>
      <s:sequence>
      <s:element minOccurs="1" maxOccurs="1" name="AuthOK" type="s:int"/>
      <s:element minOccurs="0" maxOccurs="1" name="Token"/>
      </s:sequence>
      </s:complexType>
      </s:element>

       

      Since it's a complexType return, with a sequence, I'd expect an array or structure returned, but instead I just get the "AuthOK" value, and no way to get anything else.

       

      Here are the ways I've tried calling it:

      <cfscript>

          WS = createObject("webservice", "https://WSDL_URL");

          WS_ret = WS.Authentication(Username = "username", Password = "password", Token = "");

      </cfscript>

      <cfdump var="#WS_ret#" />

       

      <cfinvoke webservice="WSDL_URL" method="Authentication" returnVariable="WS_ret">

          <cfinvokeargument name="userID" value="7253320" />
          <cfinvokeargument name="password" value="ctpjxs3" />
          <cfinvokeargument name="SecurityToken" value="" />

      </cfinvoke>

      <cfdump var="#WS_ret#" />

       

       

      Any ideas how I can get the other variables in the sequence? I have other calls after this that have a much larger amount of variables, and as such I can't use it without being about to get more of the