Hi,
When I consume a Web Service with a PB client, response comes in XML-format and is stored in a variable created by Web Service Proxy Wizard. I can then process the contents of that variable in code but is there any way I could save the contents to a XML-file.
BR, Hannu
It was not so simple. The responce is a string in XML-format, but because it is declared as complex type
type variables
hahka_GetUnreadInvoicesResultInvoice invoice[]
string version
end variables
I can't use it with FileWriteEx:
hahka_getunreadinvoicesresult laskut
laskut = px_Service.getunreadinvoices(1,password)
tdsto = FileOpen(tiedostox,TextMode!,Write!,LockWrite!,Append!)
// this causes error in compiler becaus laskut is not of type string : FileWriteEx(tdsto,laskut)
FileWriteEx(tdsto,string(laskut)) // this produces only empty string to the file
FileClose(tdsto)
BR, Hannu
The problem is with your FileOpen ( ). Instead of TEXTMode! - use StreamMode! instead.
HTH
Regards ... Chris
It did not help, compiler does not accept FileWriteEx(tdsto,laskut) because laskut is not string neither blob, it's type of hahka_getunreadinvoicesresult.
BR, Hannu