Hello guys, i'm trying to consume a service that needs some parameters(3 strings and a XML file), but i'm failing to pass the parameters by http request, what i know is that ws is not a soap(there is not a wsdl) and is not a rest ws, a normal http ws i guess?
I was successful with postman doing this way:
with vdf i'm at this point now:
Code:
Object oWebButtonNFSe is a cWebButton
Set piColumnSpan to 0
Set psCaption to "NFS-E"
Object oHttpNFSe is a cHttpTransfer
Set psRemoteHost to 'demonstracao.nfs-e.net'
Set pbShowErrorDialog to True
Property String psAllData
Procedure OnDataReceived String sContentType String sData
String sAll
Get psAllData to sAll
Set psAllData to (sAll + sData)
End_Procedure
End_Object
Procedure OnClick
Handle hoHttp hoXml hoSentXml hoRcvdXml
String sSentXml sRcvdXml
Boolean bOk
Integer iCode
Get AddHeader of oHttpNFSe "Content-type" "multipart/form-data" to bOk
Get HttpPostRequest of oHttpNFSe "datacenter/include/nfw/importa_nfw/nfw_import_upload.php?eletron=1" "C:\GroupErp_trunk\teste.xml" True to sRcvdXml
Get ResponseStatusCode of oHttpNFSe to iCode
Get psAllData of oHttpNFSe to sRcvdXml
End_Procedure
End_Object
I connect and I get a return with a custom error because i'm failing to pass the right parameters (3 strings and a xml), how can i do my post request with parameters like i do in postman?
thanks.