Estimados conpañeros del foro
como programador me han encargo crear un modulo de timbrado para factura electronica, sin embargo aunque he leido tutoriales de webservice y me he informado, los ejemplos que he encontrado son bastante sencillos y ya aplicados al web service del timbrador la verdad es que se me dificulta entenderle.
les anexo, la unidad que se utiliza para el webservice
Código Delphi
[-]
unit TimbradorIntegradores;
interface
uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns;
const
IS_OPTN = $0001;
IS_UNBD = $0002;
IS_NLBL = $0004;
IS_UNQL = $0008;
IS_ATTR = $0010;
IS_TEXT = $0020;
type
get = class;
Exception = class;
getResponse = class;
TimbradorIntegradoresException = class;
get = class(TRemotable)
private
Fcad: WideString;
Ftk: WideString;
Fuser: WideString;
Fpass: WideString;
Fcuenta: WideString;
published
property cad: WideString Index (IS_OPTN or IS_NLBL) read Fcad write Fcad;
property tk: WideString Index (IS_OPTN or IS_NLBL) read Ftk write Ftk;
property user: WideString Index (IS_OPTN or IS_NLBL) read Fuser write Fuser;
property pass: WideString Index (IS_OPTN or IS_NLBL) read Fpass write Fpass;
property cuenta: WideString Index (IS_OPTN or IS_NLBL) read Fcuenta write Fcuenta;
end;
Exception = class(TRemotable)
private
FMessage_: WideString;
published
property Message_: WideString Index (IS_OPTN or IS_NLBL) read FMessage_ write FMessage_;
end;
getResponse = class(TRemotable)
private
Freturn: WideString;
published
property return: WideString Index (IS_OPTN or IS_NLBL) read Freturn write Freturn;
end;
TimbradorIntegradoresException = class(TRemotable)
private
FTimbradorIntegradoresException: Exception;
public
destructor Destroy; override;
published
property TimbradorIntegradoresException: Exception Index (IS_OPTN or IS_NLBL) read FTimbradorIntegradoresException write FTimbradorIntegradoresException;
end;
implementation
uses SysUtils;
destructor TimbradorIntegradoresException.Destroy;
begin
FreeAndNil(FTimbradorIntegradoresException);
inherited Destroy;
end;
initialization
RemClassRegistry.RegisterXSClass(get, 'http://integradores.cfdi.mx.konesh.com', 'get');
RemClassRegistry.RegisterXSClass(Exception, 'http://integradores.cfdi.mx.konesh.com', 'Exception');
RemClassRegistry.RegisterExternalPropName(TypeInfo(Exception), 'Message_', 'Message');
RemClassRegistry.RegisterXSClass(getResponse, 'http://integradores.cfdi.mx.konesh.com', 'getResponse');
RemClassRegistry.RegisterXSClass(TimbradorIntegradoresException, 'http://integradores.cfdi.mx.konesh.com', 'TimbradorIntegradoresException');
end.
Espero no violar ninguna norma, pero como la aplico?
porque he encontrado ejemplos com este
Código PHP:
try {
$client = new SoapClient("http://testing.solucionfactible.com/ws/services/Timbrado?wsdl");
$params = array('usuario' => $usuario, 'password' => $password, 'cfdiBase64'=>$b64, 'zip'=>False);
$response = $client->__soapCall('timbrarBase64', array('parameters' => $params));
} catch (SoapFault $fault) {
echo "SOAPFault: ".$fault->faultcode."-".$fault->faultstring."\n";}
deduzco que hay que armar una llamada a una funcion en este caso get, con valores. aqui es donde ya no le hallo.
Gracias