Skip to main content
zamvil
Inspiring
May 9, 2012
Question

HELP!...Get data from webservice

  • May 9, 2012
  • 1 reply
  • 718 views

Hi,

I'm accesing a NETwebservice and the result is an object. Could some body tell me how can I get the data from the object? I already tried many different ways and I can not get the data. It's supose that the result is an array.

This is the webservice

<s:element name="ValidaRFC"> 

- <s:complexType>

- <s:sequence>

<s:element minOccurs="0" maxOccurs="1" name="user" type="s:string" />

<s:element minOccurs="0" maxOccurs="1" name="pass" type="s:string" />

<s:element minOccurs="0" maxOccurs="1" name="rfc" type="s:string" />

</s:sequence>

</s:complexType>

</s:element>

- <s:element name="ValidaRFCResponse">

- <s:complexType>

- <s:sequence>

<s:element minOccurs="0" maxOccurs="1" name="ValidaRFCResult" type="tns:ArrayOfClientes" />

</s:sequence>

</s:complexType>

</s:element>

- <s:complexType name="ArrayOfClientes">

- <s:sequence>

<s:element minOccurs="0" maxOccurs="unbounded" name="clientes" nillable="true" type="tns:clientes" />

</s:sequence>

</s:complexType>

- <s:complexType name="clientes">

- <s:sequence>

<s:element minOccurs="0" maxOccurs="1" name="pv" type="s:string" />

<s:element minOccurs="0" maxOccurs="1" name="nocliente" type="s:string" />

</s:sequence>

</s:complexType>

</s:schema>

</wsdl:types>

This the code

<cfinvoke

webservice="http://webserviceURL/webservicename.asmx?wsdl"

method="validaRFC"

returnvariable="aClientesArray">

<cfinvokeargument name="user" value="#userenc#"/>

<cfinvokeargument name="pass" value="#passwordenc#"/>

<cfinvokeargument name="rfc" value="#rfcenc#"/>

</cfinvoke>

<cfdump var="#aClientesArray#"/>

object of localhost.ArrayOfClientes
Class Namelocalhost.ArrayOfClientes
Methods
Method Return Type
equals(java.lang.Object)boolean
getClientes(int)localhost.Clientes
getClientes()localhost.Clientes[]
getDeserializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName)org.apache.axis.encoding.Deserializer
getSerializer(java.lang.String, java.lang.Class, javax.xml.namespace.QName)org.apache.axis.encoding.Serializer
getTypeDesc()org.apache.axis.description.TypeDesc
hashCode()int
setClientes(localhost.Clientes[])void
setClientes(int, localhost.Clientes)void
    This topic has been closed for replies.

    1 reply

    zamvil
    zamvilAuthor
    Inspiring
    May 9, 2012

    any hint about this?

    May 9, 2012

    Hi

    The array is available in the "clientes" property of an instance of type ArrayOfClients (Notice the getClients and setClients methods).

    If you replace your cfdump for this one:

    <cfdump var="#aClientesArray.getClientes()#"/>

    you should see your array.

    Regards.