use of org.cybergarage.xml.Node in project i2p.i2p by i2p.
the class Service method loadSCPD.
/**
* @since 1.8.0
*/
public boolean loadSCPD(InputStream input) throws ParserException {
Parser parser = UPnP.getXMLParser();
Node scpdNode = parser.parse(input);
if (scpdNode == null)
return false;
ServiceData data = getServiceData();
data.setSCPDNode(scpdNode);
return true;
}
use of org.cybergarage.xml.Node in project i2p.i2p by i2p.
the class StateVariable method getStateVariableData.
// //////////////////////////////////////////////
// UserData
// //////////////////////////////////////////////
public StateVariableData getStateVariableData() {
Node node = getStateVariableNode();
StateVariableData userData = (StateVariableData) node.getUserData();
if (userData == null) {
userData = new StateVariableData();
node.setUserData(userData);
userData.setNode(node);
}
return userData;
}
use of org.cybergarage.xml.Node in project i2p.i2p by i2p.
the class SOAP method createEnvelopeBodyNode.
// //////////////////////////////////////////////
// createEnvelopeBodyNode
// //////////////////////////////////////////////
public static final Node createEnvelopeBodyNode() {
// <Envelope>
Node envNode = new Node(SOAP.XMLNS + SOAP.DELIM + SOAP.ENVELOPE);
envNode.setAttribute("xmlns" + SOAP.DELIM + SOAP.XMLNS, SOAP.XMLNS_URL);
envNode.setAttribute(SOAP.XMLNS + SOAP.DELIM + "encodingStyle", SOAP.ENCSTYLE_URL);
// <Body>
Node bodyNode = new Node(SOAP.XMLNS + SOAP.DELIM + SOAP.BODY);
envNode.addNode(bodyNode);
return envNode;
}
use of org.cybergarage.xml.Node in project i2p.i2p by i2p.
the class SOAPRequest method postMessage.
// //////////////////////////////////////////////
// post
// //////////////////////////////////////////////
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;
}
use of org.cybergarage.xml.Node in project i2p.i2p by i2p.
the class SOAPResponse method getMethodResponseNode.
public Node getMethodResponseNode(String name) {
Node bodyNode = getBodyNode();
if (bodyNode == null)
return null;
String methodResName = name + SOAP.RESPONSE;
return bodyNode.getNodeEndsWith(methodResName);
}
Aggregations