Examples of XmlRpcRequest


Examples of org.springmodules.remoting.xmlrpc.support.XmlRpcRequest

  /**
   * @see XmlRpcRequestParser#parseRequest(InputStream)
   */
  public XmlRpcRequest parseRequest(InputStream inputStream) {
    XmlRpcRequest request = new XmlRpcRequest();

    try {
      XMLStreamReader reader = loadXmlReader(inputStream);

      while (reader.hasNext()) {
        int event = reader.next();

        switch (event) {
          case XMLStreamConstants.START_ELEMENT:
            String localName = reader.getLocalName();

            if (XmlRpcElementNames.METHOD_NAME.equals(localName)) {
              String serviceAndMethodNames = reader.getElementText();
              request.setServiceAndMethodNames(serviceAndMethodNames);

            } else if (XmlRpcElementNames.PARAMS.equals(localName)) {
              XmlRpcElement[] parameters = parseParametersElement(reader);
              request.setParameters(parameters);
            }
        }
      }
      reader.close();
    } catch (XMLStreamException exception) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.