Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File arq = new File("C:\Users\EX-PHP\Desktop\ArquivosNfse\xml.xml");
- OkHttpClient client= new OkHttpClient();
- MediaType type = MediaType.parse("application/soap+xml;charset=utf-8");
- RequestBody body = RequestBody.create(type,arq);
- Request request = new Request.Builder()
- .url("http://isscuritiba.curitiba.pr.gov.br/Iss.NfseWebService/Nfsews.asmx")
- .post(body)
- .build();
- Response response = client.newCall(request).execute();
- String res = response.body().string();
- System.out.println(res);
- FileOutputStream out = new FileOutputStream("C:\Users\EX-PHP\Desktop\result.xml");
- out.write(res.getBytes());
- out.close();
Add Comment
Please, Sign In to add comment