protected SoapResponse(javaxt.http.Response response, String resultsNode) throws SoapException {

        
        int status = response.getStatus();
        if (status==200 || status==202 || status==203){
            body = response.getText("UTF-8");
            if (body!=null){

                url = response.getURL();
                headers = response.getHeaders();


                //Extract Response
                Document xml = DOM.createDocument(body);
                if (xml!=null){
                    try{
                        
                        NodeList Response = xml.getElementsByTagName(resultsNode);
                        if (Response!=null){

                          //Special Case: Probably Missing Namespace in Soap.resultsNode
                            if (Response.getLength()==0) {
                                resultsNode = getResultsNode(body, resultsNode);
                                Response = xml.getElementsByTagName(resultsNode);
                            }

                            message = DOM.getNodeValue(Response.item(0));
                        }
                        else{
                            throw new SoapException(
                                    "Failed to parse SOAP Response. " +
                                    "Could not find the " + resultsNode + " node, " +
                                    "possibly due to a service exception.", body);
                        }
                    }
                    catch(Exception e){
                        throw new SoapException("Failed to parse SOAP Response. " + e.getLocalizedMessage(), body);
                    }
                }
                else{
                    throw new SoapException("Invalid SOAP Response. Response does not appear to be xml.", body);
                }
            }
            else{
                throw new SoapException("Invalid SOAP Response.", body);
            }
        }
        else{
            throw new SoapException(response.getMessage() + " (" + status + ")", response.getText());
        }
    }