Skip navigation
zamvil
Currently Being Moderated

HELP!...Get data from webservice

May 8, 2012 8:00 PM

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
 
Replies
  • Currently Being Moderated
    May 9, 2012 7:06 AM   in reply to zamvil

    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.

    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points