I'm trying to make a https request from the Public Finance Webservice in São Paulo, but I do not know where I'm going wrong.
This is the address:
According to the guidance of manual , it is not necessary to authenticate.
Basically, I want the expenditure committed for a given year. My code is this one:
library(XML)
library(httr)
a<-GET('https://webservices.fazenda.sp.gov.br/WSTransparencia/TransparenciaServico.asmx?',
query = list(op="ConsultarDespesas",
ano="2015",
flagCredor=0,
flagEmpenhado=1,
flagLiquidado=0,
flagPago=0))
b<-xmlParse(a)
I get the following error:
Erro: 1: Opening and ending tag mismatch: p line 52 and br
2: Opening and ending tag mismatch: span line 49 and br
3: EntityRef: expecting ';'
4: Opening and ending tag mismatch: br line 43 and p
5: AttValue: " or ' expected
6: attributes construct error
7: Couldn't find end of Start Tag font line 85
8: Opening and ending tag mismatch: p line 85 and font
9: Opening and ending tag mismatch: span line 83 and p
10: AttValue: " or ' expected
11: attributes construct error
12: Couldn't find end of Start Tag font line 90
13: Opening and ending tag mismatch: pre line 87 and font
14: AttValue: " or ' expected
15: attributes construct error
16: Couldn't find end of Start Tag font line 97
17: Opening and ending tag mismatch: div line 41 and font
18: AttValue: " or ' expected
19: attributes construct error
20: Couldn't find end of Start Tag font line 98
21: Opening and ending tag mismatch: body line 39 and font
22: AttValue: " or ' expected
23: attributes construct error
24: Couldn't find end of
Can anyone help me with this?