public SOAPResponse postMessage(String host, int port) { HTTPResponse httpRes = post(host, port); SOAPResponse soapRes = new SOAPResponse(httpRes); byte content[] = soapRes.getContent(); if (content.length <= 0) return soapRes; try { ByteArrayInputStream byteIn = new ByteArrayInputStream(content); Parser xmlParser = SOAP.getXMLParser(); Node rootNode = xmlParser.parse(byteIn); soapRes.setEnvelopeNode(rootNode); } catch (Exception e) { Debug.warning(e); } return soapRes; }
public Node getFaultNode() { Node bodyNode = getBodyNode(); if (bodyNode == null) return null; return bodyNode.getNodeEndsWith(SOAP.FAULT); }
public SOAPResponse(SOAPResponse soapRes) { super(soapRes); setEnvelopeNode(soapRes.getEnvelopeNode()); setContentType(XML.DEFAULT_CONTENT_TYPE); }
private void soapBadActionRecieved(HTTPRequest soapReq) { SOAPResponse soapRes = new SOAPResponse(); soapRes.setStatusCode(HTTPStatus.BAD_REQUEST); soapReq.post(soapRes); }
public void print() { Debug.message(toString()); if (hasContent() == true) return; Node rootElem = getRootNode(); if (rootElem == null) return; Debug.message(rootElem.toString()); } }
public Node getFaultCodeNode() { Node faultNode = getFaultNode(); if (faultNode == null) return null; return faultNode.getNodeEndsWith(SOAP.FAULT_CODE); }
public String getFaultActor() { Node node = getFaultActorNode(); if (node == null) return ""; return node.getValue(); }
public Node getBodyNode() { Node envNode = getEnvelopeNode(); if (envNode == null) return null; return envNode.getNodeEndsWith(SOAP.BODY); }
public String getFaultString() { Node node = getFaultStringNode(); if (node == null) return ""; return node.getValue(); }
public String getFaultCode() { Node node = getFaultCodeNode(); if (node == null) return ""; return node.getValue(); }
public Node getEnvelopeNode() { return getRootNode(); }
public void print() { Debug.message(toString()); if (hasContent() == true) return; Node rootElem = getRootNode(); if (rootElem == null) return; Debug.message(rootElem.toString()); } }
public Node getFaultStringNode() { Node faultNode = getFaultNode(); if (faultNode == null) return null; return faultNode.getNodeEndsWith(SOAP.FAULT_STRING); }
private void soapBadActionRecieved(HTTPRequest soapReq) { SOAPResponse soapRes = new SOAPResponse(); soapRes.setStatusCode(HTTPStatus.BAD_REQUEST); soapReq.post(soapRes); }
public String getFaultActor() { Node node = getFaultActorNode(); if (node == null) return ""; return node.getValue(); }
public Node getBodyNode() { Node envNode = getEnvelopeNode(); if (envNode == null) return null; return envNode.getNodeEndsWith(SOAP.BODY); }
public String getFaultString() { Node node = getFaultStringNode(); if (node == null) return ""; return node.getValue(); }
public String getFaultCode() { Node node = getFaultCodeNode(); if (node == null) return ""; return node.getValue(); }
public Node getEnvelopeNode() { return getRootNode(); }
public void print() { Debug.message(toString()); if (hasContent() == true) return; Node rootElem = getRootNode(); if (rootElem == null) return; Debug.message(rootElem.toString()); } }