PHP - Error en foreach

 
Vista:

Error en foreach

Publicado por Cristian (42 intervenciones) el 27/12/2012 18:55:32
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
ue problema tengo en este codigo, veran tengo este error:
<br />
<b>Notice</b>: Undefined index: socios in <b>C:\wamp\www\SOAP\NuSOAP\Licencia\serverTramite.php</b> on line <b>219</b><br />
<br />
<b>Warning</b>: Invalid argument supplied for foreach() in <b>C:\wamp\www\SOAP\NuSOAP\Licencia\serverTramite.php</b> on line <b>234</b><br />
 
La linea de error son de este:
 
$socios=$tramite['empresa']['socios']; -- Linea 219
 
y
 
foreach ($socios as $data) { ----Linea 234
$numerodocumento=$data['numerodocumento'];
$tipodocumento=$data['tipodocumento'];
$nombres=$data['nombres'];
$apellidopaterno=$data['apellidopaterno'];
$apellidomaterno=$data['apellidomaterno'];
$direccion=$data['direccion'];
$montoaporte=$data['montoaporte'];
 
 
$sql = "insert into socios(numerodocumento,tipodocumento,nombres,apellidopaterno,apellidomaterno,direccion,montoaporte,cuo)
values('$numerodocumento','$tipodocumento','$nombres','$apellidopaterno','$apellidomaterno','$direccion','$montoaporte','$cuo');";
$result = $db->query($sql);
if (mysqli_errno($db)) printf("mySql error %s\n", $db->error);
 
}
 
Todo es por el $socios, pero el error me dice no definido..., en que estaria fallando??
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

Error en foreach

Publicado por xve (6935 intervenciones) el 27/12/2012 21:36:48
Hola Cristian, es una Notice y un Warning... no es un error exactamente.

Undefined index: socios
Esto quiere decir, que en el array $tramite, no existe la key "socios"
Si haces:
1
print_r($tramite);


Veras que no te existe dicha clave.

El Warning, viene dado por el anterior Notice, porque la variable $socios no tiene valor.

Espero que te sirva... comentanos, ok?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Error en foreach

