Examples of XmlRpcInteger


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

   * signed integer parameters.
   */
  public final void testWriteResponseWithIntegerParameters() {
    Integer value = new Integer(54);

    XmlRpcInteger xmlRpcInteger = new XmlRpcInteger(value);
    XmlRpcElement[] parameters = { xmlRpcInteger };

    XmlRpcResponse response = new XmlRpcResponse(parameters);

    StringBuffer builder = new StringBuffer(256);
View Full Code Here

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

   * <code>{@link XmlRpcResponseWriter#writeResponse(XmlRpcResponse)}</code>
   * creates the XML-RPC response correctly if the response contains struct
   * parameters.
   */
  public final void testWriteResponseWithStructParameters() {
    XmlRpcMember integerMember = new XmlRpcMember("id", new XmlRpcInteger(
        new Integer(56)));
    XmlRpcMember stringMember = new XmlRpcMember("fullName", new XmlRpcString(
        "Luke Skywalker"));

    XmlRpcStruct xmlRpcStruct = new XmlRpcStruct();
View Full Code Here

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

   * Verifies that the method
   * <code>{@link XmlRpcRequestParser#parseRequest(InputStream)}</code> parses
   * correctly a XML-RPC request containing four-byte signed integer parameters.
   */
  public final void testParseRequestWithIntegerParameters() {
    XmlRpcInteger[] parameters = { new XmlRpcInteger(new Integer(54)),
        new XmlRpcInteger(new Integer(438)) };

    XmlRpcRequest expected = new XmlRpcRequest(this.serviceName,
        this.methodName, parameters);

    StringBuffer builder = new StringBuffer();
    builder.append("<?xml version=\"1.0\"?>");
    builder.append("<methodCall><methodName>");
    builder.append(this.serviceAndMethodNames);
    builder.append("</methodName><params>");

    int parameterCount = parameters.length;
    for (int i = 0; i < parameterCount; i++) {
      XmlRpcInteger xmlRpcInteger = parameters[i];
      Integer value = (Integer) xmlRpcInteger.getValue();

      // even parameters will have "i4" as name, odd parameters will have "int"
      // as name.
      String elementName = (i % 2 == 0) ? "i4" : "int";

View Full Code Here

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

          return new XmlRpcDouble(source);

        } else if (XmlRpcElementNames.I4.equals(childName)
            || XmlRpcElementNames.INT.equals(childName)) {
          String source = DomUtils.getTextValue(xmlElement);
          return new XmlRpcInteger(source);

        } else if (XmlRpcElementNames.STRING.equals(childName)) {
          String source = DomUtils.getTextValue(xmlElement);
          return new XmlRpcString(source);
View Full Code Here

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

            return new XmlRpcDouble(source);

          } else if (XmlRpcElementNames.I4.equals(localName)
              || XmlRpcElementNames.INT.equals(localName)) {
            String source = reader.getElementText();
            return new XmlRpcInteger(source);

          } else if (XmlRpcElementNames.STRING.equals(localName)
              || XmlRpcElementNames.INT.equals(localName)) {
            String source = reader.getElementText();
            return new XmlRpcString(source);
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.