Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

HELP!...Get data from webservice

Explorer ,
May 08, 2012 May 08, 2012

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
677
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
May 09, 2012 May 09, 2012

any hint about this?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 09, 2012 May 09, 2012
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources