WSCOMUN  2.1.0
Web Services Comunes para PHP/GVHidra
WSClientFirma.php
1 <?php
14 
16 {
17 
30  public function firmarCertificadoServer ($idSession, $idCertificado, $docContentB64, $tipoDoc='TF06')
31  {
32  try
33  {
34  $this->__clienteOn(self::KEYCLIENTE_FIRMA);
35  $clienteWS = $this->v_clienteWS[self::KEYCLIENTE_FIRMA];
36 
37 
38  $firmarCertificadoWSRequest = new ArrayObject();
39  $firmarCertificadoWSRequest->append(new SoapVar($idSession, XSD_STRING, null, null,'idSession', self::$NAMESPACE_GVA));
40  $firmarCertificadoWSRequest->append(new SoapVar($idCertificado, XSD_STRING, null, null,'idCertificado', self::$NAMESPACE_GVA));
41  $firmarCertificadoWSRequest->append(new SoapVar($docContentB64, XSD_STRING, null, null,'documento', self::$NAMESPACE_GVA));
42  $firmarCertificadoWSRequest->append(new SoapVar('TF06', XSD_STRING, null, null, 'firmaFormato', self::$NAMESPACE_GVA));
43  $firmarCertificadoWSRequest->append(new SoapVar('pdf', XSD_STRING, null, null, 'formatoSubtipo', self::$NAMESPACE_GVA));//pades-ltv o pdf
44  $miSoapRQ = new SoapVar($firmarCertificadoWSRequest, SOAP_ENC_OBJECT,null,null,'firmarCertificadoWSRequest', self::$NAMESPACE_GVA);
45  $docFirmado = $clienteWS->firmarConCertificado($miSoapRQ);
46 
47  if (is_object($docFirmado))
48  {
49  return ($docFirmado->response);
50  }
51  else
52  {
53  return($docFirmado);
54  }
55  }
56  catch (Exception $e)
57  {
58  if ($this->getDebugMode())
59  {
60  $this->addDebugInfo(__CLASS__.':'.__METHOD__.'['.__FILE__.'-'.__LINE__.']'."\n");
61  if (is_object($clienteWS))
62  {
63  $this->addDebugInfo("RqH:\n ".$clienteWS->__getLastRequestHeaders());
64  $this->addDebugInfo("Rq:\n ".$clienteWS->__getLastRequest());
65  $this->addDebugInfo("RsH:\n ".$clienteWS->__getLastResponse());
66  $this->addDebugInfo("Rs:\n ".$clienteWS->__getLastResponseHeaders());
67  }
68  throw $e;
69  }
70  else
71  {
72  throw $e;
73  }
74  }
75  }//firmarCertificadoServer
76 
77 }
78 
79 
80 
81 ?>
firmarCertificadoServer($idSession, $idCertificado, $docContentB64, $tipoDoc='TF06')
__clienteOn($tipo, $trazabilidadPai=true, $opcionesClienteWS=null)