Advertisement
Guest User

Untitled

a guest
Oct 6th, 2016
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.47 KB | None | 0 0
  1. // <obterClientePorNIF_BI_Codigo>
  2. // <OutgoingHeaders attr0="MsgHeaderArray" isNull="false">
  3. // <MsgHeaderArray0>
  4. // <Name>SecurityToken</Name>
  5. // <Namespace>ns</Namespace>
  6. // <ItemType>SecurityToken</ItemType>
  7. // <Value>L9+zby7w1V5OZTVGUPLZ1>L9+zby7w1V5OZTVGUPLZ1x8rJYzCEHAnxovPx8rJYzCEHAnxovPUuyadZFdbv21elZ1qsvyp3kzbVR2s155E/Fea+8tXySxU7XfCMlut2mQ/YxvqzeQN>L9+zby7w1V5OZTVGUPLZ1x8rJYzCEHAnxovPIAc5JF99688MPfwqtehTpkDFKUhKIkShjIH9Zcv0xAHRoZ4sfc7HX</Value>
  8. // <Direction>Outgoing</Direction>
  9. // </MsgHeaderArray0>
  10. // </OutgoingHeaders>
  11. // <MethodParameters>
  12. // <TemMais100Registos>False</TemMais100Registos>
  13. // <MensagemErro isNull="false" />
  14. // <TemErro>False</TemErro>
  15. // <CompanhiaConexao>1235</CompanhiaConexao>
  16. // <NIF>2534525</NIF>
  17. // <BI isNull="false" />
  18. // <NomeCliente isNull="false" />
  19. // <Cliente isNull="false" />
  20. // </MethodParameters>
  21. //</obterClientePorNIF_BI_Codigo>
  22.  
  23.  
  24.  
  25. function TSOAPCredentials.ObjectToSOAP(RootNode, ParentNode: IXMLNode; const ObjConverter: IObjConverter; const NodeName,
  26. NodeNamespace, ChildNamespace: InvString; ObjConvOpts: TObjectConvertOptions; out RefID: InvString): IXMLNode;
  27. begin
  28.  
  29. Result := ParentNode.AddChild('Name');
  30. Result.Text:= Name;
  31. Result := ParentNode.AddChild('Namespace');
  32. Result.Text:= Namespace;
  33. Result := ParentNode.AddChild('ItemType');
  34. Result.Text := ItemType;
  35. Result := ParentNode.AddChild('value');
  36. Result.Text := value;
  37. Result := ParentNode.AddChild('Direction');
  38. Result.Text := Direction;
  39.  
  40.  
  41. end;
  42.  
  43.  
  44. procedure TForm3.Button3Click(Sender: TObject);
  45.  
  46. var
  47. ws: IWSClientes;
  48. req: obterClientePorNIF_BI_Codigo;
  49.  
  50. autent: TSOAPCredentials;
  51. reultado: TStringList;
  52. begin
  53. req:= obterClientePorNIF_BI_Codigo.Create;
  54. //resp:= obterClientePorNIF_BI_CodigoResponse.Create;
  55. reultado :=TStringList.Create;
  56. HTTPRIO1.Create(nil);
  57. HTTPRIO1.HTTPWebNode.Username:='user';
  58. HTTPRIO1.HTTPWebNode.Password:='pass';
  59. WS := GetIWSClientes(false, '', HTTPRIO1);
  60. autent := TSOAPCredentials.Create;
  61. autent.Name := 'SecurityToken';
  62. autent.Namespace := 'ns';
  63. autent.ItemType:='System.String';
  64. autent.value:= token.Text;
  65. autent.Direction:='Outgoing';
  66. HTTPRIO1.SOAPHeaders.Send(autent);
  67. req.CompanhiaConexao:=;
  68. req.NIF:='';
  69. req.BI:='';
  70. req.NomeCliente:='';
  71. req.Cliente:='';
  72.  
  73. req := ws.obterClientePorNIF_BI_Codigo(req);
  74.  
  75. //ultado :=(resp);
  76. // Showmessage('Numero');
  77. //Application.MessageBox('Operação Realizada com Sucesso!','Aviso',mb_Ok+mb_IconExclamation);
  78. end;`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement