Quantcast
Channel: Adobe Community: Message List - ColdFusion
Viewing all articles
Browse latest Browse all 21760

Re: Send data complext to Net Webservice

$
0
0

The different platforms, .NET, PHP and ColdFusion have different interpretations of what an array is. There are complications in interpretation even in ColdFusion itself.

 

For example, although the latest versions of ColdFusion are written in Java, a ColdFusion array is not a Java array. To see this, run the following code:

 

<cfset a=[]>

<cfoutput>Class of a: #a.getClass().getName()#<br>

Superclass of a: #a.getClass().getSuperclass().getName()#

</cfoutput>

 

In any case, in ColdFusion, an array of an array is, strictly speaking, a 2 dimensional array. It is defined as follows:

 

<cfset a = arrayNew(2)>

<cfset a[1][1]="ramoTecnico">

<cfset a[1][2]="codAgente">

<cfset a[2][1]=1>

<cfset a[2][2]=5095>

 

However, I doubt that that would work. As I said, this definition of array might not carry over to other platforms. You could be less strict. It is known that a ColdFusion structure translates as a complex type in the WSDL. You could therefore interprete a structure as an "associative array", which enables you to do something like

 

<cfset emissionRequest = {}> 

<cfset emissionRequest.agent = {}>

<cfset emissionRequest.agent.ramoTecnico = 1>

<cfset emissionRequest.agent.codAgente = 5095>

 

This in fact reminds me of a previous thread in this forum, entitled "Invoke webservice with complex types". I would suggest you have a look.


Viewing all articles
Browse latest Browse all 21760

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>