Publicado por Cristian (42 intervenciones) el 27/12/2012 22:20:38
Hola todo ese codigo esta en una funcion
function CUOrecibeTramite($estado, $tramite) {

El error sale del $socios=$tramite['empresa']['socios'];
['socios'], no se porq me sale ese error, dentro de mi base de datos, hay una tabla llamada empresa, y esta contiene una celda llamada socios.

como puedo solucionar ese error??
Undefined index: socios in <b>C:\wamp\www\SOAP\NuSOAP\Licencia\serverTramite.php</b> on line <b>220
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

Error en foreach

Publicado por xve (6935 intervenciones) el 27/12/2012 23:19:08
De donde sale la variable $tramite?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Error en foreach

Publicado por Cristian (42 intervenciones) el 27/12/2012 23:23:02
Aqui te envio todo el codigo, en la 220 esta mi error. los campos en corchete son de la BD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<?php
/* ERRORES ENCONTRADOS EN EL CODIGO
		- $codigonotaria=$tramite['notaria']['codigonotaria']; Aqui tiene que estar['codigonotaria'] en minuscula segun la BD
 */
require_once('../lib/nusoap.php');
 
$server = new soap_server;
 
//$ns="http://190.81.122.150:8282/cuowebservice";
$ns = "http://localhost/SOAP/NuSOAP/Licencia";
$server->configurewsdl('ApplicationServices', $ns);
$server->wsdl->schematargetnamespace = $ns;
$server->wsdl->encoding="ISO-8859";
 
/* * ********************************************************
  DEFINICION DE DATOS DE NOTARIA
 * ******************************************************** */
$server->wsdl->addComplexType(
        'notaria', 'complexType', 'struct', 'all', '', array(
    'codigonotaria' => array('name' => 'codigonotaria', 'type' => 'xsd:string'),
    'razonsocial' => array('name' => 'razonsocial', 'type' => 'xsd:string'),
    'direccion' => array('name' => 'direccion', 'type' => 'xsd:string'),
    'ubigeo' => array('name' => 'ubigeo', 'type' => 'xsd:string')
        )
);
/* * ********************************************************
  DEFINICION DE DATOS DE SOLICITANTE
 * ******************************************************** */
 
$server->wsdl->addComplexType(
        'solicitante', 'complexType', 'struct', 'all', '', array(
    'tipodocumento' => array('name' => 'tipodocumento', 'type' => 'xsd:string'),
    'dni' => array('name' => 'dni', 'type' => 'xsd:string'),
    'nombres' => array('name' => 'nombres', 'type' => 'xsd:string'),
    'apellidopaterno' => array('name' => 'apellidopaterno', 'type' => 'xsd:string'),
    'apellidomaterno' => array('name' => 'apellidomaterno', 'type' => 'xsd:string'),
    'correoelectronico' => array('name' => 'correoelectronico', 'type' => 'xsd:string'),
    'numerocelular' => array('name' => 'numerocelular', 'type' => 'xsd:string')
        )
);
 
/**********************************************************
  DEFINICION DE DATOS DE SOCIOS
 **********************************************************/
 
$server->wsdl->addComplexType(
        'socios', 'complexType', 'struct', 'all', '', array(
    'numerodocumento' => array('name' => 'numerodocumento', 'type' => 'xsd:string'),
    'tipodocumento' => array('name' => 'tipodocumento', 'type' => 'xsd:string'),
    'nombres' => array('name' => 'nombres', 'type' => 'xsd:string'),
    'apellidopaterno' => array('name' => 'apellidopaterno', 'type' => 'xsd:string'),
    'apellidomaterno' => array('name' => 'apellidomaterno', 'type' => 'xsd:string'),
    'direccion' => array('name' => 'direccion', 'type' => 'xsd:string'),
    'montoaporte' => array('name' => 'montoaporte', 'type' => 'xsd:decimal')
        )
);
 
/* * ********************************************************
  DEFINICION DE TIPO COMPLEJO socios
 * *********************************************************/
 
$server->wsdl->addComplexType(
        'Arreglodesocios', // Nombre
        'complexType', // Tipo de Clase
        'array', // Tipo de PHP
        '', // Compositor
        'SOAP-ENC:Array', // Restricted Base
        array(), array(
    array('ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'tns:socios[]')
        ), 'tns:socios'
);
 
/* * ********************************************************
  DEFINICION DE DATOS DE EMPRESA
 * ******************************************************** */
 
$server->wsdl->addComplexType(
    'empresa', 'complexType', 'struct', 'all', '', array(
    'tiposociedad' => array('name' => 'tiposociedad', 'type' => 'xsd:string'),
    'numerotitulo' => array('name' => 'numerotitulo', 'type' => 'xsd:string'),
    'razonsocial' => array('name' => 'razonsocial', 'type' => 'xsd:string'),
    'denominacionabreviada' => array('name' => 'denominacionabreviada', 'type' => 'xsd:string'),
    'ubigeo' => array('name' => 'ubigeo', 'type' => 'xsd:string'),
    'objetosocial' => array('name' => 'objetosocial', 'type' => 'xsd:string'),
    'tipoaporte' => array('name' => 'tipoaporte', 'type' => 'xsd:string'),
    'montocapitalsocial' => array('name' => 'montocapitalsocial', 'type' => 'xsd:decimal'),
    'valoraccion' => array('name' => 'valoraccion', 'type' => 'xsd:decimal'),
    'tipocancelacion' => array('name' => 'tipocancelacion', 'type' => 'xsd:string'),
    'porcentajeCancelado' => array('name' => 'porcentajeCancelado', 'type' => 'xsd:int'),
    'Arreglodesocios' => array('name' => 'Arreglodesocios', 'type' => 'tns:Arreglodesocios')
        )
);
 
 
/* * ********************************************************
  DEFINICION DE DATOS TRAMITE
 * ******************************************************** */
 
$server->wsdl->addComplexType(
        'tramite', 'complexType', 'struct', 'all', '', array(
    'notaria' => array('name' => 'notaria', 'type' => 'tns:notaria'),
    'solicitante' => array('name' => 'solicitante', 'type' => 'tns:solicitante'),
    'empresa' => array('name' => 'empresa', 'type' => 'tns:empresa')
        )
);
 
function zfill($valor, $max, $char) {
 
    for ($i = strlen($valor); $i < $max; $i++) {
        $valor = $char . $valor;
    }
    return $valor;
}
 
 
 
//jlbugarin ongei-pcm
function obtenerCuo($estado, $institucion) {
 
    $institucion = strtoupper($institucion); //strtoupper — Convierte un string a mayúsculas
    $estado = strtoupper($estado);
 
    if (!empty($institucion) && $institucion == "SNRP" && $estado == "S") { //empty — Determina si una variable está vacía
        $cuo = '0803004010';
 
        $db = new mysqli();
        $db_result = $db->connect("localhost", "root", "", "psc_new");
        //$db_result = $db->connect("localhost", "root", "amazonas", "psc_new");
        //$sql = "select max(CAST(cuo AS SIGNED))+1 as cuo from verifica";
 
		$sql="select max(CAST(cuo AS SIGNED))+1 as cuo from verifica WHERE cuo NOT LIKE '444%';";
 
        $result = $db->query($sql);
        if (mysqli_errno($db))
            printf("mySql error %s\n", $db->error);
        $row = mysqli_fetch_assoc($result);
        $cuo = zfill($row['cuo'], 10, '0');
 
        $sql = "insert into verifica(ip,fecha,estado,cuo) values('$institucion',now(),'$estado','$cuo');";
        $result = $db->query($sql);
        if (mysqli_errno($db))
            printf("mySql error %s\n", $db->error);
 
			$db->close();
 
        return $cuo;
    }else {
        return "01"; //no envio institucion  
    }
}
 
//jlbugarin ongei-pcm
function CUOrecibeTramite($estado, $tramite) {
    $cuo='0803004010';
	if($estado!=""){
		$db = new mysqli();
		$db_result = $db->connect ("localhost", "root", "","psc_new");
 
        //$sql="select max(cuo)+1 as cuo from verifica";
	    //$sql="select max(CAST(cuo AS SIGNED))+1 as cuo from verifica";
		$sql="select max(CAST(cuo AS SIGNED))+1 as cuo from verifica WHERE cuo NOT LIKE '444%';";
 
	    $result = $db->query($sql);
	    if (mysqli_errno($db)) printf("mySql error %s\n", $db->error);
		$row = mysqli_fetch_assoc($result);
		$cuo=zfill($row['cuo'],10,'0');
 
 
  	    $sql="insert into verifica(ip,fecha,estado,cuo) values('local',now(),'$estado','$cuo');";
	    $result = $db->query($sql);
	    if (mysqli_errno($db)) printf("mySql error %s\n", $db->error);
 
 
		//****************************************************************************
        // solo valor de notaria
		//****************************************************************************		
        $codigonotaria=$tramite['notaria']['codigonotaria'];
		$razonsocial=$tramite['notaria']['razonsocial'];
		$direccion=$tramite['notaria']['direccion'];
		$ubigeo=$tramite['notaria']['ubigeo'];
 
		$sql = "insert into notaria(codigonotaria,razonsocial,direccion,ubigeo,cuo)
		values('$codigonotaria','$razonsocial','$direccion','$ubigeo','$cuo');";
		$result = $db->query($sql);
		if (mysqli_errno($db)) printf("mySql error %s\n", $db->error);
 
		//****************************************************************************
    	// solicitante
		//****************************************************************************
		$dni=$tramite['solicitante']['dni'];
		$nombres=$tramite['solicitante']['nombres'];
		$apellidopaterno=$tramite['solicitante']['apellidopaterno'];
		$apellidomaterno=$tramite['solicitante']['apellidomaterno'];
		$correoelectronico=$tramite['solicitante']['correoelectronico'];
 
		$sql = "insert into solicitante(dni,nombres,apellidopaterno,apellidomaterno,correoelectronico,cuo)
		values('$dni','$nombres','$apellidopaterno','$apellidomaterno','$correoelectronico','$cuo');";
		$result = $db->query($sql);
		if (mysqli_errno($db)) printf("mySql error %s\n", $db->error);
 
 
		//****************************************************************************
         // empresa
		//****************************************************************************
 
		$tiposociedad=$tramite['empresa']['tiposociedad'];
		$numerotitulo=$tramite['empresa']['numerotitulo'];
		$razonsocial=$tramite['empresa']['razonsocial'];
		$denominacionabreviada=$tramite['empresa']['denominacionabreviada'];
		$ubigeo=$tramite['empresa']['ubigeo'];
		$objetosocial=$tramite['empresa']['objetosocial'];
		$tipoaporte=$tramite['empresa']['tipoaporte'];
		$montocapitalsocial=$tramite['empresa']['montocapitalsocial'];
		$valoraccion=$tramite['empresa']['valoraccion'];
		$tipocancelacion=$tramite['empresa']['tipocancelacion'];
		$porcentajeCancelado=$tramite['empresa']['porcentajeCancelado'];
 
		//****************************************************************************
		// array de socios
		$socios=$tramite['empresa']['socios'];	//Agrege el arroba
		//$socios=$tramite['empresa']['socios'];  --- ESTO ES PARTE DEL CODIGO.	
		//****************************************************************************
				//En el codigo de insert, agregre SOCIO, es cosa de eliminar si sale algo mal
		$sql = "insert into empresa(tiposociedad,numerotitulo,razonsocial,denominacionabreviada,ubigeo,objetosocial,tipoaporte,
		montocapitalsocial,valoraccion,porcentajeCancelado,tipocancelacion,cuo) 
		values('$tiposociedad','$numerotitulo','$razonsocial','$denominacionabreviada','$ubigeo','$objetosocial','$tipoaporte',
		'$montocapitalsocial','$valoraccion','$porcentajeCancelado','$tipocancelacion','$cuo');";
		$result = $db->query($sql);
		if (mysqli_errno($db)) printf("mySql error %s\n", $db->error);
 
 
		//****************************************************************************
        // socios
		//****************************************************************************		
        foreach ($socios as $data) {
           $numerodocumento=$data['numerodocumento'];
           $tipodocumento=$data['tipodocumento'];
           $nombres=$data['nombres'];
           $apellidopaterno=$data['apellidopaterno'];
           $apellidomaterno=$data['apellidomaterno'];
           $direccion=$data['direccion'];
           $montoaporte=$data['montoaporte'];
 
 
		   $sql = "insert into socios(numerodocumento,tipodocumento,nombres,apellidopaterno,apellidomaterno,direccion,montoaporte,cuo)
		   values('$numerodocumento','$tipodocumento','$nombres','$apellidopaterno','$apellidomaterno','$direccion','$montoaporte','$cuo');";
		   $result = $db->query($sql);
		   if (mysqli_errno($db)) printf("mySql error %s\n", $db->error);
 
        }
 
		$db->close();
	}
	return $cuo;
}
 
$server->register(
        'CUOrecibeTramite', // Nombre del Metodo
        array('estado' => 'xsd:string', 'tramite' => 'tns:tramite'), // Parametros de Entrada
        array('return' => 'xsd:string'), // Parametros de Salida
        $ns, // Namespace
        $ns    . '#ShowArchivos', // Soapaction
        'rpc', // Style
        'encoded', // Use
        'Retorna cuo'        	// Documentation
);
 
 
//jbugarin-ongei-pcm
$server->register(
        'obtenerCuo', // Nombre del Metodo
        array('estado' => 'xsd:string', 'institucion' => 'xsd:string'), // Parametros de Entrada
        array('return' => 'xsd:string'), // Parametros de Salida
        $ns, // Namespace
        $ns    . '#ShowArchivos', // Soapaction
        'rpc', // Style
        'encoded', // Use
        'Retorna string CUO'        	// Documentation
);
//jbugarin-ongei-pcm
 
if (isset($HTTP_RAW_POST_DATA)) {
    $input = $HTTP_RAW_POST_DATA;
} else {
    $input = implode("\r\n", file('php://input'));
}
 
$server->service($input);
exit;
?>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

Error en foreach

Publicado por xve (6935 intervenciones) el 28/12/2012 09:04:36
En este código, no se ver donde la variable $tramite coge su contenido...

Donde hay $tramite=...?
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Error en foreach

Publicado por Cristian (42 intervenciones) el 28/12/2012 15:24:00
Hola al darle un var_dump($tramite);
me imprime los array que he usado cuando consumo servicio. te pego lo que me sale luego del var_dump

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<br />
<b>Notice</b>:  Undefined index: socios in <b>C:\wamp\www\SOAP\NuSOAP\Licencia\serverTramite.php</b> on line <b>220</b><br />
<pre class='xdebug-var-dump' dir='ltr'>
<b>array</b>
  'notaria' <font color='#888a85'>=&gt;</font>
    <b>array</b>
      'codigonotaria' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'N00002'</font> <i>(length=6)</i>
      'razonsocial' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'NOTARIA DE PRUEBA'</font> <i>(length=17)</i>
      'direccion' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'GAMARRA 680 CHUCUITO CALLAO'</font> <i>(length=27)</i>
      'ubigeo' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'010101'</font> <i>(length=6)</i>
  'solicitante' <font color='#888a85'>=&gt;</font>
    <b>array</b>
      'tipodocumento' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'?'</font> <i>(length=1)</i>
      'dni' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'10646000'</font> <i>(length=8)</i>
      'nombres' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'CARLOS ENRIQUE'</font> <i>(length=14)</i>
      'apellidopaterno' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'QUISPE'</font> <i>(length=6)</i>
      'apellidomaterno' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'SALAZAR'</font> <i>(length=7)</i>
      'correoelectronico' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'ceqs@hotmail.com'</font> <i>(length=16)</i>
      'numerocelular' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'965373727'</font> <i>(length=9)</i>
  'empresa' <font color='#888a85'>=&gt;</font>
    <b>array</b>
      'tiposociedad' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'01'</font> <i>(length=2)</i>
      'numerotitulo' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'100'</font> <i>(length=3)</i>
      'razonsocial' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'Mi Empresa de Prueba SA'</font> <i>(length=23)</i>
      'denominacionabreviada' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'MIEMPSA'</font> <i>(length=7)</i>
      'ubigeo' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'010101'</font> <i>(length=6)</i>
      'objetosocial' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'Esta es una empresa de prueba'</font> <i>(length=29)</i>
      'tipoaporte' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'1'</font> <i>(length=1)</i>
      'montocapitalsocial' <font color='#888a85'>=&gt;</font> <small>float</small> <font color='#f57900'>1000</font>
      'valoraccion' <font color='#888a85'>=&gt;</font> <small>float</small> <font color='#f57900'>0</font>
      'tipocancelacion' <font color='#888a85'>=&gt;</font> <small>string</small> <font color='#cc0000'>'2'</font> <i>(length=1)</i>
      'porcentajeCancelado' <font color='#888a85'>=&gt;</font> <small>int</small> <font color='#4e9a06'>100</font>
      'Arreglodesocios' <font color='#888a85'>=&gt;</font>
        <b>array</b>
          <i><font color='#888a85'>empty</font></i>
</pre><br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>C:\wamp\www\SOAP\NuSOAP\Licencia\serverTramite.php</b> on line <b>237</b><br />
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:CUOrecibeTramiteResponse xmlns:ns1="http://localhost/SOAP/NuSOAP/Licencia"><return xsi:type="xsd:string">0000000154</return></ns1:CUOrecibeTramiteResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar

Error en foreach

Publicado por Cristian (42 intervenciones) el 28/12/2012 15:26:47
Cuando lanzo un print_r($tramite);
me imprime mejor el array.

aca te pego el codigo.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<br />
<b>Notice</b>:  Undefined index: socios in <b>C:\wamp\www\SOAP\NuSOAP\Licencia\serverTramite.php</b> on line <b>220</b><br />
Array
(
    [notaria] => Array
        (
            [codigonotaria] => N00002
            [razonsocial] => NOTARIA DE PRUEBA
            [direccion] => GAMARRA 680 CHUCUITO CALLAO
            [ubigeo] => 010101
        )
 
    [solicitante] => Array
        (
            [tipodocumento] => ?
            [dni] => 10646000
            [nombres] => CARLOS ENRIQUE
            [apellidopaterno] => QUISPE
            [apellidomaterno] => SALAZAR
            [correoelectronico] => ceqs@hotmail.com
            [numerocelular] => 965373727
        )
 
    [empresa] => Array
        (
            [tiposociedad] => 01
            [numerotitulo] => 100
            [razonsocial] => Mi Empresa de Prueba SA
            [denominacionabreviada] => MIEMPSA
            [ubigeo] => 010101
            [objetosocial] => Esta es una empresa de prueba
            [tipoaporte] => 1
            [montocapitalsocial] => 1000
            [valoraccion] => 0
            [tipocancelacion] => 2
            [porcentajeCancelado] => 100
            [Arreglodesocios] => Array
                (
                )
 
        )
 
)
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>C:\wamp\www\SOAP\NuSOAP\Licencia\serverTramite.php</b> on line <b>237</b><br />
<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:CUOrecibeTramiteResponse xmlns:ns1="http://localhost/SOAP/NuSOAP/Licencia"><return xsi:type="xsd:string">0000000155</return></ns1:CUOrecibeTramiteResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar
Imágen de perfil de xve
Val: 3.943
Oro
Ha mantenido su posición en PHP (en relación al último mes)
Gráfica de PHP

Error en foreach

Publicado por xve (6935 intervenciones) el 28/12/2012 18:51:51
fijate que en el array empresa, no existe el índice socios...
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar