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

Send data complext to Net Webservice

$
0
0

Hello, I need to send array of array to Net webservice (rest) but the webservide respond the error:

 

{"Exception":"Object reference not set to an instance of an object.","StackTrace":"

 

I have an sample how can I send the with PHP and works but I try to send with CF code and I can not.

 

This is the PHP

 

$agent = array(

                    array(

                         ramoTecnico => 1,

                         codAgente => 5095

                         )

                    );

$parameters->emissionRequest = $agent;

 

 

My CF code:

 

     <cfset emissionRequest = {}>  

    <cfset emissionRequest.agente = []>

    <cfset emissionRequest.agente[1] = {}>

    <cfset emissionRequest.agente[1].ramoTecnico = "1">

    <cfset emissionRequest.agente[1].codAgente = "5095">

 

or

 

  <cfscript>  

     emissionRequest = {

                         agente =[ {

                                        codTipoPoliza = "2",

             ramoComercial = "5"

                                   }]

     };

</cfscript>

 

what is the correct form to send it? I already tried a lot of forms and any works.

 

The net programmer modified the Webservice to receive a single array and I send only the struct and ir works but when enable the second array and I send array and struct not works.

 

 

Somebody have any hint?

 

 

 

 


 


                        



Viewing all articles
Browse latest Browse all 21760

Trending Articles



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