23 const URL_FRONT_PRODUCCION =
'https://www.tramita.gva.es/gde-front/';
46 public function insertarDocumento($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo = null, $vMetadatosENI = null, $vMetadatosPersonalizados=null, $vFirmas=null)
51 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_GDE2];
54 $peticionWSRequest = $composer->__cde__insertarDocumento_full(
56 'contenido' => $docContentB64,
57 'nombre' => $nombreDoc,
59 'tipoPersonalizado' => $tipo,
60 'metadatosENI' => $vMetadatosENI,
61 'coleccionMetadatosPersonalizados' => $vMetadatosPersonalizados,
63 ),
'peticion', self::$NAMESPACE_GDE2);
65 $insertarDocumentoWSRequest = new \ArrayObject();
66 $insertarDocumentoWSRequest->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
67 $insertarDocumentoWSRequest->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
69 $miSoapRQ = new \SoapVar($insertarDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'insertarDocumento', self::$NAMESPACE_GDE2);
70 $respuesta = $clienteWS->insertarDocumento($miSoapRQ);
72 $vRespuesta = array();
73 if (is_object($respuesta))
82 $mensaje = $e->getMessage();
83 $mensaje = trim(strtolower($mensaje));
86 case 'looks like we got no xml document' :
88 $response = $clienteWS->__getLastResponse();
94 $this->aislarExcepcionGDE($e, $clienteWS);
117 $opcionesClienteWS = array (
118 'soap_version' => SOAP_1_1,
119 'user_agent' =>
'WSSSoapClient',
120 'exceptions' =>
true,
121 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
122 'trace' => self::$MYSOAPOP_TRACE
125 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
126 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
129 $peticionWSRequest = $composer->__cde__obtenerDocumento_full(
131 'referenciaDocumento' => $refDoc ,
132 'parcial' => $parcial
133 ),
'peticion', self::$NAMESPACE_GDE2);
135 $obtenerDocumentoWSRequest = new \ArrayObject();
136 $obtenerDocumentoWSRequest->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
137 $obtenerDocumentoWSRequest->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
139 $miSoapRQ = new \SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'obtenerDocumento', self::$NAMESPACE_GDE2);
140 $respuesta = $clienteWS->obtenerDocumento($miSoapRQ);
142 $vRespuesta = array();
143 if (is_object($respuesta))
152 $mensaje = $e->getMessage();
153 $mensaje = trim(strtolower($mensaje));
156 case 'looks like we got no xml document' :
158 $response = $clienteWS->__getLastResponse();
163 case 'gde_documentonoexistenteexception':
165 'respuesta' => array(
'correcto'=>
'false'),
166 'codMotivo' =>
'NOEXISTE',
167 'motivo' =>
'No existe ningún documento con la referencia '.$refDoc
172 $this->aislarExcepcionGDE($e, $clienteWS);
193 $opcionesClienteWS = array (
194 'soap_version' => SOAP_1_1,
195 'user_agent' =>
'WSSSoapClient',
196 'exceptions' =>
true,
197 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
198 'trace' => self::$MYSOAPOP_TRACE
201 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
202 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
205 $peticionWSRequest = $composer->__cde__eliminarDocumento_full(
207 'referenciaDocumento' => $refDoc
208 ),
'peticion', self::$NAMESPACE_GDE2);
210 $mainWS = new \ArrayObject();
211 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
212 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
214 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'eliminarDocumento', self::$NAMESPACE_GDE2);
215 $respuesta = $clienteWS->eliminarDocumento($miSoapRQ);
217 $vRespuesta = array();
218 if (is_object($respuesta))
227 $mensaje = $e->getMessage();
228 $mensaje = trim(strtolower($mensaje));
231 case 'looks like we got no xml document' :
233 $response = $clienteWS->__getLastResponse();
239 case 'gde_gestordocumentalexception' :
240 $mensaje = $e->detail->ExcepcionWS->detalleError;
241 $mensaje = trim(strtolower($mensaje));
242 if (strpos($mensaje,
'ya estaba borrado')===
false)
244 $this->tratarExcepcionEstandar($e, $clienteWS);
249 'respuesta' => array(
'correcto'=>
'false'),
250 'codMotivo' =>
'PREBORRADO',
251 'motivo' =>
'El documento ya había sido borrado' 256 case 'gde_documentonoexistenteexception':
258 'respuesta' => array(
'correcto'=>
'false'),
259 'codMotivo' =>
'NOEXISTE',
260 'motivo' =>
'No existe ningún documento con la referencia '.$refDoc
265 $this->aislarExcepcionGDE($e, $clienteWS);
286 $opcionesClienteWS = array (
287 'soap_version' => SOAP_1_1,
288 'user_agent' =>
'WSSSoapClient',
289 'exceptions' =>
true,
290 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
291 'trace' => self::$MYSOAPOP_TRACE
294 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
295 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
299 $peticionWSRequest = $composer->__cde__asociarFirmas_full(array(
'referenciaDocumento' => $refDoc,
'firmas' => $vFirmas),
'peticion', self::$NAMESPACE_GDE2);
301 $mainWS = new \ArrayObject();
302 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
303 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
305 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'asociarFirmas', self::$NAMESPACE_GDE2);
306 $respuesta = $clienteWS->asociarFirmas($miSoapRQ);
308 $vRespuesta = array();
309 if (is_object($respuesta))
318 $mensaje = $e->getMessage();
319 $mensaje = trim(strtolower($mensaje));
322 case 'looks like we got no xml document' :
324 $response = $clienteWS->__getLastResponse();
330 $this->aislarExcepcionGDE($e, $clienteWS);
354 public function buscarDocCriterio($codApp, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
358 $opcionesClienteWS = array (
359 'soap_version' => SOAP_1_1,
360 'user_agent' =>
'WSSSoapClient',
361 'exceptions' =>
true,
362 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
363 'trace' => self::$MYSOAPOP_TRACE
366 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
367 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
371 $peticionWSRequest = $composer->__cde__buscarDocCriterio_full(array(
'filtroPath' => $filtroPath,
'buscarInTree' => $buscarInTree,
'operacion' => $operacion,
'coleccionCriterios' => $coleccionCriterios),
'peticion', self::$NAMESPACE_GDE2);
373 $mainWS = new \ArrayObject();
374 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
375 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
377 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'buscarDocCriterio', self::$NAMESPACE_GDE2);
378 $respuesta = $clienteWS->buscarDocCriterio($miSoapRQ);
380 $vRespuesta = array();
381 if (is_object($respuesta))
390 $mensaje = $e->getMessage();
391 $mensaje = trim(strtolower($mensaje));
394 case 'looks like we got no xml document' :
396 $response = $clienteWS->__getLastResponse();
402 $this->aislarExcepcionGDE($e, $clienteWS);
425 public function buscarDocCriterioPaginado($codApp, $registrosPagina, $pagina, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null) {
428 $opcionesClienteWS = array (
429 'soap_version' => SOAP_1_1,
430 'user_agent' =>
'WSSSoapClient',
431 'exceptions' =>
true,
432 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
433 'trace' => self::$MYSOAPOP_TRACE
436 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
437 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
441 $peticionWSRequest = $composer->__cde__buscarDocCriterioPaginado_full(array(
'paginacion' => array(
'registrosPagina' => $registrosPagina,
'pagina' => $pagina),
'filtroPath' => $filtroPath,
'buscarInTree' => $buscarInTree,
'operacion' => $operacion,
'coleccionCriterios' => $coleccionCriterios),
'peticion', self::$NAMESPACE_GDE2);
443 $mainWS = new \ArrayObject();
444 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
445 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
447 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'buscarDocCriterioPaginado', self::$NAMESPACE_GDE2);
448 $respuesta = $clienteWS->buscarDocCriterioPaginado($miSoapRQ);
450 $vRespuesta = array();
451 if (is_object($respuesta))
460 $mensaje = $e->getMessage();
461 $mensaje = trim(strtolower($mensaje));
464 case 'looks like we got no xml document' :
466 $response = $clienteWS->__getLastResponse();
472 $this->aislarExcepcionGDE($e, $clienteWS);
488 public function crearCarpeta($codApp, $path, $tipo=null, $metadatosExpedienteEni=null, $coleccionMetadatosPersonalizados=null)
492 $opcionesClienteWS = array (
493 'soap_version' => SOAP_1_1,
494 'user_agent' =>
'WSSSoapClient',
495 'exceptions' =>
true,
496 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
497 'trace' => self::$MYSOAPOP_TRACE
500 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
501 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
505 $peticionWSRequest = $composer->__cde__crearCarpeta_full(
508 'tipoPersonalizado' => $tipo,
509 'metadatosExpedienteEni' => $metadatosExpedienteEni,
510 'coleccionMetadatosPersonalizados' => $coleccionMetadatosPersonalizados
511 ),
'peticion', self::$NAMESPACE_GDE2);
513 $mainWS = new \ArrayObject();
514 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
515 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
517 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'crearCarpeta', self::$NAMESPACE_GDE2);
518 $respuesta = $clienteWS->crearCarpeta($miSoapRQ);
520 $vRespuesta = array();
521 if (is_object($respuesta))
529 return $this->tratarInnerException($clienteWS, $e);
545 $opcionesClienteWS = array (
546 'soap_version' => SOAP_1_1,
547 'user_agent' =>
'WSSSoapClient',
548 'exceptions' =>
true,
549 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
550 'trace' => self::$MYSOAPOP_TRACE
553 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
554 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
558 $peticionWSRequest = $composer->__cde__eliminarCarpeta_full(
561 ),
'peticion', self::$NAMESPACE_GDE2);
563 $obtenerDocumentoWSRequest = new \ArrayObject();
564 $obtenerDocumentoWSRequest->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
565 $obtenerDocumentoWSRequest->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
567 $miSoapRQ = new \SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'eliminarCarpeta', self::$NAMESPACE_GDE2);
568 $respuesta = $clienteWS->eliminarCarpeta($miSoapRQ);
570 $vRespuesta = array();
571 if (is_object($respuesta))
580 $mensaje = $e->getMessage();
581 $mensaje = trim(strtolower($mensaje));
584 case 'looks like we got no xml document' :
586 $response = $clienteWS->__getLastResponse();
592 $this->aislarExcepcionGDE($e, $clienteWS);
612 $opcionesClienteWS = array (
613 'soap_version' => SOAP_1_1,
614 'user_agent' =>
'WSSSoapClient',
615 'exceptions' =>
true,
616 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
617 'trace' => self::$MYSOAPOP_TRACE
620 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
621 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
625 $peticionWSRequest = $composer->__cde__empaquetarDocumentoENI_full(array(
'contenido' => $contenido,
'metadatosENI' => $vMetadatosEni,
'firmas' => $vFirmas),
'peticion', self::$NAMESPACE_GDE2);
627 $mainWS = new \ArrayObject();
628 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
629 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
632 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'empaquetarDocumentoENI', self::$NAMESPACE_GDE2);
633 $respuesta = $clienteWS->empaquetarDocumentoENI($miSoapRQ);
635 $vRespuesta = array();
636 if (is_object($respuesta))
645 $mensaje = $e->getMessage();
646 $mensaje = trim(strtolower($mensaje));
649 case 'looks like we got no xml document' :
651 $response = $clienteWS->__getLastResponse();
657 $this->aislarExcepcionGDE($e, $clienteWS);
674 $opcionesClienteWS = array (
675 'soap_version' => SOAP_1_1,
676 'user_agent' =>
'WSSSoapClient',
677 'exceptions' =>
true,
678 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
679 'trace' => self::$MYSOAPOP_TRACE
682 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
683 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
687 $peticionWSRequest = $composer->__cde__establecerMetadatoCarpetasPersonalizados_full(array(
'path' => $path,
'coleccionMetadatosPersonalizados' => $vColMetadatosPers),
'peticion', self::$NAMESPACE_GDE2);
689 $mainWS = new \ArrayObject();
690 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
691 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
694 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'establecerMetadatoCarpetasPersonalizados', self::$NAMESPACE_GDE2);
695 $respuesta = $clienteWS->establecerMetadatoCarpetasPersonalizados($miSoapRQ);
697 $vRespuesta = array();
698 if (is_object($respuesta))
707 $mensaje = $e->getMessage();
708 $mensaje = trim(strtolower($mensaje));
711 case 'looks like we got no xml document' :
713 $response = $clienteWS->__getLastResponse();
719 $this->aislarExcepcionGDE($e, $clienteWS);
736 $opcionesClienteWS = array (
737 'soap_version' => SOAP_1_1,
738 'user_agent' =>
'WSSSoapClient',
739 'exceptions' =>
true,
740 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
741 'trace' => self::$MYSOAPOP_TRACE
744 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
745 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
749 $peticionWSRequest = $composer->__cde__establecerMetadatosCarpetaExpedienteENI_full(array(
'path' => $path,
'metadatosExpedienteEni' => $vMetadatosExpedienteEni),
'peticion', self::$NAMESPACE_GDE2);
751 $mainWS = new \ArrayObject();
752 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
753 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
756 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'establecerMetadatosCarpetaExpedienteENI', self::$NAMESPACE_GDE2);
757 $respuesta = $clienteWS->establecerMetadatosCarpetaExpedienteENI($miSoapRQ);
759 $vRespuesta = array();
760 if (is_object($respuesta))
769 $mensaje = $e->getMessage();
770 $mensaje = trim(strtolower($mensaje));
773 case 'looks like we got no xml document' :
775 $response = $clienteWS->__getLastResponse();
781 $this->aislarExcepcionGDE($e, $clienteWS);
802 $opcionesClienteWS = array (
803 'soap_version' => SOAP_1_1,
804 'user_agent' =>
'WSSSoapClient',
805 'exceptions' =>
true,
806 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
807 'trace' => self::$MYSOAPOP_TRACE
810 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
811 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
815 $peticionWSRequest = $composer->__cde__establecerMetadatosENI_full(array(
'referenciaDocumento' => $refDoc,
'metadatosENI' => $vMetadatosEni),
'peticion', self::$NAMESPACE_GDE2);
817 $mainWS = new \ArrayObject();
818 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
819 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
822 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'establecerMetadatosENI', self::$NAMESPACE_GDE2);
823 $respuesta = $clienteWS->establecerMetadatosENI($miSoapRQ);
825 $vRespuesta = array();
826 if (is_object($respuesta))
835 $mensaje = $e->getMessage();
836 $mensaje = trim(strtolower($mensaje));
839 case 'looks like we got no xml document' :
841 $response = $clienteWS->__getLastResponse();
847 $this->aislarExcepcionGDE($e, $clienteWS);
864 $opcionesClienteWS = array (
865 'soap_version' => SOAP_1_1,
866 'user_agent' =>
'WSSSoapClient',
867 'exceptions' =>
true,
868 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
869 'trace' => self::$MYSOAPOP_TRACE
872 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
873 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
877 $peticionWSRequest = $composer->__cde__establecerMetadatosPersonalizados_full(array(
'referenciaDocumento' => $refDoc,
'coleccionMetadatosPersonalizados' => $coleccionMetadatosPersonalizados),
'peticion', self::$NAMESPACE_GDE2);
879 $mainWS = new \ArrayObject();
880 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
881 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
884 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'establecerMetadatosPersonalizados', self::$NAMESPACE_GDE2);
885 $respuesta = $clienteWS->establecerMetadatosPersonalizados($miSoapRQ);
887 $vRespuesta = array();
888 if (is_object($respuesta))
897 $mensaje = $e->getMessage();
898 $mensaje = trim(strtolower($mensaje));
901 case 'looks like we got no xml document' :
903 $response = $clienteWS->__getLastResponse();
909 $this->aislarExcepcionGDE($e, $clienteWS);
926 $opcionesClienteWS = array (
927 'soap_version' => SOAP_1_1,
928 'user_agent' =>
'WSSSoapClient',
929 'exceptions' =>
true,
930 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
931 'trace' => self::$MYSOAPOP_TRACE
934 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
935 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
937 $mainWS = new \ArrayObject();
938 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
940 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'generarIdentificadorENI', self::$NAMESPACE_GDE2);
941 $respuesta = $clienteWS->generarIdentificadorENI($miSoapRQ);
943 $vRespuesta = array();
944 if (is_object($respuesta))
953 $mensaje = $e->getMessage();
954 $mensaje = trim(strtolower($mensaje));
957 case 'looks like we got no xml document' :
959 $response = $clienteWS->__getLastResponse();
965 $this->aislarExcepcionGDE($e, $clienteWS);
982 $opcionesClienteWS = array (
983 'soap_version' => SOAP_1_1,
984 'user_agent' =>
'WSSSoapClient',
985 'exceptions' =>
true,
986 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
987 'trace' => self::$MYSOAPOP_TRACE
990 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
991 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
994 $peticionWSRequest = $composer->__cde__generarToken_full(array(
'referenciaDocumento' => $vRefDoc),
'peticion', self::$NAMESPACE_GDE2);
996 $obtenerDocumentoWSRequest = new \ArrayObject();
997 $obtenerDocumentoWSRequest->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
998 $obtenerDocumentoWSRequest->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1000 $miSoapRQ = new \SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'generarToken', self::$NAMESPACE_GDE2);
1001 $respuesta = $clienteWS->generarToken($miSoapRQ);
1004 $vRespuesta = array();
1005 if (is_object($respuesta))
1009 return($vRespuesta);
1014 $mensaje = $e->getMessage();
1015 $mensaje = trim(strtolower($mensaje));
1018 case 'looks like we got no xml document' :
1020 $response = $clienteWS->__getLastResponse();
1026 $this->aislarExcepcionGDE($e, $clienteWS);
1046 public function insertarDocumentoENI($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo=null, $vMetaENI=null, $vMetaPers=null, $vFirmas=null)
1051 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_GDE2];
1054 $peticionWSRequest = $composer->__cde__insertarDocumentoENI_full(array(
'documentoENI' => $docContentB64,
'nombre' => $nombreDoc,
1055 'path' => $pathDoc,
'tipoPersonalizado' => $tipo,
'metadatosENI' => $vMetaENI,
'coleccionMetadatosPersonalizados' => $vMetaPers,
'firmas' => $vFirmas),
'peticion', self::$NAMESPACE_GDE2);
1057 $mainWS = new \ArrayObject();
1058 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1059 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1061 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'insertarDocumentoENI', self::$NAMESPACE_GDE2);
1062 $respuesta = $clienteWS->insertarDocumentoENI($miSoapRQ);
1065 $vRespuesta = array();
1066 if (is_object($respuesta))
1070 'referenciaDocumento' =>$respuesta->respuesta->referenciaDocumento,
1071 'nombre' => $respuesta->respuesta->nombre
1074 return($vRespuesta);
1079 $mensaje = $e->getMessage();
1080 $mensaje = trim(strtolower($mensaje));
1083 case 'looks like we got no xml document' :
1085 $response = $clienteWS->__getLastResponse();
1091 $this->aislarExcepcionGDE($e, $clienteWS);
1109 $opcionesClienteWS = array (
1110 'soap_version' => SOAP_1_1,
1111 'user_agent' =>
'WSSSoapClient',
1112 'exceptions' =>
true,
1113 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1114 'trace' => self::$MYSOAPOP_TRACE
1117 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1118 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1121 $peticionWSRequest = $composer->__cde__obtenerDocumentoENI_full(
1123 'referenciaDocumento' => $refDoc
1124 ),
'peticion', self::$NAMESPACE_GDE2);
1126 $mainWS = new \ArrayObject();
1127 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1128 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1130 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'obtenerDocumentoENI', self::$NAMESPACE_GDE2);
1131 $respuesta = $clienteWS->obtenerDocumentoENI($miSoapRQ);
1133 $vRespuesta = array();
1134 if (is_object($respuesta))
1138 return($vRespuesta);
1143 $mensaje = $e->getMessage();
1144 $mensaje = trim(strtolower($mensaje));
1147 case 'looks like we got no xml document' :
1149 $response = $clienteWS->__getLastResponse();
1155 $this->aislarExcepcionGDE($e, $clienteWS);
1177 public function obtenerExpedienteENI($codApp, $refDoc, $vMetadatosExpedienteEni, $idCertificadoSafe = null, $idSesionSafe = null)
1182 $opcionesClienteWS = array (
1183 'soap_version' => SOAP_1_1,
1184 'user_agent' =>
'WSSSoapClient',
1185 'exceptions' =>
true,
1186 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1187 'trace' => self::$MYSOAPOP_TRACE
1190 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1191 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1194 $peticionWSRequest = $composer->__cde__obtenerExpedienteENI_full(array(
'referenciaDocumento' => $refDoc,
'datosCertificado' => array(
'idCertificadoSafe' => $idCertificadoSafe,
'idSesionSafe' => $idSesionSafe),
'metadatosExpedienteEni' => $vMetadatosExpedienteEni),
'peticion', self::$NAMESPACE_GDE2);
1196 $mainWS = new \ArrayObject();
1197 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1198 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1200 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'obtenerExpedienteENI', self::$NAMESPACE_GDE2);
1201 $respuesta = $clienteWS->obtenerExpedienteENI($miSoapRQ);
1203 $vRespuesta = array();
1204 if (is_object($respuesta))
1208 return($vRespuesta);
1213 $mensaje = $e->getMessage();
1214 $mensaje = trim(strtolower($mensaje));
1217 case 'looks like we got no xml document' :
1219 $response = $clienteWS->__getLastResponse();
1225 $this->aislarExcepcionGDE($e, $clienteWS);
1245 $opcionesClienteWS = array (
1246 'soap_version' => SOAP_1_1,
1247 'user_agent' =>
'WSSSoapClient',
1248 'exceptions' =>
true,
1249 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1250 'trace' => self::$MYSOAPOP_TRACE
1253 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1254 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1258 $vDataPeticion = array(
'path' => $path);
1259 if (!is_null($idCertificadoSafe) && !is_null($idSesionSafe)) {
1260 $vDataPeticion = array(
'path' => $path,
'datosCertificado' => array(
'idCertificadoSafe' => $idCertificadoSafe,
'idSesionSafe' => $idSesionSafe));
1262 $peticionWSRequest = $composer->__cde__obtenerExpedienteENIdeCarpeta_full($vDataPeticion,
'peticion', self::$NAMESPACE_GDE2);
1264 $mainWS = new \ArrayObject();
1265 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1266 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1268 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'obtenerExpedienteENIdeCarpeta', self::$NAMESPACE_GDE2);
1269 $respuesta = $clienteWS->obtenerExpedienteENIdeCarpeta($miSoapRQ);
1271 $vRespuesta = array();
1272 if (is_object($respuesta))
1276 return($vRespuesta);
1281 $mensaje = $e->getMessage();
1282 $mensaje = trim(strtolower($mensaje));
1285 case 'looks like we got no xml document' :
1287 $response = $clienteWS->__getLastResponse();
1293 $this->aislarExcepcionGDE($e, $clienteWS);
1323 $opcionesClienteWS = array (
1324 'soap_version' => SOAP_1_1,
1325 'user_agent' =>
'WSSSoapClient',
1326 'exceptions' =>
true,
1327 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1328 'trace' => self::$MYSOAPOP_TRACE
1331 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1332 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1336 $vDataPeticion = array(
'referenciaDocumento' => $refDoc,
'pathDestino' => $pathDestino);
1337 $peticionWSRequest = $composer->__cde__moverDocumento_full($vDataPeticion,
'peticion', self::$NAMESPACE_GDE2);
1339 $mainWS = new \ArrayObject();
1340 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1341 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1343 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'moverDocumento', self::$NAMESPACE_GDE2);
1344 $respuesta = $clienteWS->moverDocumento($miSoapRQ);
1346 $vRespuesta = array();
1347 if (is_object($respuesta))
1351 return($vRespuesta);
1355 return $this->tratarInnerException($clienteWS, $e);
1379 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_GDE2];
1382 $peticionWSRequest = $composer->__cde__actualizarDocumento_full(
1384 'referenciaDocumento' => $refDoc,
1385 'contenido' => $docContentB64,
1386 'firmas' => $vFirmas
1387 ),
'peticion', self::$NAMESPACE_GDE2);
1389 $mainWS = new \ArrayObject();
1390 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1391 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1393 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'actualizarDocumento', self::$NAMESPACE_GDE2);
1394 $respuesta = $clienteWS->actualizarDocumento($miSoapRQ);
1396 $vRespuesta = array();
1397 if (is_object($respuesta))
1401 return($vRespuesta);
1405 return $this->tratarInnerException($clienteWS, $e);
1423 $opcionesClienteWS = array (
1424 'soap_version' => SOAP_1_1,
1425 'user_agent' =>
'WSSSoapClient',
1426 'exceptions' =>
true,
1427 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1428 'trace' => self::$MYSOAPOP_TRACE
1431 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1432 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1436 $vDataPeticion = array(
'referenciaDocumento' => $refDoc);
1437 $peticionWSRequest = $composer->__cde__obtenerListaVersionesDocumento_full($vDataPeticion,
'peticion', self::$NAMESPACE_GDE2);
1439 $WSRequest = new \ArrayObject();
1440 $WSRequest->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1441 $WSRequest->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1443 $miSoapRQ = new \SoapVar($WSRequest, SOAP_ENC_OBJECT,null,null,
'obtenerListaVersionesDocumento', self::$NAMESPACE_GDE2);
1444 $respuesta = $clienteWS->obtenerListaVersionesDocumento($miSoapRQ);
1446 $vRespuesta = array();
1447 if (is_object($respuesta))
1451 return($vRespuesta);
1455 return $this->tratarInnerException($clienteWS, $e);
1477 $opcionesClienteWS = array (
1478 'soap_version' => SOAP_1_1,
1479 'user_agent' =>
'WSSSoapClient',
1480 'exceptions' =>
true,
1481 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1482 'trace' => self::$MYSOAPOP_TRACE
1485 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1486 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1490 $vDataPeticion = array(
'referenciaDocumento' => $refDoc,
'version' => $version,
'parcial' => $parcial);
1491 $peticionWSRequest = $composer->__cde__restaurarVersionDocumento_full($vDataPeticion,
'peticion', self::$NAMESPACE_GDE2);
1493 $obtenerDocumentoWSRequest = new \ArrayObject();
1494 $obtenerDocumentoWSRequest->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1495 $obtenerDocumentoWSRequest->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1497 $miSoapRQ = new \SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'restaurarVersionDocumento', self::$NAMESPACE_GDE2);
1498 $respuesta = $clienteWS->restaurarVersionDocumento($miSoapRQ);
1500 $vRespuesta = array();
1501 if (is_object($respuesta))
1505 return($vRespuesta);
1509 return $this->tratarInnerException($clienteWS, $e);
1528 $opcionesClienteWS = array (
1529 'soap_version' => SOAP_1_1,
1530 'user_agent' =>
'WSSSoapClient',
1531 'exceptions' =>
true,
1532 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1533 'trace' => self::$MYSOAPOP_TRACE
1536 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1537 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1541 $vDataPeticion = array(
'referenciaDocumento' => $refDoc);
1542 $peticionWSRequest = $composer->__cde__obtenerPathDocumento_full($vDataPeticion,
'peticion', self::$NAMESPACE_GDE2);
1544 $mainWS = new \ArrayObject();
1545 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1546 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1548 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'obtenerPathDocumento', self::$NAMESPACE_GDE2);
1549 $respuesta = $clienteWS->obtenerPathDocumento($miSoapRQ);
1551 $vRespuesta = array();
1552 if (is_object($respuesta))
1556 return($vRespuesta);
1560 return $this->tratarInnerException($clienteWS, $e);
1579 $opcionesClienteWS = array (
1580 'soap_version' => SOAP_1_1,
1581 'user_agent' =>
'WSSSoapClient',
1582 'exceptions' =>
true,
1583 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1584 'trace' => self::$MYSOAPOP_TRACE
1587 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1588 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1592 $peticionWSRequest = $composer->__cde__eliminarCarpetaRecursiva_full(array(
'path' => $path),
'peticion', self::$NAMESPACE_GDE2);
1594 $obtenerDocumentoWSRequest = new \ArrayObject();
1595 $obtenerDocumentoWSRequest->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1596 $obtenerDocumentoWSRequest->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1598 $miSoapRQ = new \SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'eliminarCarpetaRecursiva', self::$NAMESPACE_GDE2);
1599 $respuesta = $clienteWS->eliminarCarpetaRecursiva($miSoapRQ);
1601 $vRespuesta = array();
1602 if (is_object($respuesta))
1606 return($vRespuesta);
1610 return $this->tratarInnerException($clienteWS, $e);
1629 $opcionesClienteWS = array (
1630 'soap_version' => SOAP_1_1,
1631 'user_agent' =>
'WSSSoapClient',
1632 'exceptions' =>
true,
1633 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1634 'trace' => self::$MYSOAPOP_TRACE
1637 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1638 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1642 $vDataPeticion = array(
'pathOrigen' => $pathOrigen,
'pathDestino' => $pathDestino);
1643 $peticionWSRequest = $composer->__cde__moverCarpeta_full($vDataPeticion,
'peticion', self::$NAMESPACE_GDE2);
1645 $mainWS = new \ArrayObject();
1646 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1647 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1649 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'moverCarpeta', self::$NAMESPACE_GDE2);
1650 $respuesta = $clienteWS->moverCarpeta($miSoapRQ);
1652 $vRespuesta = array();
1653 if (is_object($respuesta))
1657 return($vRespuesta);
1661 return $this->tratarInnerException($clienteWS, $e);
1682 $opcionesClienteWS = array (
1683 'soap_version' => SOAP_1_1,
1684 'user_agent' =>
'WSSSoapClient',
1685 'exceptions' =>
true,
1686 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1687 'trace' => self::$MYSOAPOP_TRACE
1690 $this->
__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
1691 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
1694 $peticionWSRequest = $composer->__cde__obtenerVersionDocumento_full(
1696 'referenciaDocumento' => $refDoc,
1697 'parcial' => $parcial,
1698 'version' => $version
1699 ),
'peticion', self::$NAMESPACE_GDE2);
1701 $mainWS = new \ArrayObject();
1702 $mainWS->append(
new \
SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
1703 $mainWS->append(
new \
SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
1705 $miSoapRQ = new \SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'obtenerVersionDocumento', self::$NAMESPACE_GDE2);
1706 $respuesta = $clienteWS->obtenerVersionDocumento($miSoapRQ);
1708 $vRespuesta = array();
1709 if (is_object($respuesta))
1713 return($vRespuesta);
1717 return $this->tratarInnerException($clienteWS, $e);
1740 if ($esProduccion) {
1741 $urlPeticion = URL_FRONT_PRODUCCION;
1744 return $urlPeticion .
'getToken?token=' . $token;
1762 if ($esProduccion) {
1763 $urlPeticion = URL_FRONT_PRODUCCION;
1766 return $urlPeticion .
'getId?codigoAplicacion=' . $codApp .
'&ref=' . $refDoc;
1799 public function insertarDocumentoGDE2($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo = null, $vMetadatosENI = null, $vMetadatosPersonalizados=null, $vFirmas=null)
1801 return $this->
insertarDocumento($codApp, $docContentB64, $nombreDoc, $pathDoc, $tipo, $vMetadatosENI, $vMetadatosPersonalizados, $vFirmas);
1872 public function buscarDocCriterioGDE2($codApp, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
1874 return $this->
buscarDocCriterio($codApp, $filtroPath, $buscarInTree, $operacion, $coleccionCriterios);
1895 public function buscarDocCriterioPaginadoGDE2($codApp, $registrosPagina, $pagina, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
1897 return $this->
buscarDocCriterioPaginado($codApp, $registrosPagina, $pagina, $filtroPath, $buscarInTree, $operacion, $coleccionCriterios);
1911 public function crearCarpetaGDE2($codApp, $path, $tipo=null, $metadatosExpedienteEni=null, $coleccionMetadatosPersonalizados=null)
1913 return $this->
crearCarpeta($codApp, $path, $tipo, $metadatosExpedienteEni, $coleccionMetadatosPersonalizados);
2037 public function insertarDocumentoENIGDE2($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo=null, $vMetaENI=null, $vMetaPers=null, $vFirmas=null)
2039 return $this->
insertarDocumentoENI($codApp, $docContentB64, $nombreDoc, $pathDoc, $tipo, $vMetaENI, $vMetaPers, $vFirmas);
2074 return $this->
obtenerExpedienteENI($codApp, $refDoc, $vMetadatosExpedienteEni, $idCertificadoSafe, $idSesionSafe);
2102 private function tratarInnerException($clienteWS, $e)
2105 $mensaje = $e->getMessage();
2106 $mensaje = trim(strtolower($mensaje));
2109 case 'looks like we got no xml document' :
2111 $response = $clienteWS->__getLastResponse();
2117 $this->aislarExcepcionGDE($e, $clienteWS);
2130 private function aislarExcepcionGDE($e, $clienteWS)
2136 if ($e instanceof \SoapFault) {
2137 if ($e->faultcode ==
'soap:Server') {
2140 if (isset($e->detail)) {
2152 $this->tratarExcepcionEstandar($e, $clienteWS);
2174 const CODE_UsuarioNoAutorizado = 1;
2175 const CODE_AplicacionNoExistente = 2;
2176 const CODE_GestorDocumental = 3;
2177 const CODE_LimiteRegistrosSobrepasado = 4;
2178 const CODE_IdentificadorENINoValido = 5;
2179 const CODE_EniConverterter = 6;
2180 const CODE_DocumentoNoInteroperable = 7;
2181 const CODE_TokenYaUtilizado = 8;
2182 const CODE_TokenCaducado = 9;
2183 const CODE_TokenIncorrecto = 10;
2184 const CODE_ExpedienteNoInteroperable = 11;
2185 const CODE_XMLExpedienteNoValido = 12;
2186 const CODE_DocumentoVacio = 13;
2187 const CODE_DocumentoNoExistente = 14;
2188 const CODE_PathAutoNoDisponible = 15;
2194 const MSG_AplicacionNoExistente =
'GDE_AplicacionNoExistenteException';
2195 const MSG_GestorDocumental =
'GDE_GestorDocumentalException';
2196 const MSG_LimiteRegistrosSobrepasado =
'GDE_LimiteRegistrosSobrepasadoException';
2197 const MSG_IdentificadorENINoValido =
'GDE_IdentificadorENINoValidoException';
2198 const MSG_EniConverterter =
'GDE_EniConverterterException';
2199 const MSG_DocumentoNoInteroperable =
'GDE_DocumentoNoInteroperableException';
2200 const MSG_TokenYaUtilizado =
'GDE_TokenYaUtilizadoException';
2201 const MSG_TokenCaducado =
'GDE_TokenCaducadoException';
2202 const MSG_TokenIncorrecto =
'GDE_TokenIncorrectoException';
2203 const MSG_ExpedienteNoInteroperable =
'GDE_ExpedienteNoInteroperableException';
2204 const MSG_XMLExpedienteNoValido =
'GDE_XMLExpedienteNoValidoException';
2205 const MSG_DocumentoVacio =
'GDE_DocumentoVacioException';
2206 const MSG_DocumentoNoExistente =
'GDE_DocumentoNoExistenteException';
2207 const MSG_PathAutoNoDisponible =
'GDE_PathAutoNoDisponibleException';
2213 private $exceptionWS = null;
2222 return $this->exceptionWS;
2226 public function __construct($code, $message, $exceptionWS = null) {
2228 parent::__construct($message, $code);
2230 $this->exceptionWS = $exceptionWS;
2233 public function __toString() {
2234 return __CLASS__ .
": [{$this->code}]: {$this->message}\n";
2244 switch ($this->getCode()) {
2245 case GDE2Exception::CODE_UsuarioNoAutorizado:
2246 return "UsuarioNoAutorizado";
2249 case GDE2Exception::CODE_AplicacionNoExistente:
2250 return "AplicacionNoExistente";
2253 case GDE2Exception::CODE_GestorDocumental:
2254 return "GestorDocumental";
2257 case GDE2Exception::CODE_LimiteRegistrosSobrepasado:
2258 return "LimiteRegistrosSobrepasado";
2261 case GDE2Exception::CODE_IdentificadorENINoValido:
2262 return "IdentificadorENINoValido";
2265 case GDE2Exception::CODE_EniConverterter:
2266 return "EniConverterter";
2269 case GDE2Exception::CODE_DocumentoNoInteroperable:
2270 return "DocumentoNoInteroperable";
2273 case GDE2Exception::CODE_TokenYaUtilizado:
2274 return "TokenYaUtilizado";
2277 case GDE2Exception::CODE_TokenCaducado:
2278 return "TokenCaducado";
2281 case GDE2Exception::CODE_TokenIncorrecto:
2282 return "TokenIncorrecto";
2285 case GDE2Exception::CODE_ExpedienteNoInteroperable:
2286 return "ExpedienteNoInteroperable";
2289 case GDE2Exception::CODE_XMLExpedienteNoValido:
2290 return "XMLExpedienteNoValido";
2293 case GDE2Exception::CODE_DocumentoVacio:
2294 return "DocumentoVacio";
2297 case GDE2Exception::CODE_DocumentoNoExistente:
2298 return "DocumentoNoExistente";
2301 case GDE2Exception::CODE_PathAutoNoDisponible:
2302 return "PathAutoNoDisponible";
2307 return "Desconocido";
2321 return GDE2Exception::CODE_UsuarioNoAutorizado;
2323 if ($faultcode == GDE2Exception::MSG_AplicacionNoExistente) {
2324 return GDE2Exception::CODE_AplicacionNoExistente;
2326 if ($faultcode == GDE2Exception::MSG_GestorDocumental) {
2327 return GDE2Exception::CODE_GestorDocumental;
2329 if ($faultcode == GDE2Exception::MSG_LimiteRegistrosSobrepasado) {
2330 return GDE2Exception::CODE_LimiteRegistrosSobrepasado;
2332 if ($faultcode == GDE2Exception::MSG_IdentificadorENINoValido) {
2333 return GDE2Exception::CODE_IdentificadorENINoValido;
2335 if ($faultcode == GDE2Exception::MSG_EniConverterter) {
2336 return GDE2Exception::CODE_EniConverterter;
2338 if ($faultcode == GDE2Exception::MSG_DocumentoNoInteroperable) {
2339 return GDE2Exception::CODE_DocumentoNoInteroperable;
2341 if ($faultcode == GDE2Exception::MSG_TokenYaUtilizado) {
2342 return GDE2Exception::CODE_TokenYaUtilizado;
2344 if ($faultcode == GDE2Exception::MSG_TokenCaducado) {
2345 return GDE2Exception::CODE_TokenCaducado;
2347 if ($faultcode == GDE2Exception::MSG_TokenIncorrecto) {
2348 return GDE2Exception::CODE_TokenIncorrecto;
2350 if ($faultcode == GDE2Exception::MSG_ExpedienteNoInteroperable) {
2351 return GDE2Exception::CODE_ExpedienteNoInteroperable;
2353 if ($faultcode == GDE2Exception::MSG_XMLExpedienteNoValido) {
2354 return GDE2Exception::CODE_XMLExpedienteNoValido;
2356 if ($faultcode == GDE2Exception::MSG_DocumentoVacio) {
2357 return GDE2Exception::CODE_DocumentoVacio;
2359 if ($faultcode == GDE2Exception::MSG_DocumentoNoExistente) {
2360 return GDE2Exception::CODE_DocumentoNoExistente;
2362 if ($faultcode == GDE2Exception::MSG_PathAutoNoDisponible) {
2363 return GDE2Exception::CODE_PathAutoNoDisponible;
moverDocumento($codApp, $refDoc, $pathDestino)
obtenerDocumentoENIGDE2($codApp, $refDoc)
generarTokenGDE2($codApp, $vRefDoc)
obtenerExpedienteENIGDE2($codApp, $refDoc, $vMetadatosExpedienteEni, $idCertificadoSafe=null, $idSesionSafe=null)
eliminarCarpetaRecursiva($codApp, $path)
eliminarCarpetaGDE2($codApp, $path)
establecerMetadatoCarpetasPersonalizadosGDE2($codApp, $path, $vColMetadatosPers)
tratarMTOMEstandar($response, $itemToReturn=null)
obtenerDocumento($codApp, $refDoc, $parcial='1')
establecerMetadatosPersonalizados($codApp, $refDoc, $coleccionMetadatosPersonalizados)
generarIdentificadorENI($codApp)
buscarDocCriterioPaginadoGDE2($codApp, $registrosPagina, $pagina, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
establecerMetadatosCarpetaExpedienteENI($codApp, $path, $vMetadatosExpedienteEni)
empaquetarDocumentoENI($codApp, $contenido, $vMetadatosEni, $vFirmas)
eliminarCarpeta($codApp, $path)
obtenerExpedienteENI($codApp, $refDoc, $vMetadatosExpedienteEni, $idCertificadoSafe=null, $idSesionSafe=null)
obtenerExpedienteENIdeCarpeta($codApp, $path, $idCertificadoSafe=null, $idSesionSafe=null)
insertarDocumentoENIGDE2($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo=null, $vMetaENI=null, $vMetaPers=null, $vFirmas=null)
obtenerListaVersionesDocumento($codApp, $refDoc)
asociarFirmasGDE2($codApp, $refDoc, $vFirmas)
buscarDocCriterioGDE2($codApp, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
crearCarpetaGDE2($codApp, $path, $tipo=null, $metadatosExpedienteEni=null, $coleccionMetadatosPersonalizados=null)
generarIdentificadorENIGDE2($codApp)
actualizarDocumento($codApp, $refDoc, $docContentB64, $vFirmas=null)
buscarDocCriterioPaginado($codApp, $registrosPagina, $pagina, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
const MSG_UsuarioNoAutorizado
eliminarDocumentoGDE2($codApp, $refDoc)
const URL_FRONT_DESARROLLO
obtenerDocumentoGDE2($codApp, $refDoc, $parcial='1')
moverCarpeta($codApp, $pathOrigen, $pathDestino)
establecerMetadatosCarpetaExpedienteENIGDE2($codApp, $path, $vMetadatosExpedienteEni)
restaurarVersionDocumento($codApp, $refDoc, $version, $parcial)
insertarDocumentoGDE2($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo=null, $vMetadatosENI=null, $vMetadatosPersonalizados=null, $vFirmas=null)
insertarDocumentoENI($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo=null, $vMetaENI=null, $vMetaPers=null, $vFirmas=null)
establecerMetadatosENI($codApp, $refDoc, $vMetadatosEni)
eliminarDocumento($codApp, $refDoc)
establecerMetadatosPersonalizadosGDE2($codApp, $refDoc, $coleccionMetadatosPersonalizados)
crearCarpeta($codApp, $path, $tipo=null, $metadatosExpedienteEni=null, $coleccionMetadatosPersonalizados=null)
insertarDocumento($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo=null, $vMetadatosENI=null, $vMetadatosPersonalizados=null, $vFirmas=null)
asociarFirmas($codApp, $refDoc, $vFirmas)
front_obtenerIdentificadorGDE($esProduccion, $codApp, $refDoc)
establecerMetadatosENIGDE2($codApp, $refDoc, $vMetadatosEni)
obtenerVersionDocumento($codApp, $refDoc, $parcial, $version)
obtenerExpedienteENIdeCarpetaGDE2($codApp, $path, $idCertificadoSafe=null, $idSesionSafe=null)
__clienteOn($tipo, $trazabilidadPai=true, $opcionesClienteWS=null)
buscarDocCriterio($codApp, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
obtenerDocumentoENI($codApp, $refDoc)
generarToken($codApp, $vRefDoc)
front_obtenerDocumentoAPartirDeToken($esProduccion, $token)
obtenerPathDocumento($codApp, $refDoc)
static getCodeFromFaultCode($faultcode)
empaquetarDocumentoENIGDE2($codApp, $contenido, $vMetadatosEni, $vFirmas)
establecerMetadatoCarpetasPersonalizados($codApp, $path, $vColMetadatosPers)