我正在尝试将编码的GET url中的参数传递给webService,但我只得到错误Target host不能为null,或者在参数中设置。方案=空
在线:
InputStream is = httpEntity.getContent();
代码:
DefaultHttpClient httpClient = new DefaultHttpClient();
HttpGet httpGet = new HttpGet(URLEncoder.encode(url));
HttpResponse httpResponse = httpClient.execute(httpGet);
HttpEntity httpEntity = httpResponse.getEntity();
is = httpEntity.getContent();
编码的网址为:
http://10.247.54.104/SIP.Servico.Comum/api/DataBase/ExecutarQuery?sql=SELECT+
A.COD_IDENT_UNMET+UM,+A.COD_LOCAL_UNMET+LOCAL,+
decode(A.COD_SITUA_UNMET,+'D','FATURADA',+'X',+'DESATIVADA',+'P',+'EM+PROCESSAMENTO',+'F',+'PEND.+FECHAMENTO',+'B',+'EM+PREPARACAO',+'R',+'RESERVADA',+'T',+'PENDENTE',+'Q',+'EM+RECEBIMENTO',+'I',+'DEVOLVIDA+LTQ',+'S',+'SUCATADA',+'+',+'PROGRAMAVEL',+A.COD_SITUA_UNMET)+SITUA,+B.COD_EQPMT_PRODC_DEPOSITO+DEPOSITO+
FROM+ACECPGER_SIL.UNIDADES_METALICAS@LK_QO40_QO30_DBA+A,+ACECPGER_SIL.HISTORICOS_UM@LK_QO40_QO30_DBA+B+WHERE+A.COD_IDENT_UNMET+=+B.COD_IDENT_UNMET+AND+A.SEQ_OPERA_UNMET+=+B.SEQ_OPERA_UNMET+AND+A.COD_SITUA_UNMET+IN+('QQ',+'A',+'B',+'C',+'E',+'F',+'G',+'H',+'I',+'J','L',+'M',+'N',+'P',+'Q',+'R',+'T',+'S')+AND+SUBSTR(A.COD_IDENT_UNMET,+7,+1)+<>+'T'+AND+A.COD_IDENT_UNMET+LIKE'FFF%'+'%'+ORDER+BY+A.COD_IDENT_UNMET
我做错了什么?