public SOAPEnvelope build(SOAPMessage soapMessage, InputStream ins, boolean ignoreParseError) throws IOException, SOAPException
{
Element domEnv = null;
try
{
InputSource inputSource = new InputSource(ins);
inputSource.setEncoding(getEncoding(soapMessage));
domEnv = DOMUtils.parse(inputSource);
}
catch (IOException ex)
{
if (ignoreParseError)
{
return null;
}
log.error(BundleUtils.getMessage(bundle, "EXCEPTION_WHILE_BUILDING_ENVELOPE"), ex);
QName faultCode = Constants.SOAP11_FAULT_CODE_CLIENT;
throw new CommonSOAPFaultException(faultCode, ex.getMessage());
}
return build(soapMessage, domEnv);
}