0
String response = "<?xml version='1.0'?><soap:Envelope xmlns:soap='http://www.w3.org/2003/05/soap-envelope'><soap:Body><exch:Response xmlns:exch='http://applicant.ffe.org/exchange/1.0'>...</exch:Response></soap:Body></soap:Envelope>";
DocumentBuilderFactory dbf = null;
DocumentBuilder db = null;
org.w3c.dom.Document document = null;
try {
dbf = DocumentBuilderFactory.newInstance();
db = dbf.newDocumentBuilder();
InputSource is = new InputSource(new ByteArrayInputStream(response.getBytes("UTF-8")));
document = db.parse(is);
} catch(ParserConfigurationException e){}
catch(SAXException e){}
문서가 null로 반환됩니다. InputSource에 전달하는 여러 가지 방법을 시도했지만 문서는 여전히 null을 반환합니다. 왜 이런 일이 일어날 지 모릅니다.SOAP 응답을 파싱하면 null이 반환됩니다.
문서에서 null이되는 위치를 지정할 수 있습니까? @yogsma – gks