21 public function csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante)
24 $claveAccesoWSRequest->append(
new SoapVar($appID, XSD_STRING, null, null,
'aplicacionId'));
25 $claveAccesoWSRequest->append(
new SoapVar($nif, XSD_STRING, null, null,
'nif'));
26 $claveAccesoWSRequest->append(
new SoapVar($referenciaExterna, XSD_STRING, null, null,
'referenciaExterna'));
27 $claveAccesoWSRequest->append(
new SoapVar($firmante, XSD_STRING, null, null,
'firmante'));
29 return $claveAccesoWSRequest;
32 public function obtenerCodigo($appID, $nif, $referenciaExterna, $firmante,
33 $generarBarCode=null, $tipoBarCode=null, $width=null, $height=null)
39 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CSV);
41 $claveAccesoWSRequest = $this->csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante);
44 if (!empty($generarBarCode))
45 $opcGeneracionWSRequest->append(
new SoapVar($generarBarCode, XSD_STRING, null, null,
'generarBarCode'));
46 if (!empty($tipoBarCode))
47 $opcGeneracionWSRequest->append(
new SoapVar($tipoBarCode, XSD_STRING, null, null,
'tipoBarCode'));
49 $opcGeneracionWSRequest->append(
new SoapVar($width, XSD_STRING, null, null,
'width'));
51 $opcGeneracionWSRequest->append(
new SoapVar($height, XSD_STRING, null, null,
'height'));
55 $claveAcceso2WSRequest->append(
new SoapVar($claveAccesoWSRequest, SOAP_ENC_OBJECT, null, null,
'claveAcceso'));
56 $claveAcceso2WSRequest->append(
new SoapVar($opcGeneracionWSRequest, SOAP_ENC_OBJECT, null, null,
'opcionesGeneracion'));
60 $peticionWSRequest->append(
new SoapVar($claveAcceso2WSRequest, SOAP_ENC_OBJECT,null,null,
'peticion'));
61 $miSoapRQ =
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'obtenerCSVRequest', self::$NAMESPACE_CSVGVA);
63 $respuesta = $clienteWS->obtenerCSV($miSoapRQ);
68 $vRespuesta = array();
69 if (is_object($respuesta))
73 'csv' => $respuesta->respuesta->csv,
74 'url' => $respuesta->respuesta->url,
76 if (isset($respuesta->respuesta->imagenBarCode))
77 $vRespuesta[
'imagenBarCode'] = $respuesta->respuesta->imagenBarCode;
83 $this->tratarExcepcionEstandar($e, $clienteWS);
87 public function asociarCSV($csv, $appID, $nif, $referenciaExterna, $firmante,
88 $idRepositorio, $refDoc, $hash, $fechaCaducidad = null, $vParametros = null)
93 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CSV);
96 $claveAccesoWSRequest = $this->csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante);
99 $infDocWSRequest->append(
new SoapVar($idRepositorio, XSD_STRING, null, null,
'idRepositorio'));
100 $infDocWSRequest->append(
new SoapVar($refDoc, XSD_STRING, null, null,
'referenciaDocumento'));
101 $infDocWSRequest->append(
new SoapVar($hash, XSD_STRING, null, null,
'hash'));
102 if (!empty($fechaCaducidad))
103 $infDocWSRequest->append(
new SoapVar($fechaCaducidad->format(DateTime::ATOM), XSD_STRING, null, null,
'fechaCaducidad'));
104 if (is_array($vParametros)) {
108 foreach ($vParametros as $itemParametro) {
110 $parametro->append(
new SoapVar($itemParametro[
'etiqueta'], XSD_STRING, null, null,
'etiqueta'));
111 $parametro->append(
new SoapVar($itemParametro[
'ayuda'], XSD_STRING, null, null,
'ayuda'));
112 $parametro->append(
new SoapVar($itemParametro[
'valor'], XSD_STRING, null, null,
'valor'));
114 $parametrosVerificacion->append(
new SoapVar($parametro, SOAP_ENC_OBJECT, null, null,
'parametro'));
117 $infDocWSRequest->append(
new SoapVar($parametrosVerificacion, SOAP_ENC_OBJECT, null, null,
'parametrosVerificacion'));
122 $claveAcceso2WSRequest->append(
new SoapVar($csv, XSD_STRING, null, null,
'csv'));
123 $claveAcceso2WSRequest->append(
new SoapVar($claveAccesoWSRequest, SOAP_ENC_OBJECT, null, null,
'claveAcceso'));
124 $claveAcceso2WSRequest->append(
new SoapVar($infDocWSRequest, SOAP_ENC_OBJECT, null, null,
'informacionDocumento'));
130 $peticionWSRequest->append(
new SoapVar($claveAcceso2WSRequest, SOAP_ENC_OBJECT,null,null,
'peticion'));
131 $miSoapRQ =
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'asociarCSVRequest', self::$NAMESPACE_CSVGVA);
132 $respuesta = $clienteWS->asociarCSV($miSoapRQ);
137 $vRespuesta = array();
138 if (is_object($respuesta))
142 'respuesta' => $respuesta->respuesta->respuesta
149 $this->tratarExcepcionEstandar($e, $clienteWS);
153 public function invalidarCSV($csv, $appID, $nif, $referenciaExterna, $firmante)
158 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CSV);
161 $claveAccesoWSRequest = $this->csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante);
166 $claveAcceso2WSRequest->append(
new SoapVar($csv, XSD_STRING, null, null,
'csv'));
167 $claveAcceso2WSRequest->append(
new SoapVar($claveAccesoWSRequest, SOAP_ENC_OBJECT, null, null,
'claveAcceso'));
173 $peticionWSRequest->append(
new SoapVar($claveAcceso2WSRequest, SOAP_ENC_OBJECT,null,null,
'peticion'));
174 $miSoapRQ =
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'invalidarCSVRequest', self::$NAMESPACE_CSVGVA);
175 $respuesta = $clienteWS->invalidarCSV($miSoapRQ);
179 $vRespuesta = array();
180 if (is_object($respuesta))
184 'respuesta' => $respuesta->respuesta->respuesta
191 $this->tratarExcepcionEstandar($e, $clienteWS);
195 public function modificarFechaCaducidadCSV($csv, $appID, $nif, $referenciaExterna, $firmante, $fechaCaducidad)
200 $clienteWS = $this->
__getClient(self::KEYCLIENTE_CSV);
203 $claveAccesoWSRequest = $this->csv_encodeClaveAcceso($appID, $nif, $referenciaExterna, $firmante);
208 $claveAcceso2WSRequest->append(
new SoapVar($csv, XSD_STRING, null, null,
'csv'));
209 $claveAcceso2WSRequest->append(
new SoapVar($claveAccesoWSRequest, SOAP_ENC_OBJECT, null, null,
'claveAcceso'));
210 $claveAcceso2WSRequest->append(
new SoapVar($fechaCaducidad->format(DateTime::ATOM), XSD_STRING, null, null,
'fechaCaducidad'));
215 $peticionWSRequest->append(
new SoapVar($claveAcceso2WSRequest, SOAP_ENC_OBJECT,null,null,
'peticion'));
216 $miSoapRQ =
new SoapVar($peticionWSRequest, SOAP_ENC_OBJECT,null,null,
'modificarFechaCSVRequest', self::$NAMESPACE_CSVGVA);
217 $respuesta = $clienteWS->modificarFechaCSV($miSoapRQ);
222 $vRespuesta = array();
223 if (is_object($respuesta))
227 'respuesta' => $respuesta->respuesta->respuesta
234 $this->tratarExcepcionEstandar($e, $clienteWS);
__clienteOn($tipo, $trazabilidadPai=true, $opcionesClienteWS=null)