fixes bug#22868
dev: Celio qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Model/trunk/modelWeb@108370 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
fe476918f6
commit
e0d92c6f19
|
@ -1,6 +1,5 @@
|
||||||
package com.rjconsultores.ventaboletos.rest;
|
package com.rjconsultores.ventaboletos.rest;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import org.apache.commons.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
import org.apache.http.HttpEntity;
|
import org.apache.http.HttpEntity;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.http.HttpResponse;
|
||||||
|
@ -12,7 +11,6 @@ import org.apache.http.entity.StringEntity;
|
||||||
import org.apache.http.impl.client.DefaultHttpClient;
|
import org.apache.http.impl.client.DefaultHttpClient;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.codehaus.jettison.json.JSONException;
|
|
||||||
import org.codehaus.jettison.json.JSONObject;
|
import org.codehaus.jettison.json.JSONObject;
|
||||||
|
|
||||||
import com.rjconsultores.ventaboletos.enums.TipoEnvioRest;
|
import com.rjconsultores.ventaboletos.enums.TipoEnvioRest;
|
||||||
|
@ -39,7 +37,7 @@ public class IntegracaoSapRest {
|
||||||
|
|
||||||
if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK
|
if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK
|
||||||
&& response.getStatusLine().getStatusCode() != HttpStatus.SC_CREATED) {
|
&& response.getStatusLine().getStatusCode() != HttpStatus.SC_CREATED) {
|
||||||
throw new IllegalStateException("Ocorreu um erro na requisição." + response.getStatusLine() !=null ? response.getStatusLine().getReasonPhrase() : "");
|
throw new Exception("Ocorreu um erro na requisição." + response.getStatusLine() !=null ? response.getStatusLine().getReasonPhrase() : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
return getRetornoJSON(response);
|
return getRetornoJSON(response);
|
||||||
|
|
Loading…
Reference in New Issue