var ws: NfeStatusServicoSoap;
begin ws := GetNfeStatusServicoSoap(os parâmetros são opcionais); ws.Metodo1(); // assim por diante end; Zote http://gofrom.us De: delphi-br@yahoogrupos.com.br [mailto:[EMAIL PROTECTED] Em nome de Gabriel Herdt Enviada em: terça-feira, 4 de novembro de 2008 15:18 Para: delphi-br@yahoogrupos.com.br Assunto: [delphi-br] COMO CHAMAR ESSE WSDL .PAS ??? pessoal como faço para passar os parametros transmitir ele para a receita? utilizo delphi 2005 unit NfeStaServHomoRS; interface uses InvokeRegistry, SOAPHTTPClient, Types, XSBuiltIns; type // ************************************************************************ // // The following types, referred to in the WSDL document are not being represented // in this file. They are either [EMAIL PROTECTED] of other types represented or were referred // to but never[!] declared in the document. The types from the latter category // typically map to predefined/known XML or Borland types; however, they could also // indicate incorrect WSDL documents that failed to declare or import a schema type. // ************************************************************************ // // !:string - "http://www.w3.org/2001/XMLSchema <http://www.w3.org/2001/XMLSchema> " nfeStatusServicoNF = class; { "http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico <http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico> " } // ************************************************************************ // // Namespace : http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico <http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico> // ************************************************************************ // nfeStatusServicoNF = class(TRemotable) private FnfeCabecMsg: WideString; FnfeDadosMsg: WideString; published property nfeCabecMsg: WideString read FnfeCabecMsg write FnfeCabecMsg; property nfeDadosMsg: WideString read FnfeDadosMsg write FnfeDadosMsg; end; // ************************************************************************ // // Namespace : http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico <http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico> // soapAction: nfeStatusServicoNF // transport : http://schemas.xmlsoap.org/soap/http <http://schemas.xmlsoap.org/soap/http> // style : document // binding : NfeStatusServicoSoap // service : NfeStatusServico // port : NfeStatusServicoSoap // URL : https://homologacao.nfe.sefaz.rs.gov.br/ws/nfestatusservico/NfeStatusSer\ <https://homologacao.nfe.sefaz.rs.gov.br/ws/nfestatusservico/NfeStatusServic o.asmx> vico.asmx <https://homologacao.nfe.sefaz.rs.gov.br/ws/nfestatusservico/NfeStatusSe\ <https://homologacao.nfe.sefaz.rs.gov.br/ws/nfestatusservico/NfeStatusServic o.asmx> rvico.asmx> // ************************************************************************ // NfeStatusServicoSoap = interface(IInvokable) ['{5E393C9B-1708-45AE-674E-967E74889DFF}'] procedure nfeStatusServicoNF(var parameters: nfeStatusServicoNF); stdcall; end; function GetNfeStatusServicoSoap(UseWSDL: Boolean=System.False; Addr: string=''; HTTPRIO: THTTPRIO = nil): NfeStatusServicoSoap; implementation function GetNfeStatusServicoSoap(UseWSDL: Boolean; Addr: string; HTTPRIO: THTTPRIO): NfeStatusServicoSoap; const defWSDL = 'C:\Sistemas\Gerencial\XML\homologacao\RS\NfeStaServHomoRS.xml'; defURL = 'https://homologacao.nfe.sefaz.rs.gov.br/ws/nfestatusservico/NfeStatusSe\ <https://homologacao.nfe.sefaz.rs.gov.br/ws/nfestatusservico/NfeStatusServic o.asmx> rvico.asmx'; defSvc = 'NfeStatusServico'; defPrt = 'NfeStatusServicoSoap'; var RIO: THTTPRIO; begin Result := nil; if (Addr = '') then begin if UseWSDL then Addr := defWSDL else Addr := defURL; end; if HTTPRIO = nil then RIO := THTTPRIO.Create(nil) else RIO := HTTPRIO; try Result := (RIO as NfeStatusServicoSoap); if UseWSDL then begin RIO.WSDLLocation := Addr; RIO.Service := defSvc; RIO.Port := defPrt; end else RIO.URL := Addr; finally if (Result = nil) and (HTTPRIO = nil) then RIO.Free; end; end; initialization InvRegistry.RegisterInterface(TypeInfo(NfeStatusServicoSoap), 'http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico', 'UTF-8'); InvRegistry.RegisterDefaultSOAPAction(TypeInfo(NfeStatusServicoSoap), 'nfeStatusServicoNF'); InvRegistry.RegisterInvokeOptions(TypeInfo(NfeStatusServicoSoap), ioDocument); RemClassRegistry.RegisterXSClass(nfeStatusServicoNF, 'http://www.portalfiscal.inf.br/nfe/wsdl/NfeStatusServico', 'nfeStatusServicoNF'); end. [As partes desta mensagem que não continham texto foram removidas] [As partes desta mensagem que não continham texto foram removidas]