18 define(
'DEBUG',
false);
23 require_once
'WSSSoapClient.php';
58 const KEYCLIENTE_AUTORIZA =
'autoriza';
59 const KEYCLIENTE_FIRMA =
'firma';
60 const KEYCLIENTE_GDE =
'gde';
61 const KEYCLIENTE_SALT =
'salt';
62 const KEYCLIENTE_CSV =
'csv';
63 const KEYCLIENTE_CATASTRO =
'catastro';
64 const KEYCLIENTE_CATASTRO_BIENES =
'catbienes';
65 const KEYCLIENTE_GDE2 =
'gde2';
66 const KEYCLIENTE_PF =
'pfcons';
67 const KEYCLIENTE_PF_MOD =
'pfmod';
68 const KEYCLIENTE_PF_ADM =
'pfadm';
75 const TIPOBUSQUEDA_GRUPO =
'GRUPO';
84 private static $MYSOAPOP_TRACE =
true;
85 private static $MYSOAPOP_WSDL_CACHE = WSDL_CACHE_BOTH;
92 private static $NAMESPACE_GVA =
'http://dgm.gva.es/ayf/war/schemas/v2_00';
93 private static $NAMESPACE_GDE =
'urn:es:gva:dgm:tra:gde:vista:model';
94 private static $NAMESPACE_SALT =
'http://salt.ws.edu.gva.es/';
95 private static $NAMESPACE_CSVGVA =
'urn:es:gva:dgm:tra:csvgva';
96 private static $NAMESPACE_GDE2 =
'urn:es:gva:dgm:tra:gde:vista:v2:model';
97 private static $NAMESPACE_CAT_ESP =
'http://intermediacion.redsara.es/scsp/esquemas/datosespecificos';
98 private static $NAMESPACE_CAT_PET =
'http://intermediacion.redsara.es/scsp/esquemas/V3/peticion';
99 private static $NAMESPACE_CAT_SR =
'http://intermediacion.redsara.es/scsp/esquemas/V3/solicitudRespuesta';
100 private static $NAMESPACE_PF = null;
101 private static $NAMESPACE_PF_MOD = null;
102 private static $NAMESPACE_PF_ADM = null;
116 private $WSDLTimeOut;
123 private $v_clienteWS;
138 private $passPhrase=null;
145 private $certFile=
'';
151 private $certSerial=null;
172 protected $vTrazabilidad;
179 protected $enableWSSecurity =
true;
198 $this->v_clienteWS = array
200 self::KEYCLIENTE_AUTENTICA => null,
201 self::KEYCLIENTE_AUTORIZA => null,
202 self::KEYCLIENTE_CATASTRO => null,
203 self::KEYCLIENTE_CATASTRO_BIENES => null,
204 self::KEYCLIENTE_CSV => null,
205 self::KEYCLIENTE_FIRMA => null,
206 self::KEYCLIENTE_GDE => null,
207 self::KEYCLIENTE_GDE2 => null,
208 self::KEYCLIENTE_PF => null,
209 self::KEYCLIENTE_PF_ADM => null,
210 self::KEYCLIENTE_PF_MOD => null,
211 self::KEYCLIENTE_SALT => null,
215 if (!is_array($v_wsdl))
217 throw new Exception (
218 __CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
219 'v_wsdl debe ser un array asociativo (autenticacion,autorizacion,firma) con las URI de los WSDL' 223 $this->v_wsdl = $v_wsdl;
225 if (!is_array($v_datosCertif))
227 throw new Exception (
228 __CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
229 'v_datosCertif debe ser un array asociativo (rutaCert, rutaKey, passphrase) con las rutas a los certificados' 239 $this->vTrazabilidad = null;
242 $this->vTrazabilidad = array (
250 $this->_debugInfo = array();
251 $this->WSDLTimeOut = 20;
267 return($this->_debugMode);
279 return $this->_debugInfo;
292 self::$MYSOAPOP_TRACE =
true;
293 $this->_debugMode = $activo;
296 self::$MYSOAPOP_WSDL_CACHE = WSDL_CACHE_NONE;
300 self::$MYSOAPOP_WSDL_CACHE = WSDL_CACHE_BOTH;
301 $this->_debugInfo = array();
316 $this->_debugInfo[] = $info;
331 $this->keyFile = $pathKey;
343 $this->passPhrase = $passphrase;
355 $this->certFile = $pathCert;
367 $this->WSDLTimeOut = $segs;
380 $certFile = realpath($this->certFile);
381 $cert = file_get_contents($certFile);
382 $v_certData = openssl_x509_parse($cert,
true);
383 $this->certSerial = strtoupper(self::numberBaseConvert($v_certData[
'serialNumber']));
384 return $this->certSerial;
396 if (!is_array($vTrazabilidadPAI))
398 throw new Exception(
'Las opciones de trazabilidad deben ser un array asociativo');
400 if (!array_key_exists(
'idApp', $vTrazabilidadPAI))
402 throw new Exception(
'Es necesaria KEY "idApp" con el id CATI de la aplicación');
405 $this->vTrazabilidad = $vTrazabilidadPAI;
407 if (!array_key_exists(
'nsCert', $vTrazabilidadPAI))
434 public function tratarExcepcionEstandar($e, $clienteWS)
438 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
439 if (is_object($clienteWS))
441 $this->
addDebugInfo(
"RqH:\n ".$clienteWS->__getLastRequestHeaders());
442 $this->
addDebugInfo(
"Rq:\n ".$clienteWS->__getLastRequest());
443 $this->
addDebugInfo(
"RsH:\n ".$clienteWS->__getLastResponse());
444 $this->
addDebugInfo(
"Rs:\n ".$clienteWS->__getLastResponseHeaders());
471 $chars =
"0123456789abcdefghijklmnopqrstuvwxyz";
472 $tostring = substr($chars, 0, $tobase);
473 $length = strlen($numstring);
476 for ($i = 0; $i < $length; $i++)
478 $number[$i] = strpos($chars, $numstring{$i});
484 for ($i = 0; $i < $length; $i++)
486 $divide = $divide * $frombase + $number[$i];
487 if ($divide >= $tobase)
489 $number[$newlen++] = (int)($divide / $tobase);
490 $divide = $divide % $tobase;
491 } elseif ($newlen > 0)
493 $number[$newlen++] = 0;
497 $result = $tostring{$divide} . $result;
498 }
while ($newlen != 0);
510 private function tratarRespuestaMTOM($response)
512 $vRespuesta = preg_grep(
"/<[a-z]*:Envelope.*?>(.*)<\/[a-z]*:Envelope>/i", explode(
"\n", $response));
513 $cadenaRespuesta = array_shift(array_slice($vRespuesta, 0, 1));
515 $dom =
new DOMDocument(
'1.0');
516 $dom->loadXML($cadenaRespuesta);
517 $xpath =
new DOMXpath($dom);
518 $vNodoRespuesta = $xpath->query(
"/*[local-name()='Envelope']/*[local-name()='Body']//*[local-name()='respuesta']");
519 $nodoRespuesta = $vNodoRespuesta->item(0);
522 return $this->xml_to_array($nodoRespuesta);
538 $vRespuesta = preg_grep(
"/<[a-z]*:Envelope.*?>(.*)<\/[a-z]*:Envelope>/i", explode(
"\n", $response));
540 $vSlice = array_slice($vRespuesta, 0, 1);
541 $cadenaRespuesta = array_shift($vSlice);
543 $dom =
new DOMDocument(
'1.0');
544 $dom->loadXML($cadenaRespuesta);
545 $xpath =
new DOMXpath($dom);
548 if (!empty($itemToReturn))
550 $subStrXpath =
"/*[local-name()='{$itemToReturn}']";
552 $vNodoRespuesta = $xpath->query(
"/*[local-name()='Envelope']/*[local-name()='Body']/*".$subStrXpath);
553 $nodoRespuesta = $vNodoRespuesta->item(0);
556 $mimeBoundary =
'--MIME_Boundary';
557 $vBodyResponse = explode($mimeBoundary, $response);
558 $numElementos = count($vBodyResponse);
560 if ($numElementos==0)
562 $mimeBoundary =
'--uuid:';
563 $vBodyResponse = explode($mimeBoundary, $response);
564 $numElementos = count($vBodyResponse);
570 $oMime = $oMimeParser->decode($response);
572 $vNodoInclude = $xpath->query(
"//*[local-name()='Include']");
573 foreach ($vNodoInclude as $nodoItem)
575 $subIdBuscado = (string) $nodoItem->getAttribute(
'href');
576 $subIdBuscado = urldecode($subIdBuscado);
577 $idBuscado =
'<'.substr($subIdBuscado, 4).
'>';
578 foreach ($oMime->parts as $clave => $parte)
580 $idAnexoMime = $parte->headers[
'content-id'];
581 if ($idBuscado == $idAnexoMime)
583 $contenidoB64 = $parte->body;
584 $prefijoMime = strtolower(substr($parte->mimetype,0,4));
585 if ($prefijoMime!==
'text')
587 $contenidoB64 = base64_encode($parte->body);
589 $textNode = $dom->createTextNode($contenidoB64);
590 $nodoItem->parentNode->replaceChild($textNode, $nodoItem);
595 $vRepuesta = $this->xml_to_array($nodoRespuesta);
602 private function tratarMTOM4PF($response, $autoDetectSeparator =
false, $crlf =
"\n", $itemToReturn =
'respuesta') {
604 $mimeBoundary =
'--MIME_Boundary';
605 if ($autoDetectSeparator ===
true) {
607 $end = strpos($response, $crlf);
608 $mimeBoundary = substr($response, $start, $end-$start);
613 $vBodyResponse = explode($mimeBoundary, $response);
617 $oMime = $oMimeParser->decode($response);
620 $vRespuesta = preg_grep(
"/<[a-z]*:Envelope.*?>(.*)<\/[a-z]*:Envelope>/i", explode($crlf, $response));
621 $vSlice = array_slice($vRespuesta, 0, 1);
622 $respuestaSoap = array_shift($vSlice);
625 $dom =
new DOMDocument(
'1.0');
626 $dom->loadXML($respuestaSoap);
627 $xpath =
new DOMXpath($dom);
628 $vNodoRespuesta = $xpath->query(
"/*[local-name()='Envelope']/*[local-name()='Body']//*[local-name()='". $itemToReturn .
"']");
629 $nodoRespuesta = $vNodoRespuesta->item(0);
632 $vNodoInclude = $xpath->query(
"//*[local-name()='Include']");
633 foreach ($vNodoInclude as $nodoItem)
635 $subIdBuscado = (string) $nodoItem->getAttribute(
'href');
636 $subIdBuscado = urldecode($subIdBuscado);
637 $idBuscado =
'<'.substr($subIdBuscado, 4).
'>';
638 foreach ($oMime->parts as $clave => $parte)
640 $idAnexoMime = $parte->headers[
'content-id'];
641 if ($idBuscado == $idAnexoMime)
643 $contenidoB64 = $parte->body;
644 if (($parte->mimetype ==
'content/octet-stream') || ($parte->mimetype ==
'application/pdf'))
646 $contenidoB64 = base64_encode($parte->body);
648 $textNode = $dom->createTextNode($contenidoB64);
649 $nodoItem->parentNode->replaceChild($textNode, $nodoItem);
655 return $this->xml_to_array($nodoRespuesta);
659 private function xml_to_array($root)
663 if ($root->hasAttributes()) {
664 $attrs = $root->attributes;
665 foreach ($attrs as $attr) {
666 $result[
'@attributes'][$attr->name] = $attr->value;
670 if ($root->hasChildNodes()) {
671 $children = $root->childNodes;
672 if ($children->length == 1) {
673 $child = $children->item(0);
674 if ($child->nodeType == XML_TEXT_NODE) {
675 $result[
'_value'] = $child->nodeValue;
676 return count($result) == 1 ? $result[
'_value'] : $result;
680 foreach ($children as $child) {
681 if (!isset($result[$child->nodeName])) {
682 $result[$child->nodeName] = $this->xml_to_array($child);
684 if (!isset($groups[$child->nodeName])) {
685 $result[$child->nodeName] = array($result[$child->nodeName]);
686 $groups[$child->nodeName] = 1;
688 $result[$child->nodeName][] = $this->xml_to_array($child);
718 $this->__clienteOn(self::KEYCLIENTE_AUTENTICA,
true);
719 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_AUTENTICA];
722 $autenticaUsuarioWSRequest =
new ArrayObject();
723 $autenticaUsuarioWSRequest->append(
new SoapVar($user,XSD_STRING,null,null,
'usuarioLDAP', self::$NAMESPACE_GVA));
724 $autenticaUsuarioWSRequest->append(
new SoapVar($pass,XSD_STRING,null,null,
'pwdLDAP', self::$NAMESPACE_GVA));
725 $miSoapRQ =
new SoapVar($autenticaUsuarioWSRequest, SOAP_ENC_OBJECT,null,null,
'autenticaUsuarioWSRequest', self::$NAMESPACE_GVA);
726 $token = $clienteWS->autenticaUsuarioWS($miSoapRQ);
730 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
731 if (is_object($clienteWS))
733 $this->
addDebugInfo(
"RqH:\n ".$clienteWS->__getLastRequestHeaders());
734 $this->
addDebugInfo(
"Rq:\n ".$clienteWS->__getLastRequest());
735 $this->
addDebugInfo(
"RsH:\n ".$clienteWS->__getLastResponse());
736 $this->
addDebugInfo(
"Rs:\n ".$clienteWS->__getLastResponseHeaders());
740 if (is_object($token))
741 if (property_exists($token,
'token'))
742 if (!empty($token->token))
747 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Token vacío');
754 $this->tratarExcepcionEstandar($e, $clienteWS);
776 $this->__clienteOn(self::KEYCLIENTE_AUTENTICA,
true);
777 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_AUTENTICA];
779 $autenticaUsuarioLDAPWSRequest =
new ArrayObject();
780 $autenticaUsuarioLDAPWSRequest->append(
new SoapVar($user,XSD_STRING,null,null,
'usuarioLDAP', self::$NAMESPACE_GVA));
781 $autenticaUsuarioLDAPWSRequest->append(
new SoapVar($pass,XSD_STRING,null,null,
'pwdLDAP', self::$NAMESPACE_GVA));
782 $miSoapRQ =
new SoapVar($autenticaUsuarioLDAPWSRequest, SOAP_ENC_OBJECT,null,null,
'autenticaUsuarioLDAPWSRequest', self::$NAMESPACE_GVA);
783 $token = $clienteWS->autenticaUsuarioLDAPWS($miSoapRQ);
787 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
788 if (is_object($clienteWS))
790 $this->
addDebugInfo(
"RqH:\n ".$clienteWS->__getLastRequestHeaders());
791 $this->
addDebugInfo(
"Rq:\n ".$clienteWS->__getLastRequest());
792 $this->
addDebugInfo(
"RsH:\n ".$clienteWS->__getLastResponse());
793 $this->
addDebugInfo(
"Rs:\n ".$clienteWS->__getLastResponseHeaders());
797 if (is_object($token))
798 if (property_exists($token,
'token'))
799 if (!empty($token->token))
804 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Token vacío');
811 $this->tratarExcepcionEstandar($e, $clienteWS);
832 $this->__clienteOn(self::KEYCLIENTE_AUTENTICA);
833 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_AUTENTICA];
834 $autenticaConFirmaWSRequest =
new ArrayObject();
835 $autenticaConFirmaWSRequest->append(
new SoapVar($firmaB64, XSD_STRING,null,null,
'firma', self::$NAMESPACE_GVA));
836 $autenticaConFirmaWSRequest->append(
new SoapVar($codigoEntidad,XSD_STRING,null,null,
'codigoEntidad', self::$NAMESPACE_GVA));
837 $miSoapRQ =
new SoapVar($autenticaConFirmaWSRequest, SOAP_ENC_OBJECT,null,null,
'autenticaConFirmaWSRequest', self::$NAMESPACE_GVA);
838 $token = $clienteWS->autenticaConFirmaWS($miSoapRQ);
843 $this->tratarExcepcionEstandar($e, $clienteWS);
873 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Token vacío');
875 throw new Exception (
876 __CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
883 $this->__clienteOn(self::KEYCLIENTE_AUTENTICA);
884 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_AUTENTICA];
885 $resultado = $clienteWS->getInformacionWS($token);
890 $this->tratarExcepcionEstandar($e, $clienteWS);
916 if (!is_object($token))
920 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Token vacío. No es objeto');
926 if (!property_exists($token,
'token'))
930 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Token vacío. No hay propiedad');
936 if (empty($token->token))
940 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Token vacío. Propiedad vacía');
950 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
961 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
989 if (!is_object($token))
993 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Token vacío. No es objeto');
999 if (!property_exists($token,
'token'))
1003 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Token vacío. No hay propiedad');
1009 if (empty($token->token))
1013 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Token vacío. Propiedad vacía');
1020 catch (Exception $e)
1023 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
1031 catch (Exception $e)
1034 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
1062 $this->__clienteOn(self::KEYCLIENTE_AUTORIZA);
1063 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_AUTORIZA];
1065 $retornaAutorizacionWS =
new ArrayObject();
1066 $retornaAutorizacionWS->append(
new SoapVar($usuarioHDFI,XSD_STRING,null,null,
'usuarioHDFI', self::$NAMESPACE_GVA));
1067 $retornaAutorizacionWS->append(
new SoapVar($idAplicacion,XSD_STRING,null,null,
'idAplicacion', self::$NAMESPACE_GVA));
1068 $miSoapRQ =
new SoapVar($retornaAutorizacionWS, SOAP_ENC_OBJECT,null,null,
'retornaAutorizacionWSRequest', self::$NAMESPACE_GVA);
1070 $lista = $clienteWS->retornaAutorizacionWS($miSoapRQ);
1074 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
1075 if (is_object($clienteWS))
1077 $this->
addDebugInfo(
"RqH:\n ".$clienteWS->__getLastRequestHeaders());
1078 $this->
addDebugInfo(
"Rq:\n ".$clienteWS->__getLastRequest());
1079 $this->
addDebugInfo(
"RsH:\n ".$clienteWS->__getLastResponse());
1080 $this->
addDebugInfo(
"Rs:\n ".$clienteWS->__getLastResponseHeaders());
1085 catch (Exception $e)
1087 $this->tratarExcepcionEstandar($e, $clienteWS);
1093 if (!is_object($lista))
1097 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
1098 $this->
addDebugInfo(
"\nLista de autorizaciones vacía\n");
1105 foreach ($lista->permisoapp as $objeto)
1109 'nif' => $objeto->nif,
1110 'usrTipo' => $objeto->usrtipo,
1111 'idGrupo'=> $objeto->idgrupo,
1112 'idRol' => $objeto->idrol,
1113 'idAplicacion'=>$objeto->idaplicacion
1120 catch (Exception $e)
1124 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Error en el tratmineo del objeto lista');
1143 $this->__clienteOn(self::KEYCLIENTE_AUTORIZA);
1144 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_AUTORIZA];
1146 $retornaTodasAutorizacionesWS =
new ArrayObject();
1147 $retornaTodasAutorizacionesWS->append(
new SoapVar($usuarioHDFI,XSD_STRING,null,null,
'usuarioHDFI', self::$NAMESPACE_GVA));
1149 $miSoapRQ =
new SoapVar($retornaTodasAutorizacionesWS, SOAP_ENC_OBJECT,null,null,
'retornaTodasAutorizacionesWSRequest', self::$NAMESPACE_GVA);
1151 $lista = $clienteWS->retornaTodasAutorizacionesWS($miSoapRQ);
1155 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
1156 if (is_object($clienteWS))
1158 $this->
addDebugInfo(
"RqH:\n ".$clienteWS->__getLastRequestHeaders());
1159 $this->
addDebugInfo(
"Rq:\n ".$clienteWS->__getLastRequest());
1160 $this->
addDebugInfo(
"RsH:\n ".$clienteWS->__getLastResponse());
1161 $this->
addDebugInfo(
"Rs:\n ".$clienteWS->__getLastResponseHeaders());
1166 catch (Exception $e)
1168 $this->tratarExcepcionEstandar($e, $clienteWS);
1175 if (!is_object($lista))
1179 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
1180 $this->
addDebugInfo(
"\nLista de autorizaciones vacía\n");
1195 if (is_array($lista->lista_permisos))
foreach ($lista->lista_permisos as $objeto)
1198 'usrCodigo'=> $objeto->usrcodigo,
1199 'usrTipo'=>$objeto->usrtipo,
1200 'idGrupo'=>$objeto->idgrupo,
1201 'idRol'=>$objeto->idrol
1206 'usrCodigo'=> $lista->lista_permisos->usrcodigo,
1207 'usrTipo'=>$lista->lista_permisos->usrtipo,
1208 'idGrupo'=>$lista->lista_permisos->idgrupo,
1209 'idRol'=>$lista->lista_permisos->idrol
1214 catch (Exception $e)
1218 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Error en el tratmineo del objeto lista');
1240 $this->__clienteOn(self::KEYCLIENTE_AUTORIZA);
1241 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_AUTORIZA];
1243 $retornaTodasAutorizacionesDNIWS =
new ArrayObject();
1244 $retornaTodasAutorizacionesDNIWS->append(
new SoapVar($usuarioDNI,XSD_STRING,null,null,
'usuarioDNI', self::$NAMESPACE_GVA));
1245 $retornaTodasAutorizacionesDNIWS->append(
new SoapVar($tipoBusqueda,XSD_STRING,null,null,
'tipoBusqueda', self::$NAMESPACE_GVA));
1246 $miSoapRQ =
new SoapVar($retornaTodasAutorizacionesDNIWS, SOAP_ENC_OBJECT,null,null,
'retornaTodasAutorizacionesDNIWSRequest', self::$NAMESPACE_GVA);
1248 $lista = $clienteWS->retornaTodasAutorizacionesDNIWS($miSoapRQ);
1252 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
1253 if (is_object($clienteWS))
1255 $this->
addDebugInfo(
"RqH:\n ".$clienteWS->__getLastRequestHeaders());
1256 $this->
addDebugInfo(
"Rq:\n ".$clienteWS->__getLastRequest());
1257 $this->
addDebugInfo(
"RsH:\n ".$clienteWS->__getLastResponse());
1258 $this->
addDebugInfo(
"Rs:\n ".$clienteWS->__getLastResponseHeaders());
1262 catch (Exception $e)
1264 $this->tratarExcepcionEstandar($e, $clienteWS);
1270 if (!is_object($lista))
1274 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
"\n");
1275 $this->
addDebugInfo(
"\nLista de autorizaciones vacía\n");
1284 if (is_array($lista->lista))
foreach ($lista->lista as $objeto)
1287 'usrCodigo'=> $objeto->usrcodigo,
1288 'usrTipo'=>$objeto->usrtipo,
1289 'idGrupo'=>$objeto->idgrupo,
1290 'idRol'=>$objeto->idrol
1295 'usrCodigo'=> $lista->lista->usrcodigo,
1296 'usrTipo'=>$lista->lista->usrtipo,
1297 'idGrupo'=>$lista->lista->idgrupo,
1298 'idRol'=>$lista->lista->idrol
1304 catch (Exception $e)
1308 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
'. Error en el tratamiento del objeto lista');
1343 $this->__clienteOn(self::KEYCLIENTE_FIRMA);
1344 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_FIRMA];
1347 $firmarCertificadoWSRequest =
new ArrayObject();
1348 $firmarCertificadoWSRequest->append(
new SoapVar($idSession, XSD_STRING, null, null,
'idSession', self::$NAMESPACE_GVA));
1349 $firmarCertificadoWSRequest->append(
new SoapVar($idCertificado, XSD_STRING, null, null,
'idCertificado', self::$NAMESPACE_GVA));
1350 $firmarCertificadoWSRequest->append(
new SoapVar($docContentB64, XSD_STRING, null, null,
'documento', self::$NAMESPACE_GVA));
1351 $firmarCertificadoWSRequest->append(
new SoapVar(
'TF06', XSD_STRING, null, null,
'firmaFormato', self::$NAMESPACE_GVA));
1352 $firmarCertificadoWSRequest->append(
new SoapVar(
'pdf', XSD_STRING, null, null,
'formatoSubtipo', self::$NAMESPACE_GVA));
1353 $miSoapRQ =
new SoapVar($firmarCertificadoWSRequest, SOAP_ENC_OBJECT,null,null,
'firmarCertificadoWSRequest', self::$NAMESPACE_GVA);
1354 $docFirmado = $clienteWS->firmarConCertificado($miSoapRQ);
1356 if (is_object($docFirmado))
1358 return ($docFirmado->response);
1362 return($docFirmado);
1365 catch (Exception $e)
1367 $this->tratarExcepcionEstandar($e, $clienteWS);
1402 public function insertarDocumentoGDE($codApp, $docContentB64, $nombreDoc, $pathDoc=
'', $vMetadatosENI=null, $vMetadatosPersonalizados=null)
1406 $this->__clienteOn(self::KEYCLIENTE_GDE,
true);
1407 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_GDE];
1410 $insertarDocumentoWSRequest =
new ArrayObject();
1411 $insertarDocumentoWSRequest->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE));
1413 $peticionWSRequest =
new ArrayObject();
1414 $peticionWSRequest->append(
new SoapVar($docContentB64, XSD_STRING, null, null,
'contenido', self::$NAMESPACE_GDE));
1415 $peticionWSRequest->append(
new SoapVar($nombreDoc, XSD_STRING, null, null,
'nombre', self::$NAMESPACE_GDE));
1417 if (!empty($pathDoc))
1419 $peticionWSRequest->append(
new SoapVar($pathDoc, XSD_STRING, null, null,
'path', self::$NAMESPACE_GDE));
1422 $insertarDocumentoWSRequest->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE));
1423 $miSoapRQ =
new SoapVar($insertarDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'insertarDocumento', self::$NAMESPACE_GDE);
1424 $respuesta = $clienteWS->insertarDocumento($miSoapRQ);
1427 if (is_array($vMetadatosENI))
1430 $peticionWSRequest->append(
new SoapVar($objMetadatosENI, SOAP_ENC_OBJECT, null, null,
'metadatosENI', self::$NAMESPACE_GDE));
1434 if (is_array($vMetadatosPersonalizados))
1436 $objMetadatosPersonalizados = $this->
array2ObjectTree($vMetadatosPersonalizados);
1437 $peticionWSRequest->append(
new SoapVar($objMetadatosPersonalizados, SOAP_ENC_OBJECT, null, null,
'coleccionMetadatosPersonalizados', self::$NAMESPACE_GDE));
1440 $vRespuesta = array();
1441 if (is_object($respuesta))
1445 'referenciaDocumento' =>$respuesta->respuesta->referenciaDocumento,
1446 'nombre' => $respuesta->respuesta->nombre
1449 return($vRespuesta);
1451 catch (Exception $e)
1453 $this->tratarExcepcionEstandar($e, $clienteWS);
1473 $opcionesClienteWS = array (
1474 'soap_version' => SOAP_1_1,
1475 'user_agent' =>
'WSSSoapClient',
1476 'exceptions' =>
true,
1477 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1478 'trace' => self::$MYSOAPOP_TRACE
1481 $this->__clienteOn(self::KEYCLIENTE_GDE,
true, $opcionesClienteWS);
1483 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE);
1485 $obtenerDocumentoWSRequest =
new ArrayObject();
1486 $obtenerDocumentoWSRequest->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE));
1488 $peticionWSRequest =
new ArrayObject();
1489 $peticionWSRequest->append(
new SoapVar($refDoc, XSD_STRING, null, null,
'referenciaDocumento', self::$NAMESPACE_GDE));
1490 $peticionWSRequest->append(
new SoapVar($parcial, XSD_STRING, null, null,
'parcial', self::$NAMESPACE_GDE));
1491 $obtenerDocumentoWSRequest->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE));
1493 $miSoapRQ =
new SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'obtenerDocumento', self::$NAMESPACE_GDE);
1494 $respuesta = $clienteWS->obtenerDocumento($miSoapRQ);
1496 $vRespuesta = array();
1497 if (is_object($respuesta))
1501 return($vRespuesta);
1503 catch (Exception $e)
1506 $mensaje = $e->getMessage();
1507 $mensaje = trim(strtolower($mensaje));
1508 if ($mensaje ==
'looks like we got no xml document')
1510 $response = $clienteWS->__getLastResponse();
1516 $this->tratarExcepcionEstandar($e, $clienteWS);
1536 $opcionesClienteWS = array (
1537 'soap_version' => SOAP_1_1,
1538 'user_agent' =>
'WSSSoapClient',
1539 'exceptions' =>
true,
1540 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1541 'trace' => self::$MYSOAPOP_TRACE
1544 $this->__clienteOn(self::KEYCLIENTE_GDE,
true, $opcionesClienteWS);
1546 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE);
1548 $obtenerDocumentoWSRequest =
new ArrayObject();
1549 $obtenerDocumentoWSRequest->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE));
1551 $peticionWSRequest =
new ArrayObject();
1552 $peticionWSRequest->append(
new SoapVar($refDoc, XSD_STRING, null, null,
'referenciaDocumento', self::$NAMESPACE_GDE));
1553 $obtenerDocumentoWSRequest->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE));
1555 $miSoapRQ =
new SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'eliminarDocumento', self::$NAMESPACE_GDE);
1556 $respuesta = $clienteWS->eliminarDocumento($miSoapRQ);
1558 $vRespuesta = array();
1559 if (is_object($respuesta))
1563 return($vRespuesta);
1565 catch (Exception $e)
1567 $mensaje = $e->detail->ExcepcionWS->detalleError;
1568 $mensaje = trim(strtolower($mensaje));
1569 if (strpos($mensaje,
'ya estaba borrado')===
false)
1571 $this->tratarExcepcionEstandar($e, $clienteWS);
1575 return array(
'correcto'=>
false);
1595 $opcionesClienteWS = array (
1596 'soap_version' => SOAP_1_1,
1597 'user_agent' =>
'WSSSoapClient',
1598 'exceptions' =>
true,
1599 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1600 'trace' => self::$MYSOAPOP_TRACE
1603 $this->__clienteOn(self::KEYCLIENTE_GDE,
true, $opcionesClienteWS);
1605 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE);
1607 $obtenerDocumentoWSRequest =
new ArrayObject();
1608 $obtenerDocumentoWSRequest->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE));
1610 $peticionWSRequest =
new ArrayObject();
1611 $peticionWSRequest->append(
new SoapVar($path, XSD_STRING, null, null,
'path', self::$NAMESPACE_GDE));
1612 $obtenerDocumentoWSRequest->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE));
1614 $miSoapRQ =
new SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'eliminarCarpeta', self::$NAMESPACE_GDE);
1615 $respuesta = $clienteWS->eliminarCarpeta($miSoapRQ);
1617 $vRespuesta = array();
1618 if (is_object($respuesta))
1622 return($vRespuesta);
1624 catch (Exception $e)
1626 $this->tratarExcepcionEstandar($e, $clienteWS);
1652 $opcionesClienteWS = array (
1653 'soap_version' => SOAP_1_1,
1654 'user_agent' =>
'WSSSoapClient',
1655 'exceptions' =>
true,
1656 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1657 'trace' => self::$MYSOAPOP_TRACE
1662 $this->__clienteOn(self::KEYCLIENTE_SALT,
true, $opcionesClienteWS);
1663 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_SALT];
1664 $textoTraducido = $clienteWS->castellanoValenciano($texto);
1665 if (is_object($textoTraducido))
1667 return ($textoTraducido->texto);
1671 return ($textoTraducido);
1674 catch (Exception $e)
1676 $this->tratarExcepcionEstandar($e, $clienteWS);
1693 $opcionesClienteWS = array (
1694 'soap_version' => SOAP_1_1,
1695 'user_agent' =>
'WSSSoapClient',
1696 'exceptions' =>
true,
1697 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1698 'trace' => self::$MYSOAPOP_TRACE
1703 $this->__clienteOn(self::KEYCLIENTE_SALT,
true, $opcionesClienteWS);
1704 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_SALT];
1705 $textoTraducido = $clienteWS->valencianoCastellano($texto);
1706 if (is_object($textoTraducido))
1708 return ($textoTraducido->texto);
1712 return ($textoTraducido);
1715 catch (Exception $e)
1717 $this->tratarExcepcionEstandar($e, $clienteWS);
1739 private function __clienteOn($tipo, $trazabilidadPai=
true, $opcionesClienteWS = null)
1741 $vTiposCliente = array();
1744 $tipo = trim(strtolower($tipo));
1745 if (array_key_exists($tipo, $this->v_clienteWS))
1747 $vTiposCliente = array($tipo);
1753 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
' Tipo de cliente WS ('.$tipo.
') no reconocido.');
1755 throw new Exception (
1756 __CLASS__.
':'.__METHOD__.
'['.__FILE__.
']-L'.__LINE__.
'.'.
1757 'Tipo de cliente WS ('.$tipo.
') no reconocido' 1762 if (!is_array($opcionesClienteWS))
1764 $opcionesClienteWS = array (
1765 'soap_version' => SOAP_1_1,
1766 'user_agent' =>
'WSSSoapClient',
1767 'exceptions' =>
true,
1768 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
1769 'trace' => self::$MYSOAPOP_TRACE
1774 $opcionesClienteWS[
'trace'] = self::$MYSOAPOP_TRACE;
1779 $this->
addDebugInfo(
"Opciones:\n ".print_r($opcionesClienteWS,
true));
1782 foreach ($vTiposCliente as $claveTipo)
1784 if (is_object($this->v_clienteWS[$claveTipo]))
continue;
1788 if (ini_get(
'allow_url_fopen') ==
true)
1792 'timeout' => $this->WSDLTimeOut
1795 'timeout' => $this->WSDLTimeOut
1798 'verify_peer' =>
false,
1799 'allow_self_signed' =>
true 1803 $sc = stream_context_create($opciones);
1804 $fd = fopen($this->v_wsdl[$claveTipo],
'r',
false, $sc);
1807 throw new Exception(
'allow_url_fopen activo. La URL '.$this->v_wsdl[$claveTipo].
' no puede alcanzarse.');
1864 $this->
addDebugInfo(__CLASS__.
':'.__METHOD__.
'['.__FILE__.
'-'.__LINE__.
']'.
' allow_url_fopen NO ACTIVO y Extensión CURL NO ACTIVA');
1870 $clienteWS =
new WSSSoapClient($this->v_wsdl[$claveTipo], $opcionesClienteWS);
1871 $clienteWS->setCertFile($this->certFile);
1872 $clienteWS->setKeyFile($this->keyFile);
1873 $clienteWS->setPassPhrase($this->passPhrase);
1875 if (($trazabilidadPai) && is_array($this->vTrazabilidad))
1877 $clienteWS->loadTracertPAI($this->vTrazabilidad);
1879 $this->v_clienteWS[$claveTipo] = $clienteWS;
1881 catch (Exception $e)
1883 $this->tratarExcepcionEstandar($e, $clienteWS);
1902 if (empty($tipo))
return null;
1904 $tipo = trim(strtolower($tipo));
1907 $this->__clienteOn($tipo);
1909 if (!is_object($this->v_clienteWS[$tipo]))
1912 return ($this->v_clienteWS[$tipo]);
1914 catch (Exception $e)
1930 if (!is_array($array))
return;
1932 if (is_numeric(key($array)))
1934 foreach ($array as $key => $value)
1940 $Object =
new stdClass;
1941 foreach ($array as $key => $value)
1943 if (is_array($value))
1949 $Object->$key = $value;
1964 if (is_array($obj) || is_object($obj))
1967 foreach ($obj as $key => $value)
1983 public function csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante)
1985 $claveAccesoWSRequest =
new ArrayObject();
1986 $claveAccesoWSRequest->append(
new SoapVar($appID, XSD_STRING, null, null,
'aplicacionId'));
1987 $claveAccesoWSRequest->append(
new SoapVar($nif, XSD_STRING, null, null,
'nif'));
1988 $claveAccesoWSRequest->append(
new SoapVar($referenciaExterna, XSD_STRING, null, null,
'referenciaExterna'));
1989 $claveAccesoWSRequest->append(
new SoapVar($firmante, XSD_STRING, null, null,
'firmante'));
1991 return $claveAccesoWSRequest;
1994 public function obtenerCodigo($appID, $nif, $referenciaExterna, $firmante,
1995 $generarBarCode=null, $tipoBarCode=null, $width=null, $height=null)
2001 $this->__clienteOn(self::KEYCLIENTE_CSV,
true);
2002 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CSV);
2003 $claveAccesoWSRequest = $this->csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante);
2005 $opcGeneracionWSRequest =
new ArrayObject();
2006 if (!empty($generarBarCode))
2007 $opcGeneracionWSRequest->append(
new SoapVar($generarBarCode, XSD_STRING, null, null,
'generarBarCode'));
2008 if (!empty($tipoBarCode))
2009 $opcGeneracionWSRequest->append(
new SoapVar($tipoBarCode, XSD_STRING, null, null,
'tipoBarCode'));
2011 $opcGeneracionWSRequest->append(
new SoapVar($width, XSD_STRING, null, null,
'width'));
2012 if (!empty($height))
2013 $opcGeneracionWSRequest->append(
new SoapVar($height, XSD_STRING, null, null,
'height'));
2016 $claveAcceso2WSRequest =
new ArrayObject();
2017 $claveAcceso2WSRequest->append(
new SoapVar($claveAccesoWSRequest, SOAP_ENC_OBJECT, null, null,
'claveAcceso'));
2018 $claveAcceso2WSRequest->append(
new SoapVar($opcGeneracionWSRequest, SOAP_ENC_OBJECT, null, null,
'opcionesGeneracion'));
2021 $peticionWSRequest =
new ArrayObject();
2022 $peticionWSRequest->append(
new SoapVar($claveAcceso2WSRequest, SOAP_ENC_OBJECT,null,null,
'peticion'));
2023 $miSoapRQ =
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'obtenerCSVRequest', self::$NAMESPACE_CSVGVA);
2024 $respuesta = $clienteWS->obtenerCSV($miSoapRQ);
2028 $vRespuesta = array();
2029 if (is_object($respuesta))
2033 'csv' => $respuesta->respuesta->csv,
2034 'url' => $respuesta->respuesta->url,
2036 if (isset($respuesta->respuesta->imagenBarCode))
2037 $vRespuesta[
'imagenBarCode'] = $respuesta->respuesta->imagenBarCode;
2039 return($vRespuesta);
2041 catch (Exception $e)
2043 $this->tratarExcepcionEstandar($e, $clienteWS);
2047 public function asociarCSV($csv, $appID, $nif, $referenciaExterna, $firmante,
2048 $idRepositorio, $refDoc, $hash, $fechaCaducidad = null, $vParametros = null)
2052 $this->__clienteOn(self::KEYCLIENTE_CSV,
true);
2053 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CSV);
2056 $claveAccesoWSRequest = $this->csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante);
2058 $infDocWSRequest =
new ArrayObject();
2059 $infDocWSRequest->append(
new SoapVar($idRepositorio, XSD_STRING, null, null,
'idRepositorio'));
2060 $infDocWSRequest->append(
new SoapVar($refDoc, XSD_STRING, null, null,
'referenciaDocumento'));
2061 $infDocWSRequest->append(
new SoapVar($hash, XSD_STRING, null, null,
'hash'));
2062 if (!empty($fechaCaducidad))
2063 $infDocWSRequest->append(
new SoapVar($fechaCaducidad->format(DateTime::ATOM), XSD_STRING, null, null,
'fechaCaducidad'));
2064 if (is_array($vParametros)) {
2066 $parametrosVerificacion =
new ArrayObject();
2068 foreach ($vParametros as $itemParametro) {
2069 $parametro =
new ArrayObject();
2070 $parametro->append(
new SoapVar($itemParametro[
'etiqueta'], XSD_STRING, null, null,
'etiqueta'));
2071 $parametro->append(
new SoapVar($itemParametro[
'ayuda'], XSD_STRING, null, null,
'ayuda'));
2072 $parametro->append(
new SoapVar($itemParametro[
'valor'], XSD_STRING, null, null,
'valor'));
2074 $parametrosVerificacion->append(
new SoapVar($parametro, SOAP_ENC_OBJECT, null, null,
'parametro'));
2077 $infDocWSRequest->append(
new SoapVar($parametrosVerificacion, SOAP_ENC_OBJECT, null, null,
'parametrosVerificacion'));
2081 $claveAcceso2WSRequest =
new ArrayObject();
2082 $claveAcceso2WSRequest->append(
new SoapVar($csv, XSD_STRING, null, null,
'csv'));
2083 $claveAcceso2WSRequest->append(
new SoapVar($claveAccesoWSRequest, SOAP_ENC_OBJECT, null, null,
'claveAcceso'));
2084 $claveAcceso2WSRequest->append(
new SoapVar($infDocWSRequest, SOAP_ENC_OBJECT, null, null,
'informacionDocumento'));
2089 $peticionWSRequest =
new ArrayObject();
2090 $peticionWSRequest->append(
new SoapVar($claveAcceso2WSRequest, SOAP_ENC_OBJECT,null,null,
'peticion'));
2091 $miSoapRQ =
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'asociarCSVRequest', self::$NAMESPACE_CSVGVA);
2092 $respuesta = $clienteWS->asociarCSV($miSoapRQ);
2095 $vRespuesta = array();
2096 if (is_object($respuesta))
2100 'respuesta' => $respuesta->respuesta->respuesta
2103 return($vRespuesta);
2105 catch (Exception $e)
2107 $this->tratarExcepcionEstandar($e, $clienteWS);
2111 public function invalidarCSV($csv, $appID, $nif, $referenciaExterna, $firmante)
2115 $this->__clienteOn(self::KEYCLIENTE_CSV,
true);
2116 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CSV);
2119 $claveAccesoWSRequest = $this->csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante);
2123 $claveAcceso2WSRequest =
new ArrayObject();
2124 $claveAcceso2WSRequest->append(
new SoapVar($csv, XSD_STRING, null, null,
'csv'));
2125 $claveAcceso2WSRequest->append(
new SoapVar($claveAccesoWSRequest, SOAP_ENC_OBJECT, null, null,
'claveAcceso'));
2130 $peticionWSRequest =
new ArrayObject();
2131 $peticionWSRequest->append(
new SoapVar($claveAcceso2WSRequest, SOAP_ENC_OBJECT,null,null,
'peticion'));
2132 $miSoapRQ =
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'invalidarCSVRequest', self::$NAMESPACE_CSVGVA);
2133 $respuesta = $clienteWS->invalidarCSV($miSoapRQ);
2136 $vRespuesta = array();
2137 if (is_object($respuesta))
2141 'respuesta' => $respuesta->respuesta->respuesta
2144 return($vRespuesta);
2146 catch (Exception $e)
2148 $this->tratarExcepcionEstandar($e, $clienteWS);
2152 public function modificarFechaCaducidadCSV($csv, $appID, $nif, $referenciaExterna, $firmante, $fechaCaducidad)
2156 $this->__clienteOn(self::KEYCLIENTE_CSV,
true);
2157 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CSV);
2160 $claveAccesoWSRequest = $this->csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante);
2164 $claveAcceso2WSRequest =
new ArrayObject();
2165 $claveAcceso2WSRequest->append(
new SoapVar($csv, XSD_STRING, null, null,
'csv'));
2166 $claveAcceso2WSRequest->append(
new SoapVar($claveAccesoWSRequest, SOAP_ENC_OBJECT, null, null,
'claveAcceso'));
2167 $claveAcceso2WSRequest->append(
new SoapVar($fechaCaducidad->format(DateTime::ATOM), XSD_STRING, null, null,
'fechaCaducidad'));
2171 $peticionWSRequest =
new ArrayObject();
2172 $peticionWSRequest->append(
new SoapVar($claveAcceso2WSRequest, SOAP_ENC_OBJECT,null,null,
'peticion'));
2173 $miSoapRQ =
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'modificarFechaCSVRequest', self::$NAMESPACE_CSVGVA);
2174 $respuesta = $clienteWS->modificarFechaCSV($miSoapRQ);
2177 $vRespuesta = array();
2178 if (is_object($respuesta))
2182 'respuesta' => $respuesta->respuesta->respuesta
2185 return($vRespuesta);
2187 catch (Exception $e)
2189 $this->tratarExcepcionEstandar($e, $clienteWS);
2221 public function insertarDocumentoGDE2($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo = null, $vMetadatosENI = null, $vMetadatosPersonalizados=null, $vFirmas=null)
2225 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true);
2226 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_GDE2];
2228 $composer =
new ComposerGDE2();
2229 $peticionWSRequest = $composer->__cde__insertarDocumento_full(
2231 'contenido' => $docContentB64,
2232 'nombre' => $nombreDoc,
2234 'tipoPersonalizado' => $tipo,
2235 'metadatosENI' => $vMetadatosENI,
2236 'coleccionMetadatosPersonalizados' => $vMetadatosPersonalizados,
2237 'firmas' => $vFirmas
2238 ),
'peticion', self::$NAMESPACE_GDE2);
2240 $insertarDocumentoWSRequest =
new ArrayObject();
2241 $insertarDocumentoWSRequest->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2242 $insertarDocumentoWSRequest->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2244 $miSoapRQ =
new SoapVar($insertarDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'insertarDocumento', self::$NAMESPACE_GDE2);
2245 $respuesta = $clienteWS->insertarDocumento($miSoapRQ);
2247 $vRespuesta = array();
2248 if (is_object($respuesta))
2252 return($vRespuesta);
2254 catch (Exception $e)
2257 $mensaje = $e->getMessage();
2258 $mensaje = trim(strtolower($mensaje));
2261 case 'looks like we got no xml document' :
2263 $response = $clienteWS->__getLastResponse();
2269 $this->tratarExcepcionEstandar($e, $clienteWS);
2292 $opcionesClienteWS = array (
2293 'soap_version' => SOAP_1_1,
2294 'user_agent' =>
'WSSSoapClient',
2295 'exceptions' =>
true,
2296 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2297 'trace' => self::$MYSOAPOP_TRACE
2300 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2301 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2303 $composer =
new ComposerGDE2();
2304 $peticionWSRequest = $composer->__cde__obtenerDocumento_full(
2306 'referenciaDocumento' => $refDoc ,
2307 'parcial' => $parcial
2308 ),
'peticion', self::$NAMESPACE_GDE2);
2310 $obtenerDocumentoWSRequest =
new ArrayObject();
2311 $obtenerDocumentoWSRequest->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2312 $obtenerDocumentoWSRequest->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2314 $miSoapRQ =
new SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'obtenerDocumento', self::$NAMESPACE_GDE2);
2315 $respuesta = $clienteWS->obtenerDocumento($miSoapRQ);
2317 $vRespuesta = array();
2318 if (is_object($respuesta))
2322 return($vRespuesta);
2324 catch (Exception $e)
2327 $mensaje = $e->getMessage();
2328 $mensaje = trim(strtolower($mensaje));
2331 case 'looks like we got no xml document' :
2333 $response = $clienteWS->__getLastResponse();
2338 case 'gde_documentonoexistenteexception':
2340 'respuesta' => array(
'correcto'=>
'false'),
2341 'codMotivo' =>
'NOEXISTE',
2342 'motivo' =>
'No existe ningún documento con la referencia '.$refDoc
2347 $this->tratarExcepcionEstandar($e, $clienteWS);
2368 $opcionesClienteWS = array (
2369 'soap_version' => SOAP_1_1,
2370 'user_agent' =>
'WSSSoapClient',
2371 'exceptions' =>
true,
2372 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2373 'trace' => self::$MYSOAPOP_TRACE
2376 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2377 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2379 $composer =
new ComposerGDE2();
2380 $peticionWSRequest = $composer->__cde__eliminarDocumento_full(
2382 'referenciaDocumento' => $refDoc
2383 ),
'peticion', self::$NAMESPACE_GDE2);
2385 $mainWS =
new ArrayObject();
2386 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2387 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2389 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'eliminarDocumento', self::$NAMESPACE_GDE2);
2390 $respuesta = $clienteWS->eliminarDocumento($miSoapRQ);
2392 $vRespuesta = array();
2393 if (is_object($respuesta))
2397 return($vRespuesta);
2399 catch (Exception $e)
2402 $mensaje = $e->getMessage();
2403 $mensaje = trim(strtolower($mensaje));
2406 case 'looks like we got no xml document' :
2408 $response = $clienteWS->__getLastResponse();
2414 case 'gde_gestordocumentalexception' :
2415 $mensaje = $e->detail->ExcepcionWS->detalleError;
2416 $mensaje = trim(strtolower($mensaje));
2417 if (strpos($mensaje,
'ya estaba borrado')===
false)
2419 $this->tratarExcepcionEstandar($e, $clienteWS);
2424 'respuesta' => array(
'correcto'=>
'false'),
2425 'codMotivo' =>
'PREBORRADO',
2426 'motivo' =>
'El documento ya había sido borrado' 2431 case 'gde_documentonoexistenteexception':
2433 'respuesta' => array(
'correcto'=>
'false'),
2434 'codMotivo' =>
'NOEXISTE',
2435 'motivo' =>
'No existe ningún documento con la referencia '.$refDoc
2440 $this->tratarExcepcionEstandar($e, $clienteWS);
2461 $opcionesClienteWS = array (
2462 'soap_version' => SOAP_1_1,
2463 'user_agent' =>
'WSSSoapClient',
2464 'exceptions' =>
true,
2465 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2466 'trace' => self::$MYSOAPOP_TRACE
2469 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2470 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2473 $composer =
new ComposerGDE2();
2474 $peticionWSRequest = $composer->__cde__asociarFirmas_full(array(
'referenciaDocumento' => $refDoc,
'firmas' => $vFirmas),
'peticion', self::$NAMESPACE_GDE2);
2476 $mainWS =
new ArrayObject();
2477 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2478 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2480 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'asociarFirmas', self::$NAMESPACE_GDE2);
2481 $respuesta = $clienteWS->asociarFirmas($miSoapRQ);
2483 $vRespuesta = array();
2484 if (is_object($respuesta))
2488 return($vRespuesta);
2490 catch (Exception $e)
2493 $mensaje = $e->getMessage();
2494 $mensaje = trim(strtolower($mensaje));
2497 case 'looks like we got no xml document' :
2499 $response = $clienteWS->__getLastResponse();
2505 $this->tratarExcepcionEstandar($e, $clienteWS);
2529 public function buscarDocCriterioGDE2($codApp, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
2533 $opcionesClienteWS = array (
2534 'soap_version' => SOAP_1_1,
2535 'user_agent' =>
'WSSSoapClient',
2536 'exceptions' =>
true,
2537 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2538 'trace' => self::$MYSOAPOP_TRACE
2541 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2542 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2545 $composer =
new ComposerGDE2();
2546 $peticionWSRequest = $composer->__cde__buscarDocCriterio_full(array(
'filtroPath' => $filtroPath,
'buscarInTree' => $buscarInTree,
'operacion' => $operacion,
'coleccionCriterios' => $coleccionCriterios),
'peticion', self::$NAMESPACE_GDE2);
2548 $mainWS =
new ArrayObject();
2549 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2550 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2552 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'buscarDocCriterio', self::$NAMESPACE_GDE2);
2553 $respuesta = $clienteWS->buscarDocCriterio($miSoapRQ);
2555 $vRespuesta = array();
2556 if (is_object($respuesta))
2560 return($vRespuesta);
2562 catch (Exception $e)
2565 $mensaje = $e->getMessage();
2566 $mensaje = trim(strtolower($mensaje));
2569 case 'looks like we got no xml document' :
2571 $response = $clienteWS->__getLastResponse();
2577 $this->tratarExcepcionEstandar($e, $clienteWS);
2600 public function buscarDocCriterioPaginadoGDE2($codApp, $registrosPagina, $pagina, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null) {
2603 $opcionesClienteWS = array (
2604 'soap_version' => SOAP_1_1,
2605 'user_agent' =>
'WSSSoapClient',
2606 'exceptions' =>
true,
2607 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2608 'trace' => self::$MYSOAPOP_TRACE
2611 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2612 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2615 $composer =
new ComposerGDE2();
2616 $peticionWSRequest = $composer->__cde__buscarDocCriterioPaginado_full(array(
'paginacion' => array(
'registrosPagina' => $registrosPagina,
'pagina' => $pagina),
'filtroPath' => $filtroPath,
'buscarInTree' => $buscarInTree,
'operacion' => $operacion,
'coleccionCriterios' => $coleccionCriterios),
'peticion', self::$NAMESPACE_GDE2);
2618 $mainWS =
new ArrayObject();
2619 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2620 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2622 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'buscarDocCriterioPaginado', self::$NAMESPACE_GDE2);
2623 $respuesta = $clienteWS->buscarDocCriterioPaginado($miSoapRQ);
2625 $vRespuesta = array();
2626 if (is_object($respuesta))
2630 return($vRespuesta);
2632 catch (Exception $e)
2635 $mensaje = $e->getMessage();
2636 $mensaje = trim(strtolower($mensaje));
2639 case 'looks like we got no xml document' :
2641 $response = $clienteWS->__getLastResponse();
2647 $this->tratarExcepcionEstandar($e, $clienteWS);
2663 public function crearCarpetaGDE2($codApp, $path, $tipo=null, $metadatosExpedienteEni=null, $coleccionMetadatosPersonalizados=null)
2667 $opcionesClienteWS = array (
2668 'soap_version' => SOAP_1_1,
2669 'user_agent' =>
'WSSSoapClient',
2670 'exceptions' =>
true,
2671 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2672 'trace' => self::$MYSOAPOP_TRACE
2675 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2676 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2679 $composer =
new ComposerGDE2();
2680 $peticionWSRequest = $composer->__cde__crearCarpeta_full(
2683 'tipoPersonalizado' => $tipo,
2684 'metadatosExpedienteEni' => $metadatosExpedienteEni,
2685 'coleccionMetadatosPersonalizados' => $coleccionMetadatosPersonalizados
2686 ),
'peticion', self::$NAMESPACE_GDE2);
2688 $mainWS =
new ArrayObject();
2689 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2690 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2692 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'crearCarpeta', self::$NAMESPACE_GDE2);
2693 $respuesta = $clienteWS->crearCarpeta($miSoapRQ);
2695 $vRespuesta = array();
2696 if (is_object($respuesta))
2700 return($vRespuesta);
2702 catch (Exception $e)
2705 $mensaje = $e->getMessage();
2706 $mensaje = trim(strtolower($mensaje));
2709 case 'looks like we got no xml document' :
2711 $response = $clienteWS->__getLastResponse();
2717 $this->tratarExcepcionEstandar($e, $clienteWS);
2735 $opcionesClienteWS = array (
2736 'soap_version' => SOAP_1_1,
2737 'user_agent' =>
'WSSSoapClient',
2738 'exceptions' =>
true,
2739 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2740 'trace' => self::$MYSOAPOP_TRACE
2743 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2744 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2747 $composer =
new ComposerGDE2();
2748 $peticionWSRequest = $composer->__cde__eliminarCarpeta_full(
2751 ),
'peticion', self::$NAMESPACE_GDE2);
2753 $obtenerDocumentoWSRequest =
new ArrayObject();
2754 $obtenerDocumentoWSRequest->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2755 $obtenerDocumentoWSRequest->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2757 $miSoapRQ =
new SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'eliminarCarpeta', self::$NAMESPACE_GDE2);
2758 $respuesta = $clienteWS->eliminarCarpeta($miSoapRQ);
2760 $vRespuesta = array();
2761 if (is_object($respuesta))
2765 return($vRespuesta);
2767 catch (Exception $e)
2770 $mensaje = $e->getMessage();
2771 $mensaje = trim(strtolower($mensaje));
2774 case 'looks like we got no xml document' :
2776 $response = $clienteWS->__getLastResponse();
2782 $this->tratarExcepcionEstandar($e, $clienteWS);
2802 $opcionesClienteWS = array (
2803 'soap_version' => SOAP_1_1,
2804 'user_agent' =>
'WSSSoapClient',
2805 'exceptions' =>
true,
2806 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2807 'trace' => self::$MYSOAPOP_TRACE
2810 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2811 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2814 $composer =
new ComposerGDE2();
2815 $peticionWSRequest = $composer->__cde__empaquetarDocumentoENI_full(array(
'contenido' => $contenido,
'metadatosENI' => $vMetadatosEni,
'firmas' => $vFirmas),
'peticion', self::$NAMESPACE_GDE2);
2817 $mainWS =
new ArrayObject();
2818 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2819 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2822 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'empaquetarDocumentoENI', self::$NAMESPACE_GDE2);
2823 $respuesta = $clienteWS->empaquetarDocumentoENI($miSoapRQ);
2825 $vRespuesta = array();
2826 if (is_object($respuesta))
2830 return($vRespuesta);
2832 catch (Exception $e)
2835 $mensaje = $e->getMessage();
2836 $mensaje = trim(strtolower($mensaje));
2839 case 'looks like we got no xml document' :
2841 $response = $clienteWS->__getLastResponse();
2847 $this->tratarExcepcionEstandar($e, $clienteWS);
2864 $opcionesClienteWS = array (
2865 'soap_version' => SOAP_1_1,
2866 'user_agent' =>
'WSSSoapClient',
2867 'exceptions' =>
true,
2868 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2869 'trace' => self::$MYSOAPOP_TRACE
2872 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2873 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2876 $composer =
new ComposerGDE2();
2877 $peticionWSRequest = $composer->__cde__establecerMetadatoCarpetasPersonalizados_full(array(
'path' => $path,
'coleccionMetadatosPersonalizados' => $vColMetadatosPers),
'peticion', self::$NAMESPACE_GDE2);
2879 $mainWS =
new ArrayObject();
2880 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2881 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2884 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'establecerMetadatoCarpetasPersonalizados', self::$NAMESPACE_GDE2);
2885 $respuesta = $clienteWS->establecerMetadatoCarpetasPersonalizados($miSoapRQ);
2887 $vRespuesta = array();
2888 if (is_object($respuesta))
2892 return($vRespuesta);
2894 catch (Exception $e)
2897 $mensaje = $e->getMessage();
2898 $mensaje = trim(strtolower($mensaje));
2901 case 'looks like we got no xml document' :
2903 $response = $clienteWS->__getLastResponse();
2909 $this->tratarExcepcionEstandar($e, $clienteWS);
2926 $opcionesClienteWS = array (
2927 'soap_version' => SOAP_1_1,
2928 'user_agent' =>
'WSSSoapClient',
2929 'exceptions' =>
true,
2930 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2931 'trace' => self::$MYSOAPOP_TRACE
2934 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
2935 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
2938 $composer =
new ComposerGDE2();
2939 $peticionWSRequest = $composer->__cde__establecerMetadatosCarpetaExpedienteENI_full(array(
'path' => $path,
'metadatosExpedienteEni' => $vMetadatosExpedienteEni),
'peticion', self::$NAMESPACE_GDE2);
2941 $mainWS =
new ArrayObject();
2942 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
2943 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
2946 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'establecerMetadatosCarpetaExpedienteENI', self::$NAMESPACE_GDE2);
2947 $respuesta = $clienteWS->establecerMetadatosCarpetaExpedienteENI($miSoapRQ);
2949 $vRespuesta = array();
2950 if (is_object($respuesta))
2954 return($vRespuesta);
2956 catch (Exception $e)
2959 $mensaje = $e->getMessage();
2960 $mensaje = trim(strtolower($mensaje));
2963 case 'looks like we got no xml document' :
2965 $response = $clienteWS->__getLastResponse();
2971 $this->tratarExcepcionEstandar($e, $clienteWS);
2992 $opcionesClienteWS = array (
2993 'soap_version' => SOAP_1_1,
2994 'user_agent' =>
'WSSSoapClient',
2995 'exceptions' =>
true,
2996 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
2997 'trace' => self::$MYSOAPOP_TRACE
3000 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
3001 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
3004 $composer =
new ComposerGDE2();
3005 $peticionWSRequest = $composer->__cde__establecerMetadatosENI_full(array(
'referenciaDocumento' => $refDoc,
'metadatosENI' => $vMetadatosEni),
'peticion', self::$NAMESPACE_GDE2);
3007 $mainWS =
new ArrayObject();
3008 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
3009 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
3012 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'establecerMetadatosENI', self::$NAMESPACE_GDE2);
3013 $respuesta = $clienteWS->establecerMetadatosENI($miSoapRQ);
3015 $vRespuesta = array();
3016 if (is_object($respuesta))
3020 return($vRespuesta);
3022 catch (Exception $e)
3025 $mensaje = $e->getMessage();
3026 $mensaje = trim(strtolower($mensaje));
3029 case 'looks like we got no xml document' :
3031 $response = $clienteWS->__getLastResponse();
3037 $this->tratarExcepcionEstandar($e, $clienteWS);
3054 $opcionesClienteWS = array (
3055 'soap_version' => SOAP_1_1,
3056 'user_agent' =>
'WSSSoapClient',
3057 'exceptions' =>
true,
3058 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3059 'trace' => self::$MYSOAPOP_TRACE
3062 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
3063 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
3066 $composer =
new ComposerGDE2();
3067 $peticionWSRequest = $composer->__cde__establecerMetadatosPersonalizados_full(array(
'referenciaDocumento' => $refDoc,
'coleccionMetadatosPersonalizados' => $coleccionMetadatosPersonalizados),
'peticion', self::$NAMESPACE_GDE2);
3069 $mainWS =
new ArrayObject();
3070 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
3071 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
3074 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'establecerMetadatosPersonalizados', self::$NAMESPACE_GDE2);
3075 $respuesta = $clienteWS->establecerMetadatosPersonalizados($miSoapRQ);
3077 $vRespuesta = array();
3078 if (is_object($respuesta))
3082 return($vRespuesta);
3084 catch (Exception $e)
3087 $mensaje = $e->getMessage();
3088 $mensaje = trim(strtolower($mensaje));
3091 case 'looks like we got no xml document' :
3093 $response = $clienteWS->__getLastResponse();
3099 $this->tratarExcepcionEstandar($e, $clienteWS);
3116 $opcionesClienteWS = array (
3117 'soap_version' => SOAP_1_1,
3118 'user_agent' =>
'WSSSoapClient',
3119 'exceptions' =>
true,
3120 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3121 'trace' => self::$MYSOAPOP_TRACE
3124 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
3125 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
3127 $mainWS =
new ArrayObject();
3128 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
3130 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'generarIdentificadorENI', self::$NAMESPACE_GDE2);
3131 $respuesta = $clienteWS->generarIdentificadorENI($miSoapRQ);
3133 $vRespuesta = array();
3134 if (is_object($respuesta))
3138 return($vRespuesta);
3140 catch (Exception $e)
3143 $mensaje = $e->getMessage();
3144 $mensaje = trim(strtolower($mensaje));
3147 case 'looks like we got no xml document' :
3149 $response = $clienteWS->__getLastResponse();
3155 $this->tratarExcepcionEstandar($e, $clienteWS);
3172 $opcionesClienteWS = array (
3173 'soap_version' => SOAP_1_1,
3174 'user_agent' =>
'WSSSoapClient',
3175 'exceptions' =>
true,
3176 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3177 'trace' => self::$MYSOAPOP_TRACE
3180 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
3181 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
3183 $composer =
new ComposerGDE2();
3184 $peticionWSRequest = $composer->__cde__generarToken_full(array(
'referenciaDocumento' => $vRefDoc),
'peticion', self::$NAMESPACE_GDE2);
3186 $obtenerDocumentoWSRequest =
new ArrayObject();
3187 $obtenerDocumentoWSRequest->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
3188 $obtenerDocumentoWSRequest->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
3190 $miSoapRQ =
new SoapVar($obtenerDocumentoWSRequest, SOAP_ENC_OBJECT,null,null,
'generarToken', self::$NAMESPACE_GDE2);
3191 $respuesta = $clienteWS->generarToken($miSoapRQ);
3194 $vRespuesta = array();
3195 if (is_object($respuesta))
3199 return($vRespuesta);
3201 catch (Exception $e)
3204 $mensaje = $e->getMessage();
3205 $mensaje = trim(strtolower($mensaje));
3208 case 'looks like we got no xml document' :
3210 $response = $clienteWS->__getLastResponse();
3216 $this->tratarExcepcionEstandar($e, $clienteWS);
3236 public function insertarDocumentoENIGDE2($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo=null, $vMetaENI=null, $vMetaPers=null, $vFirmas=null)
3240 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true);
3241 $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_GDE2];
3243 $composer =
new ComposerGDE2();
3244 $peticionWSRequest = $composer->__cde__insertarDocumentoENI_full(array(
'documentoENI' => $docContentB64,
'nombre' => $nombreDoc,
3245 'path' => $pathDoc,
'tipoPersonalizado' => $tipo,
'metadatosENI' => $vMetaENI,
'coleccionMetadatosPersonalizados' => $vMetaPers,
'firmas' => $vFirmas),
'peticion', self::$NAMESPACE_GDE2);
3247 $mainWS =
new ArrayObject();
3248 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
3249 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
3251 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'insertarDocumentoENI', self::$NAMESPACE_GDE2);
3252 $respuesta = $clienteWS->insertarDocumentoENI($miSoapRQ);
3255 $vRespuesta = array();
3256 if (is_object($respuesta))
3260 'referenciaDocumento' =>$respuesta->respuesta->referenciaDocumento,
3261 'nombre' => $respuesta->respuesta->nombre
3264 return($vRespuesta);
3266 catch (Exception $e)
3269 $mensaje = $e->getMessage();
3270 $mensaje = trim(strtolower($mensaje));
3273 case 'looks like we got no xml document' :
3275 $response = $clienteWS->__getLastResponse();
3281 $this->tratarExcepcionEstandar($e, $clienteWS);
3299 $opcionesClienteWS = array (
3300 'soap_version' => SOAP_1_1,
3301 'user_agent' =>
'WSSSoapClient',
3302 'exceptions' =>
true,
3303 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3304 'trace' => self::$MYSOAPOP_TRACE
3307 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
3308 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
3310 $composer =
new ComposerGDE2();
3311 $peticionWSRequest = $composer->__cde__obtenerDocumentoENI_full(
3313 'referenciaDocumento' => $refDoc
3314 ),
'peticion', self::$NAMESPACE_GDE2);
3316 $mainWS =
new ArrayObject();
3317 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
3318 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
3320 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'obtenerDocumentoENI', self::$NAMESPACE_GDE2);
3321 $respuesta = $clienteWS->obtenerDocumentoENI($miSoapRQ);
3323 $vRespuesta = array();
3324 if (is_object($respuesta))
3328 return($vRespuesta);
3330 catch (Exception $e)
3333 $mensaje = $e->getMessage();
3334 $mensaje = trim(strtolower($mensaje));
3337 case 'looks like we got no xml document' :
3339 $response = $clienteWS->__getLastResponse();
3345 $this->tratarExcepcionEstandar($e, $clienteWS);
3372 $opcionesClienteWS = array (
3373 'soap_version' => SOAP_1_1,
3374 'user_agent' =>
'WSSSoapClient',
3375 'exceptions' =>
true,
3376 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3377 'trace' => self::$MYSOAPOP_TRACE
3380 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
3381 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
3383 $composer =
new ComposerGDE2();
3384 $peticionWSRequest = $composer->__cde__obtenerExpedienteENI_full(array(
'referenciaDocumento' => $refDoc,
'datosCertificado' => array(
'idCertificadoSafe' => $idCertificadoSafe,
'idSesionSafe' => $idSesionSafe),
'metadatosExpedienteEni' => $vMetadatosExpedienteEni),
'peticion', self::$NAMESPACE_GDE2);
3386 $mainWS =
new ArrayObject();
3387 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
3388 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
3390 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'obtenerExpedienteENI', self::$NAMESPACE_GDE2);
3391 $respuesta = $clienteWS->obtenerExpedienteENI($miSoapRQ);
3393 $vRespuesta = array();
3394 if (is_object($respuesta))
3398 return($vRespuesta);
3400 catch (Exception $e)
3403 $mensaje = $e->getMessage();
3404 $mensaje = trim(strtolower($mensaje));
3407 case 'looks like we got no xml document' :
3409 $response = $clienteWS->__getLastResponse();
3415 $this->tratarExcepcionEstandar($e, $clienteWS);
3435 $opcionesClienteWS = array (
3436 'soap_version' => SOAP_1_1,
3437 'user_agent' =>
'WSSSoapClient',
3438 'exceptions' =>
true,
3439 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3440 'trace' => self::$MYSOAPOP_TRACE
3443 $this->__clienteOn(self::KEYCLIENTE_GDE2,
true, $opcionesClienteWS);
3444 $clienteWS = $this->
__getClient(self::KEYCLIENTE_GDE2);
3447 $composer =
new ComposerGDE2();
3448 $vDataPeticion = array(
'path' => $path);
3449 if (!is_null($idCertificadoSafe) && !is_null($idSesionSafe)) {
3450 $vDataPeticion = array(
'path' => $path,
'datosCertificado' => array(
'idCertificadoSafe' => $idCertificadoSafe,
'idSesionSafe' => $idSesionSafe));
3452 $peticionWSRequest = $composer->__cde__obtenerExpedienteENIdeCarpeta_full($vDataPeticion,
'peticion', self::$NAMESPACE_GDE2);
3454 $mainWS =
new ArrayObject();
3455 $mainWS->append(
new SoapVar($codApp, XSD_STRING, null, null,
'codigoAplicacion', self::$NAMESPACE_GDE2));
3456 $mainWS->append(
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'peticion', self::$NAMESPACE_GDE2));
3458 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'obtenerExpedienteENIdeCarpeta', self::$NAMESPACE_GDE2);
3459 $respuesta = $clienteWS->obtenerExpedienteENIdeCarpeta($miSoapRQ);
3461 $vRespuesta = array();
3462 if (is_object($respuesta))
3466 return($vRespuesta);
3468 catch (Exception $e)
3471 $mensaje = $e->getMessage();
3472 $mensaje = trim(strtolower($mensaje));
3475 case 'looks like we got no xml document' :
3477 $response = $clienteWS->__getLastResponse();
3483 $this->tratarExcepcionEstandar($e, $clienteWS);
3511 private function pf_doAuth($username, $password, $fieldName, $ns) {
3513 $oAux->setUserName($username);
3514 $oAux->setPassword($password);
3515 $authWS = $oAux->toSoap($fieldName, $ns);
3517 $mainWS =
new ArrayObject();
3518 $mainWS->append(
new SoapVar($authWS, SOAP_ENC_OBJECT,null,null, $fieldName, $ns));
3536 $opcionesClienteWS = array (
3537 'soap_version' => SOAP_1_1,
3538 'user_agent' =>
'WSSSoapClient',
3539 'exceptions' =>
true,
3540 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3541 'trace' => self::$MYSOAPOP_TRACE
3544 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
3545 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
3548 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
3549 $mainWS->append(
new SoapVar($documentId, XSD_STRING, null, null,
'documentId', self::$NAMESPACE_PF));
3552 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'downloadDocument', self::$NAMESPACE_PF);
3553 $respuesta = $clienteWS->downloadDocument($miSoapRQ);
3555 $vRespuesta = array();
3556 if (is_object($respuesta))
3560 return($vRespuesta);
3562 catch (Exception $e)
3565 $mensaje = $e->getMessage();
3566 $mensaje = trim(strtolower($mensaje));
3567 if ($mensaje ==
'looks like we got no xml document')
3570 $response = $clienteWS->__getLastResponse();
3576 $vRetorno[
'documentB64'] = $vRetorno[
'documentBinary'];
3577 $vRetorno[
'documentBinary'] = base64_decode($vRetorno[
'documentBinary']);
3582 $this->tratarExcepcionEstandar($e, $clienteWS);
3601 $opcionesClienteWS = array (
3602 'soap_version' => SOAP_1_1,
3603 'user_agent' =>
'WSSSoapClient',
3604 'exceptions' =>
true,
3605 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3606 'trace' => self::$MYSOAPOP_TRACE
3609 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
3610 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
3613 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
3614 $mainWS->append(
new SoapVar($documentId, XSD_STRING, null, null,
'documentId', self::$NAMESPACE_PF));
3617 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'downloadSign', self::$NAMESPACE_PF);
3618 $respuesta = $clienteWS->downloadSign($miSoapRQ);
3620 $vRespuesta = array();
3621 if (is_object($respuesta))
3625 return($vRespuesta);
3627 catch (Exception $e)
3630 $mensaje = $e->getMessage();
3631 $mensaje = trim(strtolower($mensaje));
3632 if ($mensaje ==
'looks like we got no xml document')
3635 $response = $clienteWS->__getLastResponse();
3638 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'downloadSignResponse');
3639 if (isset($vRetorno[
'signature']))
3641 $vRetorno[
'signature'][
'contentB64'] = $vRetorno[
'signature'][
'content'];
3642 $vRetorno[
'signature'][
'content'] = base64_decode($vRetorno[
'signature'][
'content']);
3648 $this->tratarExcepcionEstandar($e, $clienteWS);
3667 $opcionesClienteWS = array (
3668 'soap_version' => SOAP_1_1,
3669 'user_agent' =>
'WSSSoapClient',
3670 'exceptions' =>
true,
3671 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3672 'trace' => self::$MYSOAPOP_TRACE
3675 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
3676 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
3679 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
3680 $mainWS->append(
new SoapVar($query, XSD_STRING, null, null,
'query', self::$NAMESPACE_PF));
3683 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'queryDocumentTypes', self::$NAMESPACE_PF);
3684 $respuesta = $clienteWS->queryDocumentTypes($miSoapRQ);
3686 $vRespuesta = array();
3687 if (is_object($respuesta))
3691 return($vRespuesta);
3693 catch (Exception $e)
3696 $mensaje = $e->getMessage();
3697 $mensaje = trim(strtolower($mensaje));
3698 if ($mensaje ==
'looks like we got no xml document')
3701 $response = $clienteWS->__getLastResponse();
3704 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryDocumentTypesResponse');
3709 $this->tratarExcepcionEstandar($e, $clienteWS);
3728 $opcionesClienteWS = array (
3729 'soap_version' => SOAP_1_1,
3730 'user_agent' =>
'WSSSoapClient',
3731 'exceptions' =>
true,
3732 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3733 'trace' => self::$MYSOAPOP_TRACE
3736 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
3737 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
3740 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
3741 $mainWS->append(
new SoapVar($query, XSD_STRING, null, null,
'query', self::$NAMESPACE_PF));
3744 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'queryJobs', self::$NAMESPACE_PF);
3745 $respuesta = $clienteWS->queryJobs($miSoapRQ);
3747 $vRespuesta = array();
3748 if (is_object($respuesta))
3752 return($vRespuesta);
3754 catch (Exception $e)
3757 $mensaje = $e->getMessage();
3758 $mensaje = trim(strtolower($mensaje));
3759 if ($mensaje ==
'looks like we got no xml document')
3762 $response = $clienteWS->__getLastResponse();
3765 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryJobsResponse');
3770 $this->tratarExcepcionEstandar($e, $clienteWS);
3789 $opcionesClienteWS = array (
3790 'soap_version' => SOAP_1_1,
3791 'user_agent' =>
'WSSSoapClient',
3792 'exceptions' =>
true,
3793 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3794 'trace' => self::$MYSOAPOP_TRACE
3797 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
3798 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
3801 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
3802 $mainWS->append(
new SoapVar($requestId, XSD_STRING, null, null,
'requestId', self::$NAMESPACE_PF));
3805 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'queryRequest', self::$NAMESPACE_PF);
3806 $respuesta = $clienteWS->queryRequest($miSoapRQ);
3808 $vRespuesta = array();
3809 if (is_object($respuesta))
3813 return($vRespuesta);
3815 catch (Exception $e)
3818 $mensaje = $e->getMessage();
3819 $mensaje = trim(strtolower($mensaje));
3820 if ($mensaje ==
'looks like we got no xml document')
3823 $response = $clienteWS->__getLastResponse();
3826 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryRequestResponse');
3831 $this->tratarExcepcionEstandar($e, $clienteWS);
3850 $opcionesClienteWS = array (
3851 'soap_version' => SOAP_1_1,
3852 'user_agent' =>
'WSSSoapClient',
3853 'exceptions' =>
true,
3854 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3855 'trace' => self::$MYSOAPOP_TRACE
3858 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
3859 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
3862 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
3863 $mainWS->append(
new SoapVar($query, XSD_STRING, null, null,
'query', self::$NAMESPACE_PF));
3866 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'queryStates', self::$NAMESPACE_PF);
3867 $respuesta = $clienteWS->queryStates($miSoapRQ);
3869 $vRespuesta = array();
3870 if (is_object($respuesta))
3874 return($vRespuesta);
3876 catch (Exception $e)
3879 $mensaje = $e->getMessage();
3880 $mensaje = trim(strtolower($mensaje));
3881 if ($mensaje ==
'looks like we got no xml document')
3884 $response = $clienteWS->__getLastResponse();
3887 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryStatesResponse');
3892 $this->tratarExcepcionEstandar($e, $clienteWS);
3911 $opcionesClienteWS = array (
3912 'soap_version' => SOAP_1_1,
3913 'user_agent' =>
'WSSSoapClient',
3914 'exceptions' =>
true,
3915 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3916 'trace' => self::$MYSOAPOP_TRACE
3919 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
3920 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
3923 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
3924 $mainWS->append(
new SoapVar($query, XSD_STRING, null, null,
'query', self::$NAMESPACE_PF));
3927 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT, null, null,
'queryUsers', self::$NAMESPACE_PF);
3928 $respuesta = $clienteWS->queryUsers($miSoapRQ);
3930 $vRespuesta = array();
3931 if (is_object($respuesta))
3935 return($vRespuesta);
3937 catch (Exception $e)
3940 $mensaje = $e->getMessage();
3941 $mensaje = trim(strtolower($mensaje));
3942 if ($mensaje ==
'looks like we got no xml document')
3945 $response = $clienteWS->__getLastResponse();
3948 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryUsersResponse');
3953 $this->tratarExcepcionEstandar($e, $clienteWS);
3972 $opcionesClienteWS = array (
3973 'soap_version' => SOAP_1_1,
3974 'user_agent' =>
'WSSSoapClient',
3975 'exceptions' =>
true,
3976 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
3977 'trace' => self::$MYSOAPOP_TRACE
3980 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
3981 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
3984 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
3985 $mainWS->append(
new SoapVar($query, XSD_STRING, null, null,
'query', self::$NAMESPACE_PF));
3988 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'queryImportanceLevels', self::$NAMESPACE_PF);
3989 $respuesta = $clienteWS->queryImportanceLevels($miSoapRQ);
3991 $vRespuesta = array();
3992 if (is_object($respuesta))
3996 return($vRespuesta);
3998 catch (Exception $e)
4001 $mensaje = $e->getMessage();
4002 $mensaje = trim(strtolower($mensaje));
4003 if ($mensaje ==
'looks like we got no xml document')
4006 $response = $clienteWS->__getLastResponse();
4009 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryImportanceLevelsResponse');
4014 $this->tratarExcepcionEstandar($e, $clienteWS);
4034 $opcionesClienteWS = array (
4035 'soap_version' => SOAP_1_1,
4036 'user_agent' =>
'WSSSoapClient',
4037 'exceptions' =>
true,
4038 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4039 'trace' => self::$MYSOAPOP_TRACE
4042 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
4043 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
4046 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
4047 $mainWS->append(
new SoapVar($queryUser, XSD_STRING, null, null,
'queryUser', self::$NAMESPACE_PF));
4048 $mainWS->append(
new SoapVar($querySeat, XSD_STRING, null, null,
'querySeat', self::$NAMESPACE_PF));
4051 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'queryEnhancedUsers', self::$NAMESPACE_PF);
4052 $respuesta = $clienteWS->queryEnhancedUsers($miSoapRQ);
4054 $vRespuesta = array();
4055 if (is_object($respuesta))
4059 return($vRespuesta);
4061 catch (Exception $e)
4064 $mensaje = $e->getMessage();
4065 $mensaje = trim(strtolower($mensaje));
4066 if ($mensaje ==
'looks like we got no xml document')
4069 $response = $clienteWS->__getLastResponse();
4072 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryEnhancedUsersResponse');
4077 $this->tratarExcepcionEstandar($e, $clienteWS);
4097 $opcionesClienteWS = array (
4098 'soap_version' => SOAP_1_1,
4099 'user_agent' =>
'WSSSoapClient',
4100 'exceptions' =>
true,
4101 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4102 'trace' => self::$MYSOAPOP_TRACE
4105 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
4106 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
4109 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
4110 $mainWS->append(
new SoapVar($queryJob, XSD_STRING, null, null,
'queryJob', self::$NAMESPACE_PF));
4111 $mainWS->append(
new SoapVar($querySeat, XSD_STRING, null, null,
'querySeat', self::$NAMESPACE_PF));
4114 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'queryEnhancedJobs', self::$NAMESPACE_PF);
4115 $respuesta = $clienteWS->queryEnhancedJobs($miSoapRQ);
4117 $vRespuesta = array();
4118 if (is_object($respuesta))
4122 return($vRespuesta);
4124 catch (Exception $e)
4127 $mensaje = $e->getMessage();
4128 $mensaje = trim(strtolower($mensaje));
4129 if ($mensaje ==
'looks like we got no xml document')
4132 $response = $clienteWS->__getLastResponse();
4135 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryEnhancedJobsResponse');
4140 $this->tratarExcepcionEstandar($e, $clienteWS);
4159 $opcionesClienteWS = array (
4160 'soap_version' => SOAP_1_1,
4161 'user_agent' =>
'WSSSoapClient',
4162 'exceptions' =>
true,
4163 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4164 'trace' => self::$MYSOAPOP_TRACE
4167 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
4168 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
4171 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
4172 $mainWS->append(
new SoapVar($jobIdentifier, XSD_STRING, null, null,
'jobIdentifier', self::$NAMESPACE_PF));
4175 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'queryEnhancedUserJobAssociatedToJob', self::$NAMESPACE_PF);
4176 $respuesta = $clienteWS->queryEnhancedUserJobAssociatedToJob($miSoapRQ);
4178 $vRespuesta = array();
4179 if (is_object($respuesta))
4183 return($vRespuesta);
4185 catch (Exception $e)
4188 $mensaje = $e->getMessage();
4189 $mensaje = trim(strtolower($mensaje));
4190 if ($mensaje ==
'looks like we got no xml document')
4193 $response = $clienteWS->__getLastResponse();
4196 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryEnhancedUserJobAssociatedToJobResponse');
4201 $this->tratarExcepcionEstandar($e, $clienteWS);
4220 $opcionesClienteWS = array (
4221 'soap_version' => SOAP_1_1,
4222 'user_agent' =>
'WSSSoapClient',
4223 'exceptions' =>
true,
4224 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4225 'trace' => self::$MYSOAPOP_TRACE
4228 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
4229 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
4232 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
4233 $mainWS->append(
new SoapVar($userIdentifier, XSD_STRING, null, null,
'userIdentifier', self::$NAMESPACE_PF));
4236 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'queryEnhancedUserJobAssociatedToUser', self::$NAMESPACE_PF);
4237 $respuesta = $clienteWS->queryEnhancedUserJobAssociatedToUser($miSoapRQ);
4239 $vRespuesta = array();
4240 if (is_object($respuesta))
4244 return($vRespuesta);
4246 catch (Exception $e)
4249 $mensaje = $e->getMessage();
4250 $mensaje = trim(strtolower($mensaje));
4251 if ($mensaje ==
'looks like we got no xml document')
4254 $response = $clienteWS->__getLastResponse();
4257 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'queryEnhancedUserJobAssociatedToUserResponse');
4262 $this->tratarExcepcionEstandar($e, $clienteWS);
4281 $opcionesClienteWS = array (
4282 'soap_version' => SOAP_1_1,
4283 'user_agent' =>
'WSSSoapClient',
4284 'exceptions' =>
true,
4285 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4286 'trace' => self::$MYSOAPOP_TRACE
4289 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
4290 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
4293 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
4294 $mainWS->append(
new SoapVar($query, XSD_STRING, null, null,
'query', self::$NAMESPACE_PF));
4297 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'querySeats', self::$NAMESPACE_PF);
4298 $respuesta = $clienteWS->querySeats($miSoapRQ);
4300 $vRespuesta = array();
4301 if (is_object($respuesta))
4305 return($vRespuesta);
4307 catch (Exception $e)
4310 $mensaje = $e->getMessage();
4311 $mensaje = trim(strtolower($mensaje));
4312 if ($mensaje ==
'looks like we got no xml document')
4315 $response = $clienteWS->__getLastResponse();
4318 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'querySeatsResponse');
4323 $this->tratarExcepcionEstandar($e, $clienteWS);
4342 $opcionesClienteWS = array (
4343 'soap_version' => SOAP_1_1,
4344 'user_agent' =>
'WSSSoapClient',
4345 'exceptions' =>
true,
4346 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4347 'trace' => self::$MYSOAPOP_TRACE
4350 $this->__clienteOn(self::KEYCLIENTE_PF,
true, $opcionesClienteWS);
4351 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF);
4354 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF);
4355 $mainWS->append(
new SoapVar($documentId, XSD_STRING, null, null,
'documentId', self::$NAMESPACE_PF));
4358 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'querySign', self::$NAMESPACE_PF);
4359 $respuesta = $clienteWS->querySign($miSoapRQ);
4361 $vRespuesta = array();
4362 if (is_object($respuesta))
4366 return($vRespuesta);
4368 catch (Exception $e)
4371 $mensaje = $e->getMessage();
4372 $mensaje = trim(strtolower($mensaje));
4373 if ($mensaje ==
'looks like we got no xml document')
4376 $response = $clienteWS->__getLastResponse();
4379 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'querySignResponse');
4385 $this->tratarExcepcionEstandar($e, $clienteWS);
4404 $opcionesClienteWS = array (
4405 'soap_version' => SOAP_1_1,
4406 'user_agent' =>
'WSSSoapClient',
4407 'exceptions' =>
true,
4408 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4409 'trace' => self::$MYSOAPOP_TRACE
4412 $this->__clienteOn(self::KEYCLIENTE_PF_MOD,
true, $opcionesClienteWS);
4413 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_MOD);
4416 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_MOD);
4417 $mainWS->append($request->toSoap(
'request', self::$NAMESPACE_PF_MOD));
4419 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'createRequest', self::$NAMESPACE_PF_MOD);
4420 $respuesta = $clienteWS->createRequest($miSoapRQ);
4422 $vRespuesta = array();
4423 if (is_object($respuesta))
4427 return($vRespuesta);
4429 catch (Exception $e)
4432 $mensaje = $e->getMessage();
4433 $mensaje = trim(strtolower($mensaje));
4434 if ($mensaje ==
'looks like we got no xml document')
4437 $response = $clienteWS->__getLastResponse();
4440 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'createRequestResponse');
4445 $this->tratarExcepcionEstandar($e, $clienteWS);
4464 $opcionesClienteWS = array (
4465 'soap_version' => SOAP_1_1,
4466 'user_agent' =>
'WSSSoapClient',
4467 'exceptions' =>
true,
4468 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4469 'trace' => self::$MYSOAPOP_TRACE
4472 $this->__clienteOn(self::KEYCLIENTE_PF_MOD,
true, $opcionesClienteWS);
4473 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_MOD);
4476 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_MOD);
4477 $mainWS->append(
new SoapVar($documentId, XSD_STRING, null, null,
'documentId', self::$NAMESPACE_PF_MOD));
4480 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'deleteDocument', self::$NAMESPACE_PF_MOD);
4481 $respuesta = $clienteWS->deleteDocument($miSoapRQ);
4483 $vRespuesta = array();
4484 if (is_object($respuesta))
4488 return($vRespuesta);
4490 catch (Exception $e)
4493 $mensaje = $e->getMessage();
4494 $mensaje = trim(strtolower($mensaje));
4495 if ($mensaje ==
'looks like we got no xml document')
4498 $response = $clienteWS->__getLastResponse();
4501 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'deleteDocumentResponse');
4506 $this->tratarExcepcionEstandar($e, $clienteWS);
4525 $opcionesClienteWS = array (
4526 'soap_version' => SOAP_1_1,
4527 'user_agent' =>
'WSSSoapClient',
4528 'exceptions' =>
true,
4529 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4530 'trace' => self::$MYSOAPOP_TRACE
4533 $this->__clienteOn(self::KEYCLIENTE_PF_MOD,
true, $opcionesClienteWS);
4534 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_MOD);
4537 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_MOD);
4538 $mainWS->append(
new SoapVar($requestId, XSD_STRING, null, null,
'requestId', self::$NAMESPACE_PF_MOD));
4541 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'deleteRequest', self::$NAMESPACE_PF_MOD);
4542 $respuesta = $clienteWS->deleteRequest($miSoapRQ);
4544 $vRespuesta = array();
4545 if (is_object($respuesta))
4549 return($vRespuesta);
4551 catch (Exception $e)
4554 $mensaje = $e->getMessage();
4555 $mensaje = trim(strtolower($mensaje));
4556 if ($mensaje ==
'looks like we got no xml document')
4559 $response = $clienteWS->__getLastResponse();
4562 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'deleteRequestResponse');
4567 $this->tratarExcepcionEstandar($e, $clienteWS);
4587 $opcionesClienteWS = array (
4588 'soap_version' => SOAP_1_1,
4589 'user_agent' =>
'WSSSoapClient',
4590 'exceptions' =>
true,
4591 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4592 'trace' => self::$MYSOAPOP_TRACE
4595 $this->__clienteOn(self::KEYCLIENTE_PF_MOD,
true, $opcionesClienteWS);
4596 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_MOD);
4599 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_MOD);
4600 $mainWS->append(
new SoapVar($requestId, XSD_STRING, null, null,
'requestId', self::$NAMESPACE_PF_MOD));
4601 $mainWS->append($signerList->toSoap(
'signerList', self::$NAMESPACE_PF_MOD));
4604 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'deleteSigners', self::$NAMESPACE_PF_MOD);
4605 $respuesta = $clienteWS->deleteSigners($miSoapRQ);
4607 $vRespuesta = array();
4608 if (is_object($respuesta))
4612 return($vRespuesta);
4614 catch (Exception $e)
4617 $mensaje = $e->getMessage();
4618 $mensaje = trim(strtolower($mensaje));
4619 if ($mensaje ==
'looks like we got no xml document')
4622 $response = $clienteWS->__getLastResponse();
4625 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'deleteSignersResponse');
4630 $this->tratarExcepcionEstandar($e, $clienteWS);
4650 $opcionesClienteWS = array (
4651 'soap_version' => SOAP_1_1,
4652 'user_agent' =>
'WSSSoapClient',
4653 'exceptions' =>
true,
4654 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4655 'trace' => self::$MYSOAPOP_TRACE
4658 $this->__clienteOn(self::KEYCLIENTE_PF_MOD,
true, $opcionesClienteWS);
4659 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_MOD);
4662 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_MOD);
4663 $mainWS->append(
new SoapVar($requestId, XSD_STRING, null, null,
'requestId', self::$NAMESPACE_PF_MOD));
4664 $mainWS->append($document->toSoap(
'document', self::$NAMESPACE_PF_MOD));
4667 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'insertDocument', self::$NAMESPACE_PF_MOD);
4668 $respuesta = $clienteWS->insertDocument($miSoapRQ);
4670 $vRespuesta = array();
4671 if (is_object($respuesta))
4675 return($vRespuesta);
4677 catch (Exception $e)
4680 $mensaje = $e->getMessage();
4681 $mensaje = trim(strtolower($mensaje));
4682 if ($mensaje ==
'looks like we got no xml document')
4685 $response = $clienteWS->__getLastResponse();
4688 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'insertDocumentResponse');
4693 $this->tratarExcepcionEstandar($e, $clienteWS);
4715 $opcionesClienteWS = array (
4716 'soap_version' => SOAP_1_1,
4717 'user_agent' =>
'WSSSoapClient',
4718 'exceptions' =>
true,
4719 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4720 'trace' => self::$MYSOAPOP_TRACE
4723 $this->__clienteOn(self::KEYCLIENTE_PF_MOD,
true, $opcionesClienteWS);
4724 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_MOD);
4727 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_MOD);
4728 $mainWS->append(
new SoapVar($requestId, XSD_STRING, null, null,
'requestId', self::$NAMESPACE_PF_MOD));
4729 $mainWS->append(
new SoapVar($signLine, XSD_INT,null,null,
'signLine', self::$NAMESPACE_PF_MOD));
4730 $mainWS->append($signerList->toSoap(
'signerList', self::$NAMESPACE_PF_MOD));
4731 $mainWS->append(
new SoapVar($signLineType, XSD_STRING, null, null,
'signLineType', self::$NAMESPACE_PF_MOD));
4733 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'insertSigners', self::$NAMESPACE_PF_MOD);
4734 $respuesta = $clienteWS->insertSigners($miSoapRQ);
4736 $vRespuesta = array();
4737 if (is_object($respuesta))
4741 return($vRespuesta);
4743 catch (Exception $e)
4746 $mensaje = $e->getMessage();
4747 $mensaje = trim(strtolower($mensaje));
4748 if ($mensaje ==
'looks like we got no xml document')
4751 $response = $clienteWS->__getLastResponse();
4754 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'insertSignersResponse');
4759 $this->tratarExcepcionEstandar($e, $clienteWS);
4778 $opcionesClienteWS = array (
4779 'soap_version' => SOAP_1_1,
4780 'user_agent' =>
'WSSSoapClient',
4781 'exceptions' =>
true,
4782 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4783 'trace' => self::$MYSOAPOP_TRACE
4786 $this->__clienteOn(self::KEYCLIENTE_PF_MOD,
true, $opcionesClienteWS);
4787 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_MOD);
4790 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_MOD);
4791 $mainWS->append(
new SoapVar($requestId, XSD_STRING, null, null,
'requestId', self::$NAMESPACE_PF_MOD));
4794 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'sendRequest', self::$NAMESPACE_PF_MOD);
4795 $respuesta = $clienteWS->sendRequest($miSoapRQ);
4797 $vRespuesta = array();
4798 if (is_object($respuesta))
4802 return($vRespuesta);
4804 catch (Exception $e)
4807 $mensaje = $e->getMessage();
4808 $mensaje = trim(strtolower($mensaje));
4809 if ($mensaje ==
'looks like we got no xml document')
4812 $response = $clienteWS->__getLastResponse();
4815 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'sendRequestResponse');
4820 $this->tratarExcepcionEstandar($e, $clienteWS);
4839 $opcionesClienteWS = array (
4840 'soap_version' => SOAP_1_1,
4841 'user_agent' =>
'WSSSoapClient',
4842 'exceptions' =>
true,
4843 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4844 'trace' => self::$MYSOAPOP_TRACE
4847 $this->__clienteOn(self::KEYCLIENTE_PF_MOD,
true, $opcionesClienteWS);
4848 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_MOD);
4851 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_MOD);
4852 $mainWS->append($request->toSoap(
'request', self::$NAMESPACE_PF_MOD));
4855 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'updateRequest', self::$NAMESPACE_PF_MOD);
4856 $respuesta = $clienteWS->updateRequest($miSoapRQ);
4858 $vRespuesta = array();
4859 if (is_object($respuesta))
4863 return($vRespuesta);
4865 catch (Exception $e)
4868 $mensaje = $e->getMessage();
4869 $mensaje = trim(strtolower($mensaje));
4870 if ($mensaje ==
'looks like we got no xml document')
4873 $response = $clienteWS->__getLastResponse();
4876 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'updateRequestResponse');
4881 $this->tratarExcepcionEstandar($e, $clienteWS);
4901 $opcionesClienteWS = array (
4902 'soap_version' => SOAP_1_1,
4903 'user_agent' =>
'WSSSoapClient',
4904 'exceptions' =>
true,
4905 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4906 'trace' => self::$MYSOAPOP_TRACE
4909 $this->__clienteOn(self::KEYCLIENTE_PF_MOD,
true, $opcionesClienteWS);
4910 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_MOD);
4913 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_MOD);
4914 $mainWS->append(
new SoapVar($requestId, XSD_STRING, null, null,
'requestId', self::$NAMESPACE_PF_MOD));
4915 $mainWS->append(
new SoapVar($removingMessage, XSD_STRING, null, null,
'removingMessage', self::$NAMESPACE_PF_MOD));
4918 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'removeRequest', self::$NAMESPACE_PF_MOD);
4919 $respuesta = $clienteWS->removeRequest($miSoapRQ);
4921 $vRespuesta = array();
4922 if (is_object($respuesta))
4926 return($vRespuesta);
4928 catch (Exception $e)
4931 $mensaje = $e->getMessage();
4932 $mensaje = trim(strtolower($mensaje));
4933 if ($mensaje ==
'looks like we got no xml document')
4936 $response = $clienteWS->__getLastResponse();
4939 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'removeRequestResponse');
4944 $this->tratarExcepcionEstandar($e, $clienteWS);
4963 $opcionesClienteWS = array (
4964 'soap_version' => SOAP_1_1,
4965 'user_agent' =>
'WSSSoapClient',
4966 'exceptions' =>
true,
4967 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
4968 'trace' => self::$MYSOAPOP_TRACE
4971 $this->__clienteOn(self::KEYCLIENTE_PF_ADM,
true, $opcionesClienteWS);
4972 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_ADM);
4975 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_ADM);
4976 $mainWS->append($enhancedUserList->toSoap(
'enhancedUserList', self::$NAMESPACE_PF_ADM));
4979 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'insertEnhancedUsers', self::$NAMESPACE_PF_ADM);
4980 $respuesta = $clienteWS->insertEnhancedUsers($miSoapRQ);
4982 $vRespuesta = array();
4983 if (is_object($respuesta))
4987 return($vRespuesta);
4989 catch (Exception $e)
4992 $mensaje = $e->getMessage();
4993 $mensaje = trim(strtolower($mensaje));
4994 if ($mensaje ==
'looks like we got no xml document')
4997 $response = $clienteWS->__getLastResponse();
5000 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'insertEnhancedUsersResponse');
5005 $this->tratarExcepcionEstandar($e, $clienteWS);
5024 $opcionesClienteWS = array (
5025 'soap_version' => SOAP_1_1,
5026 'user_agent' =>
'WSSSoapClient',
5027 'exceptions' =>
true,
5028 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5029 'trace' => self::$MYSOAPOP_TRACE
5032 $this->__clienteOn(self::KEYCLIENTE_PF_ADM,
true, $opcionesClienteWS);
5033 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_ADM);
5036 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_ADM);
5037 $mainWS->append($enhancedUserList->toSoap(
'enhancedUserList', self::$NAMESPACE_PF_ADM));
5040 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'updateEnhancedUsers', self::$NAMESPACE_PF_ADM);
5041 $respuesta = $clienteWS->updateEnhancedUsers($miSoapRQ);
5043 $vRespuesta = array();
5044 if (is_object($respuesta))
5048 return($vRespuesta);
5050 catch (Exception $e)
5053 $mensaje = $e->getMessage();
5054 $mensaje = trim(strtolower($mensaje));
5055 if ($mensaje ==
'looks like we got no xml document')
5058 $response = $clienteWS->__getLastResponse();
5061 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'updateEnhancedUsersResponse');
5066 $this->tratarExcepcionEstandar($e, $clienteWS);
5085 $opcionesClienteWS = array (
5086 'soap_version' => SOAP_1_1,
5087 'user_agent' =>
'WSSSoapClient',
5088 'exceptions' =>
true,
5089 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5090 'trace' => self::$MYSOAPOP_TRACE
5093 $this->__clienteOn(self::KEYCLIENTE_PF_ADM,
true, $opcionesClienteWS);
5094 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_ADM);
5097 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_ADM);
5098 $mainWS->append($userIdentifierList->toSoap(
'userIdentifierList', self::$NAMESPACE_PF_ADM));
5101 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'deleteUsers', self::$NAMESPACE_PF_ADM);
5102 $respuesta = $clienteWS->deleteUsers($miSoapRQ);
5104 $vRespuesta = array();
5105 if (is_object($respuesta))
5109 return($vRespuesta);
5111 catch (Exception $e)
5114 $mensaje = $e->getMessage();
5115 $mensaje = trim(strtolower($mensaje));
5116 if ($mensaje ==
'looks like we got no xml document')
5119 $response = $clienteWS->__getLastResponse();
5122 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'deleteUsersResponse');
5127 $this->tratarExcepcionEstandar($e, $clienteWS);
5146 $opcionesClienteWS = array (
5147 'soap_version' => SOAP_1_1,
5148 'user_agent' =>
'WSSSoapClient',
5149 'exceptions' =>
true,
5150 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5151 'trace' => self::$MYSOAPOP_TRACE
5154 $this->__clienteOn(self::KEYCLIENTE_PF_ADM,
true, $opcionesClienteWS);
5155 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_ADM);
5158 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_ADM);
5159 $mainWS->append($enhancedJobList->toSoap(
'enhancedJobList', self::$NAMESPACE_PF_ADM));
5162 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'insertEnhancedJobs', self::$NAMESPACE_PF_ADM);
5163 $respuesta = $clienteWS->insertEnhancedJobs($miSoapRQ);
5165 $vRespuesta = array();
5166 if (is_object($respuesta))
5170 return($vRespuesta);
5172 catch (Exception $e)
5175 $mensaje = $e->getMessage();
5176 $mensaje = trim(strtolower($mensaje));
5177 if ($mensaje ==
'looks like we got no xml document')
5180 $response = $clienteWS->__getLastResponse();
5183 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'insertEnhancedJobsResponse');
5188 $this->tratarExcepcionEstandar($e, $clienteWS);
5207 $opcionesClienteWS = array (
5208 'soap_version' => SOAP_1_1,
5209 'user_agent' =>
'WSSSoapClient',
5210 'exceptions' =>
true,
5211 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5212 'trace' => self::$MYSOAPOP_TRACE
5215 $this->__clienteOn(self::KEYCLIENTE_PF_ADM,
true, $opcionesClienteWS);
5216 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_ADM);
5219 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_ADM);
5220 $mainWS->append($enhancedJobList->toSoap(
'enhancedJobList', self::$NAMESPACE_PF_ADM));
5223 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'updateEnhancedJobs', self::$NAMESPACE_PF_ADM);
5224 $respuesta = $clienteWS->updateEnhancedJobs($miSoapRQ);
5226 $vRespuesta = array();
5227 if (is_object($respuesta))
5231 return($vRespuesta);
5233 catch (Exception $e)
5236 $mensaje = $e->getMessage();
5237 $mensaje = trim(strtolower($mensaje));
5238 if ($mensaje ==
'looks like we got no xml document')
5241 $response = $clienteWS->__getLastResponse();
5244 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'updateEnhancedJobsResponse');
5249 $this->tratarExcepcionEstandar($e, $clienteWS);
5268 $opcionesClienteWS = array (
5269 'soap_version' => SOAP_1_1,
5270 'user_agent' =>
'WSSSoapClient',
5271 'exceptions' =>
true,
5272 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5273 'trace' => self::$MYSOAPOP_TRACE
5276 $this->__clienteOn(self::KEYCLIENTE_PF_ADM,
true, $opcionesClienteWS);
5277 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_ADM);
5280 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_ADM);
5281 $mainWS->append($jobIdentifierList->toSoap(
'jobIdentifierList', self::$NAMESPACE_PF_ADM));
5284 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'deleteJobs', self::$NAMESPACE_PF_ADM);
5285 $respuesta = $clienteWS->deleteJobs($miSoapRQ);
5287 $vRespuesta = array();
5288 if (is_object($respuesta))
5292 return($vRespuesta);
5294 catch (Exception $e)
5297 $mensaje = $e->getMessage();
5298 $mensaje = trim(strtolower($mensaje));
5299 if ($mensaje ==
'looks like we got no xml document')
5302 $response = $clienteWS->__getLastResponse();
5305 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'deleteJobsResponse');
5310 $this->tratarExcepcionEstandar($e, $clienteWS);
5332 $opcionesClienteWS = array (
5333 'soap_version' => SOAP_1_1,
5334 'user_agent' =>
'WSSSoapClient',
5335 'exceptions' =>
true,
5336 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5337 'trace' => self::$MYSOAPOP_TRACE
5340 $this->__clienteOn(self::KEYCLIENTE_PF_ADM,
true, $opcionesClienteWS);
5341 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_ADM);
5344 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_ADM);
5345 $mainWS->append(
new SoapVar($jobIdentifier, XSD_STRING, null, null,
'jobIdentifier', self::$NAMESPACE_PF_ADM));
5346 $mainWS->append(
new SoapVar($userIdentifier, XSD_STRING, null, null,
'userIdentifier', self::$NAMESPACE_PF_ADM));
5347 $mainWS->append(
new SoapVar($fstart, XSD_DATE, null, null,
'fstart', self::$NAMESPACE_PF_ADM));
5348 $mainWS->append(
new SoapVar($fend, XSD_DATE, null, null,
'fend', self::$NAMESPACE_PF_ADM));
5351 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'assignJobToUser', self::$NAMESPACE_PF_ADM);
5352 $respuesta = $clienteWS->assignJobToUser($miSoapRQ);
5354 $vRespuesta = array();
5355 if (is_object($respuesta))
5359 return($vRespuesta);
5361 catch (Exception $e)
5364 $mensaje = $e->getMessage();
5365 $mensaje = trim(strtolower($mensaje));
5366 if ($mensaje ==
'looks like we got no xml document')
5369 $response = $clienteWS->__getLastResponse();
5372 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'assignJobToUserResponse');
5377 $this->tratarExcepcionEstandar($e, $clienteWS);
5397 $opcionesClienteWS = array (
5398 'soap_version' => SOAP_1_1,
5399 'user_agent' =>
'WSSSoapClient',
5400 'exceptions' =>
true,
5401 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5402 'trace' => self::$MYSOAPOP_TRACE
5405 $this->__clienteOn(self::KEYCLIENTE_PF_ADM,
true, $opcionesClienteWS);
5406 $clienteWS = $this->
__getClient(self::KEYCLIENTE_PF_ADM);
5409 $mainWS = $this->pf_doAuth($username, $password,
'authentication', self::$NAMESPACE_PF_ADM);
5410 $mainWS->append(
new SoapVar($jobIdentifier, XSD_STRING, null, null,
'jobIdentifier', self::$NAMESPACE_PF_ADM));
5411 $mainWS->append(
new SoapVar($userIdentifier, XSD_STRING, null, null,
'userIdentifier', self::$NAMESPACE_PF_ADM));
5414 $miSoapRQ =
new SoapVar($mainWS, SOAP_ENC_OBJECT,null,null,
'separateJobToUser', self::$NAMESPACE_PF_ADM);
5415 $respuesta = $clienteWS->separateJobToUser($miSoapRQ);
5417 $vRespuesta = array();
5418 if (is_object($respuesta))
5422 return($vRespuesta);
5424 catch (Exception $e)
5427 $mensaje = $e->getMessage();
5428 $mensaje = trim(strtolower($mensaje));
5429 if ($mensaje ==
'looks like we got no xml document')
5432 $response = $clienteWS->__getLastResponse();
5435 $vRetorno = $this->tratarMTOM4PF($response,
true,
"\r\n",
'separateJobToUserResponse');
5440 $this->tratarExcepcionEstandar($e, $clienteWS);
5481 public function catastro($IdPeticion, $NumElementos, $TimeStamp, $CodigoCertificado,
5482 $NifEmisor, $NombreEmisor, $CodProcedimiento, $NombreProcedimiento,
5483 $NombreCompletoFuncionario, $NifFuncionario, $IdentificadorSolicitante, $NombreSolicitante,
5484 $UnidadTramitadora, $Finalidad, $Consentimiento,
5485 $IdExpediente, $TipoDocumentacion, $Documentacion, $NombreCompleto,
5486 $Nombre, $Apellido1, $Apellido2, $CodigoCertificado, $IdSolicitud, $vDataEspecifico)
5491 $opcionesClienteWS = array (
5492 'soap_version' => SOAP_1_1,
5493 'user_agent' =>
'WSSSoapClient',
5494 'exceptions' =>
true,
5495 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5496 'trace' => self::$MYSOAPOP_TRACE
5499 $this->__clienteOn(self::KEYCLIENTE_CATASTRO,
true, $opcionesClienteWS);
5500 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CATASTRO);
5504 $IdSolicitud = $IdPeticion;
5514 $AtributosWSRequest =
new ArrayObject();
5515 $AtributosWSRequest->append(
new SoapVar($IdPeticion, XSD_STRING, null, null,
'IdPeticion', self::$NAMESPACE_CAT_PET));
5516 $AtributosWSRequest->append(
new SoapVar($NumElementos, XSD_INTEGER , null, null,
'NumElementos', self::$NAMESPACE_CAT_PET));
5517 $AtributosWSRequest->append(
new SoapVar($TimeStamp->format(DateTime::ATOM), XSD_STRING, null, null,
'TimeStamp', self::$NAMESPACE_CAT_PET));
5518 $AtributosWSRequest->append(
new SoapVar($CodigoCertificado, XSD_STRING, null, null,
'CodigoCertificado', self::$NAMESPACE_CAT_PET));
5521 $EmisorWSRequest =
new ArrayObject();
5522 $EmisorWSRequest->append(
new SoapVar($NifEmisor, XSD_STRING, null, null,
'NifEmisor', self::$NAMESPACE_CAT_PET));
5523 $EmisorWSRequest->append(
new SoapVar($NombreEmisor, XSD_STRING, null, null,
'NombreEmisor', self::$NAMESPACE_CAT_PET));
5526 $ProcedimientoWSRequest =
new ArrayObject();
5527 $ProcedimientoWSRequest->append(
new SoapVar($CodProcedimiento, XSD_STRING, null, null,
'CodProcedimiento', self::$NAMESPACE_CAT_PET));
5528 $ProcedimientoWSRequest->append(
new SoapVar($NombreProcedimiento, XSD_STRING, null, null,
'NombreProcedimiento', self::$NAMESPACE_CAT_PET));
5531 $FuncionarioWSRequest =
new ArrayObject();
5532 $FuncionarioWSRequest->append(
new SoapVar($NombreCompletoFuncionario, XSD_STRING, null, null,
'NombreCompletoFuncionario', self::$NAMESPACE_CAT_PET));
5533 $FuncionarioWSRequest->append(
new SoapVar($NifFuncionario, XSD_STRING, null, null,
'NifFuncionario', self::$NAMESPACE_CAT_PET));
5536 $SolicitanteWSRequest =
new ArrayObject();
5537 $SolicitanteWSRequest->append(
new SoapVar($IdentificadorSolicitante, XSD_STRING, null, null,
'IdentificadorSolicitante', self::$NAMESPACE_CAT_PET));
5538 $SolicitanteWSRequest->append(
new SoapVar($NombreSolicitante, XSD_STRING, null, null,
'NombreSolicitante', self::$NAMESPACE_CAT_PET));
5539 $SolicitanteWSRequest->append(
new SoapVar($ProcedimientoWSRequest, SOAP_ENC_OBJECT,null,null,
'Procedimiento', self::$NAMESPACE_CAT_PET));
5540 $SolicitanteWSRequest->append(
new SoapVar($Finalidad, XSD_STRING, null, null,
'Finalidad', self::$NAMESPACE_CAT_PET));
5541 $SolicitanteWSRequest->append(
new SoapVar($Consentimiento, XSD_STRING, null, null,
'Consentimiento', self::$NAMESPACE_CAT_PET));
5542 $SolicitanteWSRequest->append(
new SoapVar($FuncionarioWSRequest, SOAP_ENC_OBJECT,null,null,
'Funcionario', self::$NAMESPACE_CAT_PET));
5545 $TitularWSRequest =
new ArrayObject();
5546 $TitularWSRequest->append(
new SoapVar($TipoDocumentacion, XSD_STRING, null, null,
'TipoDocumentacion', self::$NAMESPACE_CAT_PET));
5547 $TitularWSRequest->append(
new SoapVar($Documentacion, XSD_STRING, null, null,
'Documentacion', self::$NAMESPACE_CAT_PET));
5551 $TransmisionWSRequest =
new ArrayObject();
5552 $TransmisionWSRequest->append(
new SoapVar($CodigoCertificado, XSD_STRING, null, null,
'CodigoCertificado', self::$NAMESPACE_CAT_PET));
5553 $TransmisionWSRequest->append(
new SoapVar($IdSolicitud, XSD_STRING, null, null,
'IdSolicitud', self::$NAMESPACE_CAT_PET));
5556 $DatosGenericosWSRequest =
new ArrayObject();
5557 $DatosGenericosWSRequest->append(
new SoapVar($EmisorWSRequest, SOAP_ENC_OBJECT,null,null,
'Emisor', self::$NAMESPACE_CAT_PET));
5558 $DatosGenericosWSRequest->append(
new SoapVar($SolicitanteWSRequest, SOAP_ENC_OBJECT,null,null,
'Solicitante', self::$NAMESPACE_CAT_PET));
5559 $DatosGenericosWSRequest->append(
new SoapVar($TitularWSRequest, SOAP_ENC_OBJECT,null,null,
'Titular', self::$NAMESPACE_CAT_PET));
5560 $DatosGenericosWSRequest->append(
new SoapVar($TransmisionWSRequest, SOAP_ENC_OBJECT,null,null,
'Transmision', self::$NAMESPACE_CAT_PET));
5563 $SolicitudTransmisionWSRequest =
new ArrayObject();
5564 $SolicitudTransmisionWSRequest->append(
new SoapVar($DatosGenericosWSRequest, SOAP_ENC_OBJECT,null,null,
'DatosGenericos', self::$NAMESPACE_CAT_PET));
5568 $SolicitudesWSRequest =
new ArrayObject();
5569 $SolicitudesWSRequest->append(
new SoapVar($SolicitudTransmisionWSRequest, SOAP_ENC_OBJECT,null,null,
'SolicitudTransmision', self::$NAMESPACE_CAT_PET));
5572 $bodyWSRequest =
new ArrayObject();
5573 $bodyWSRequest->append(
new SoapVar($AtributosWSRequest, SOAP_ENC_OBJECT,null,null,
'Atributos', self::$NAMESPACE_CAT_PET));
5574 $bodyWSRequest->append(
new SoapVar($SolicitudesWSRequest, SOAP_ENC_OBJECT,null,null,
'Solicitudes', self::$NAMESPACE_CAT_PET));
5577 $miSoapRQ =
new SoapVar($bodyWSRequest, SOAP_ENC_OBJECT,null,null,
'Peticion', self::$NAMESPACE_CAT_PET);
5579 $respuesta = $clienteWS->peticionSincrona($miSoapRQ);
5582 $vRespuesta = array();
5583 if (is_object($respuesta))
5587 'respuesta' => $respuesta
5590 return($vRespuesta);
5592 catch (Exception $e)
5594 $this->tratarExcepcionEstandar($e, $clienteWS);
5628 $NifEmisor, $NombreEmisor, $CodProcedimiento, $NombreProcedimiento,
5629 $NombreCompletoFuncionario, $NifFuncionario, $IdentificadorSolicitante, $NombreSolicitante,
5630 $UnidadTramitadora, $Finalidad, $Consentimiento,
5631 $IdExpediente, $TipoDocumentacion, $Documentacion, $NombreCompleto,
5632 $Nombre, $Apellido1, $Apellido2, $CodigoCertificado, $IdSolicitud, $vDataEspecifico)
5637 $opcionesClienteWS = array (
5638 'soap_version' => SOAP_1_1,
5639 'user_agent' =>
'WSSSoapClient',
5640 'exceptions' =>
true,
5641 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5642 'trace' => self::$MYSOAPOP_TRACE
5645 $this->__clienteOn(self::KEYCLIENTE_CATASTRO_BIENES,
true, $opcionesClienteWS);
5646 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CATASTRO_BIENES);
5654 $NumElementos = count($vDataEspecifico);
5657 $AtributosWSRequest =
new ArrayObject();
5658 $AtributosWSRequest->append(
new SoapVar($IdPeticion, XSD_STRING, null, null,
'IdPeticion', self::$NAMESPACE_CAT_PET));
5659 $AtributosWSRequest->append(
new SoapVar($NumElementos, XSD_INTEGER , null, null,
'NumElementos', self::$NAMESPACE_CAT_PET));
5660 $AtributosWSRequest->append(
new SoapVar($TimeStamp->format(DateTime::ATOM), XSD_STRING, null, null,
'TimeStamp', self::$NAMESPACE_CAT_PET));
5661 $AtributosWSRequest->append(
new SoapVar($CodigoCertificado, XSD_STRING, null, null,
'CodigoCertificado', self::$NAMESPACE_CAT_PET));
5664 $SolicitudesWSRequest =
new ArrayObject();
5667 for ($iPet=0; $iPet < $NumElementos; $iPet++) {
5669 $IdSolicitud = $IdPeticion .
'_' . $iPet;
5677 $vDataPeticion = array(
'DatosEntrada' => $vDataEspecifico[$iPet]);
5678 $DatosEspecificosWSRequest = $compEspecifico->doIt($vDataPeticion);
5682 $EmisorWSRequest =
new ArrayObject();
5683 $EmisorWSRequest->append(
new SoapVar($NifEmisor, XSD_STRING, null, null,
'NifEmisor', self::$NAMESPACE_CAT_PET));
5684 $EmisorWSRequest->append(
new SoapVar($NombreEmisor, XSD_STRING, null, null,
'NombreEmisor', self::$NAMESPACE_CAT_PET));
5687 $ProcedimientoWSRequest =
new ArrayObject();
5688 $ProcedimientoWSRequest->append(
new SoapVar($CodProcedimiento, XSD_STRING, null, null,
'CodProcedimiento', self::$NAMESPACE_CAT_PET));
5689 $ProcedimientoWSRequest->append(
new SoapVar($NombreProcedimiento, XSD_STRING, null, null,
'NombreProcedimiento', self::$NAMESPACE_CAT_PET));
5692 $FuncionarioWSRequest =
new ArrayObject();
5693 $FuncionarioWSRequest->append(
new SoapVar($NombreCompletoFuncionario, XSD_STRING, null, null,
'NombreCompletoFuncionario', self::$NAMESPACE_CAT_PET));
5694 $FuncionarioWSRequest->append(
new SoapVar($NifFuncionario, XSD_STRING, null, null,
'NifFuncionario', self::$NAMESPACE_CAT_PET));
5697 $SolicitanteWSRequest =
new ArrayObject();
5698 $SolicitanteWSRequest->append(
new SoapVar($IdentificadorSolicitante, XSD_STRING, null, null,
'IdentificadorSolicitante', self::$NAMESPACE_CAT_PET));
5699 $SolicitanteWSRequest->append(
new SoapVar($NombreSolicitante, XSD_STRING, null, null,
'NombreSolicitante', self::$NAMESPACE_CAT_PET));
5701 $SolicitanteWSRequest->append(
new SoapVar($ProcedimientoWSRequest, SOAP_ENC_OBJECT,null,null,
'Procedimiento', self::$NAMESPACE_CAT_PET));
5702 $SolicitanteWSRequest->append(
new SoapVar($Finalidad, XSD_STRING, null, null,
'Finalidad', self::$NAMESPACE_CAT_PET));
5703 $SolicitanteWSRequest->append(
new SoapVar($Consentimiento, XSD_STRING, null, null,
'Consentimiento', self::$NAMESPACE_CAT_PET));
5704 $SolicitanteWSRequest->append(
new SoapVar($FuncionarioWSRequest, SOAP_ENC_OBJECT,null,null,
'Funcionario', self::$NAMESPACE_CAT_PET));
5708 $TitularWSRequest =
new ArrayObject();
5709 $TitularWSRequest->append(
new SoapVar($TipoDocumentacion, XSD_STRING, null, null,
'TipoDocumentacion', self::$NAMESPACE_CAT_PET));
5710 $TitularWSRequest->append(
new SoapVar($Documentacion, XSD_STRING, null, null,
'Documentacion', self::$NAMESPACE_CAT_PET));
5717 $TransmisionWSRequest =
new ArrayObject();
5718 $TransmisionWSRequest->append(
new SoapVar($CodigoCertificado, XSD_STRING, null, null,
'CodigoCertificado', self::$NAMESPACE_CAT_PET));
5719 $TransmisionWSRequest->append(
new SoapVar($IdSolicitud, XSD_STRING, null, null,
'IdSolicitud', self::$NAMESPACE_CAT_PET));
5722 $DatosGenericosWSRequest =
new ArrayObject();
5723 $DatosGenericosWSRequest->append(
new SoapVar($EmisorWSRequest, SOAP_ENC_OBJECT,null,null,
'Emisor', self::$NAMESPACE_CAT_PET));
5724 $DatosGenericosWSRequest->append(
new SoapVar($SolicitanteWSRequest, SOAP_ENC_OBJECT,null,null,
'Solicitante', self::$NAMESPACE_CAT_PET));
5725 $DatosGenericosWSRequest->append(
new SoapVar($TitularWSRequest, SOAP_ENC_OBJECT,null,null,
'Titular', self::$NAMESPACE_CAT_PET));
5726 $DatosGenericosWSRequest->append(
new SoapVar($TransmisionWSRequest, SOAP_ENC_OBJECT,null,null,
'Transmision', self::$NAMESPACE_CAT_PET));
5729 $SolicitudTransmisionWSRequest =
new ArrayObject();
5730 $SolicitudTransmisionWSRequest->append(
new SoapVar($DatosGenericosWSRequest, SOAP_ENC_OBJECT,null,null,
'DatosGenericos', self::$NAMESPACE_CAT_PET));
5731 $SolicitudTransmisionWSRequest->append(
new SoapVar($DatosEspecificosWSRequest, SOAP_ENC_OBJECT,null,null,
'DatosEspecificos', self::$NAMESPACE_CAT_ESP));
5735 $SolicitudesWSRequest->append(
new SoapVar($SolicitudTransmisionWSRequest, SOAP_ENC_OBJECT,null,null,
'SolicitudTransmision', self::$NAMESPACE_CAT_PET));
5739 $bodyWSRequest =
new ArrayObject();
5740 $bodyWSRequest->append(
new SoapVar($AtributosWSRequest, SOAP_ENC_OBJECT,null,null,
'Atributos', self::$NAMESPACE_CAT_PET));
5741 $bodyWSRequest->append(
new SoapVar($SolicitudesWSRequest, SOAP_ENC_OBJECT,null,null,
'Solicitudes', self::$NAMESPACE_CAT_PET));
5744 $miSoapRQ =
new SoapVar($bodyWSRequest, SOAP_ENC_OBJECT,null,null,
'Peticion', self::$NAMESPACE_CAT_PET);
5745 $respuesta = $clienteWS->peticionAsincrona($miSoapRQ);
5748 $vRespuesta = array();
5749 if (is_object($respuesta))
5753 'respuesta' => $respuesta
5756 return($vRespuesta);
5758 catch (Exception $e)
5760 $this->tratarExcepcionEstandar($e, $clienteWS);
5764 public function catastroBienesRespuesta($IdPeticion, $TimeStamp, $CodigoCertificado, $NumElementos)
5769 $opcionesClienteWS = array (
5770 'soap_version' => SOAP_1_1,
5771 'user_agent' =>
'WSSSoapClient',
5772 'exceptions' =>
true,
5773 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5774 'trace' => self::$MYSOAPOP_TRACE
5777 $this->__clienteOn(self::KEYCLIENTE_CATASTRO_BIENES,
true, $opcionesClienteWS);
5778 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CATASTRO_BIENES);
5787 $AtributosWSRequest =
new ArrayObject();
5788 $AtributosWSRequest->append(
new SoapVar($IdPeticion, XSD_STRING, null, null,
'IdPeticion', self::$NAMESPACE_CAT_SR));
5789 $AtributosWSRequest->append(
new SoapVar($NumElementos, XSD_INTEGER , null, null,
'NumElementos', self::$NAMESPACE_CAT_SR));
5790 $AtributosWSRequest->append(
new SoapVar($TimeStamp->format(DateTime::ATOM), XSD_STRING, null, null,
'TimeStamp', self::$NAMESPACE_CAT_SR));
5791 $AtributosWSRequest->append(
new SoapVar($CodigoCertificado, XSD_STRING, null, null,
'CodigoCertificado', self::$NAMESPACE_CAT_SR));
5794 $bodyWSRequest =
new ArrayObject();
5795 $bodyWSRequest->append(
new SoapVar($AtributosWSRequest, SOAP_ENC_OBJECT,null,null,
'Atributos', self::$NAMESPACE_CAT_SR));
5798 $miSoapRQ =
new SoapVar($bodyWSRequest, SOAP_ENC_OBJECT,null,null,
'SolicitudRespuesta', self::$NAMESPACE_CAT_SR);
5799 $respuesta = $clienteWS->solicitudRespuesta($miSoapRQ);
5802 $vRespuesta = array();
5803 if (is_object($respuesta))
5807 'respuesta' => $respuesta
5810 return($vRespuesta);
5812 catch (Exception $e)
5814 $this->tratarExcepcionEstandar($e, $clienteWS);
5819 public function catastroB($IdPeticion, $TimeStamp, $CodigoCertificado, $oSolicitud)
5824 $opcionesClienteWS = array (
5825 'soap_version' => SOAP_1_1,
5826 'user_agent' =>
'WSSSoapClient',
5827 'exceptions' =>
true,
5828 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5829 'trace' => self::$MYSOAPOP_TRACE
5832 $this->__clienteOn(self::KEYCLIENTE_CATASTRO,
true, $opcionesClienteWS);
5833 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CATASTRO);
5841 $bodyWSRequest = $oCatastro->doGeneral($IdPeticion, $TimeStamp, $CodigoCertificado, $oSolicitud);
5844 $miSoapRQ =
new SoapVar($bodyWSRequest, SOAP_ENC_OBJECT,null,null,
'Peticion', self::$NAMESPACE_CAT_PET);
5845 $respuesta = $clienteWS->peticionSincrona($miSoapRQ);
5848 $vRespuesta = array();
5849 if (is_object($respuesta))
5853 'respuesta' => $respuesta
5856 return($vRespuesta);
5858 catch (Exception $e)
5860 $this->tratarExcepcionEstandar($e, $clienteWS);
5864 public function catastroBienesPeticionB($IdPeticion, $TimeStamp, $CodigoCertificado, $vSolicitudes)
5869 $opcionesClienteWS = array (
5870 'soap_version' => SOAP_1_1,
5871 'user_agent' =>
'WSSSoapClient',
5872 'exceptions' =>
true,
5873 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5874 'trace' => self::$MYSOAPOP_TRACE
5877 $this->__clienteOn(self::KEYCLIENTE_CATASTRO_BIENES,
true, $opcionesClienteWS);
5878 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CATASTRO_BIENES);
5882 $bodyWSRequest = $oCatastro->catastroBienesPeticion($IdPeticion, $TimeStamp, $CodigoCertificado, $vSolicitudes);
5885 $miSoapRQ =
new SoapVar($bodyWSRequest, SOAP_ENC_OBJECT,null,null,
'Peticion', self::$NAMESPACE_CAT_PET);
5886 $respuesta = $clienteWS->peticionAsincrona($miSoapRQ);
5890 $vRespuesta = array();
5891 if (is_object($respuesta))
5895 'respuesta' => $respuesta
5898 return($vRespuesta);
5900 catch (Exception $e)
5902 $this->tratarExcepcionEstandar($e, $clienteWS);
5906 public function catastroBienesRespuestaB($IdPeticion, $TimeStamp, $CodigoCertificado, $NumElementos)
5911 $opcionesClienteWS = array (
5912 'soap_version' => SOAP_1_1,
5913 'user_agent' =>
'WSSSoapClient',
5914 'exceptions' =>
true,
5915 'cache_wsdl' => self::$MYSOAPOP_WSDL_CACHE,
5916 'trace' => self::$MYSOAPOP_TRACE
5919 $this->__clienteOn(self::KEYCLIENTE_CATASTRO_BIENES,
true, $opcionesClienteWS);
5920 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CATASTRO_BIENES);
5923 $bodyWSRequest = $oCatastro->catastroBienesRespuesta($IdPeticion, $TimeStamp, $CodigoCertificado, $NumElementos);
5926 $miSoapRQ =
new SoapVar($bodyWSRequest, SOAP_ENC_OBJECT,null,null,
'SolicitudRespuesta', self::$NAMESPACE_CAT_SR);
5927 $respuesta = $clienteWS->solicitudRespuesta($miSoapRQ);
5930 $vRespuesta = array();
5931 if (is_object($respuesta))
5935 'respuesta' => $respuesta
5938 return($vRespuesta);
5940 catch (Exception $e)
5942 $this->tratarExcepcionEstandar($e, $clienteWS);
eliminarDocumentoGDE($codApp, $refDoc)
establecerMetadatoCarpetasPersonalizadosGDE2($codApp, $path, $vColMetadatosPers)
eliminarCarpetaGDE2($codApp, $path)
obtenerExpedienteENIdeCarpetaGDE2($codApp, $path, $idCertificadoSafe=null, $idSesionSafe=null)
pf_adm_updateEnhancedJobs($username, $password, $enhancedJobList)
pf_adm_separateJobToUser($username, $password, $jobIdentifier, $userIdentifier)
pf_queryEnhancedJobs($username, $password, $queryJob, $querySeat)
obtenerDocumentoGDE2($codApp, $refDoc, $parcial='1')
eliminarDocumentoGDE2($codApp, $refDoc)
retornaTodasAutorizacionesDNIWS($usuarioDNI, $tipoBusqueda)
eliminarCarpetaGDE($codApp, $path)
autenticaUsuarioLDAPWS($user, $pass)
pf_downloadDocument($username, $password, $documentId)
castellanoValenciano($texto)
static numberBaseConvert($numstring, $frombase=10, $tobase=16)
generarIdentificadorENIGDE2($codApp)
const TIPOBUSQUEDA_USUARIO
pf_mod_deleteSigners($username, $password, $requestId, $signerList)
pf_mod_deleteRequest($username, $password, $requestId)
const KEYCLIENTE_AUTENTICA
getInformacionLDAP($user, $pass)
pf_adm_insertEnhancedUsers($username, $password, $enhancedUserList)
insertarDocumentoENIGDE2($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo=null, $vMetaENI=null, $vMetaPers=null, $vFirmas=null)
firmarCertificadoServer($idSession, $idCertificado, $docContentB64, $tipoDoc='TF06')
autenticaConFirmaWS($firmaB64, $codigoEntidad=null)
pf_adm_updateEnhancedUsers($username, $password, $enhancedUserList)
pf_mod_insertDocument($username, $password, $requestId, $document)
buscarDocCriterioPaginadoGDE2($codApp, $registrosPagina, $pagina, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
retornaAutorizacionWS($usuarioHDFI, $idAplicacion)
retornaTodasAutorizacionesWS($usuarioHDFI)
pf_adm_deleteJobs($username, $password, $jobIdentifierList)
crearCarpetaGDE2($codApp, $path, $tipo=null, $metadatosExpedienteEni=null, $coleccionMetadatosPersonalizados=null)
pf_mod_removeRequest($username, $password, $requestId, $removingMessage)
pf_queryRequest($username, $password, $requestId)
pf_mod_deleteDocument($username, $password, $documentId)
pf_mod_createRequest($username, $password, $request)
pf_queryImportanceLevels($username, $password, $query)
pf_mod_insertSigners($username, $password, $requestId, $signLine, $signerList, $signLineType)
__construct($v_wsdl, $v_datosCertif, $idAPP=null)
buscarDocCriterioGDE2($codApp, $filtroPath=null, $buscarInTree=null, $operacion=null, $coleccionCriterios=null)
pf_adm_deleteUsers($username, $password, $userIdentifierList)
pf_mod_sendRequest($username, $password, $requestId)
pf_queryStates($username, $password, $query)
pf_queryDocumentTypes($username, $password, $query)
loadTracertPAI($vTrazabilidadPAI)
pf_downloadSign($username, $password, $documentId)
insertarDocumentoGDE($codApp, $docContentB64, $nombreDoc, $pathDoc='', $vMetadatosENI=null, $vMetadatosPersonalizados=null)
obtenerDocumentoGDE($codApp, $refDoc, $parcial='1')
pf_queryJobs($username, $password, $query)
valencianoCastellano($texto)
empaquetarDocumentoENIGDE2($codApp, $contenido, $vMetadatosEni, $vFirmas)
tratarMTOMEstandar($response, $itemToReturn=null)
insertarDocumentoGDE2($codApp, $docContentB64, $nombreDoc, $pathDoc=null, $tipo=null, $vMetadatosENI=null, $vMetadatosPersonalizados=null, $vFirmas=null)
generarTokenGDE2($codApp, $vRefDoc)
pf_mod_updateRequest($username, $password, $request)
catastro($IdPeticion, $NumElementos, $TimeStamp, $CodigoCertificado, $NifEmisor, $NombreEmisor, $CodProcedimiento, $NombreProcedimiento, $NombreCompletoFuncionario, $NifFuncionario, $IdentificadorSolicitante, $NombreSolicitante, $UnidadTramitadora, $Finalidad, $Consentimiento, $IdExpediente, $TipoDocumentacion, $Documentacion, $NombreCompleto, $Nombre, $Apellido1, $Apellido2, $CodigoCertificado, $IdSolicitud, $vDataEspecifico)
pf_adm_assignJobToUser($username, $password, $jobIdentifier, $userIdentifier, $fstart, $fend)
pf_queryEnhancedUserJobAssociatedToUser($username, $password, $userIdentifier)
getInformacionHDFI($user, $pass)
obtenerDocumentoENIGDE2($codApp, $refDoc)
establecerMetadatosENIGDE2($codApp, $refDoc, $vMetadatosEni)
establecerMetadatosCarpetaExpedienteENIGDE2($codApp, $path, $vMetadatosExpedienteEni)
pf_querySeats($username, $password, $query)
establecerMetadatosPersonalizadosGDE2($codApp, $refDoc, $coleccionMetadatosPersonalizados)
setPassPhrase($passphrase)
pf_querySign($username, $password, $documentId)
pf_queryUsers($username, $password, $query)
catastroBienesPeticion($IdPeticion, $TimeStamp, $CodigoCertificado, $NifEmisor, $NombreEmisor, $CodProcedimiento, $NombreProcedimiento, $NombreCompletoFuncionario, $NifFuncionario, $IdentificadorSolicitante, $NombreSolicitante, $UnidadTramitadora, $Finalidad, $Consentimiento, $IdExpediente, $TipoDocumentacion, $Documentacion, $NombreCompleto, $Nombre, $Apellido1, $Apellido2, $CodigoCertificado, $IdSolicitud, $vDataEspecifico)
pf_queryEnhancedUserJobAssociatedToJob($username, $password, $jobIdentifier)
pf_queryEnhancedUsers($username, $password, $queryUser, $querySeat)
pf_adm_insertEnhancedJobs($username, $password, $enhancedJobList)
obtenerExpedienteENIGDE2($codApp, $refDoc, $vMetadatosExpedienteEni, $idCertificadoSafe=null, $idSesionSafe=null)
autenticaUsuarioWS($user, $pass)
asociarFirmasGDE2($codApp, $refDoc, $vFirmas)