Examples of XmlRpcResponse


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

    this.xmlRpcElementFactory.createXmlRpcElement(result);
    this.xmlRpcElementFactoryControl.setReturnValue(parameter);

    // expectation: serialize the XML-RPC response.
    byte[] serializedXmlRpcResponse = { 5, 7, 3 };
    this.xmlRpcResponseWriter.writeResponse(new XmlRpcResponse(parameter));
    this.xmlRpcResponseWriterControl.setReturnValue(serializedXmlRpcResponse);

    this.setMockControlStateToReplay();

    // execute the method to test.
View Full Code Here

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

    byte[] serializedXmlRpcResponse = { 5, 7, 3 };
    XmlRpcException xmlRpcException = new XmlRpcInternalException(
        "Server error. Internal xml-rpc error");
    XmlRpcFault xmlRpcFault = new XmlRpcFault(xmlRpcException.getCode(),
        xmlRpcException.getMessage());
    XmlRpcResponse xmlRpcResponse = new XmlRpcResponse(xmlRpcFault);
    this.xmlRpcResponseWriter.writeResponse(xmlRpcResponse);
    this.xmlRpcResponseWriterControl.setReturnValue(serializedXmlRpcResponse);

    this.setMockControlStateToReplay();
View Full Code Here

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

    byte[] serializedXmlRpcResponse = { 5, 7, 3 };
    XmlRpcException xmlRpcException = new XmlRpcServiceNotFoundException(
        "The service '" + notExistingServiceName + "' was not found");
    XmlRpcFault xmlRpcFault = new XmlRpcFault(xmlRpcException.getCode(),
        xmlRpcException.getMessage());
    XmlRpcResponse xmlRpcResponse = new XmlRpcResponse(xmlRpcFault);
    this.xmlRpcResponseWriter.writeResponse(xmlRpcResponse);
    this.xmlRpcResponseWriterControl.setReturnValue(serializedXmlRpcResponse);

    this.setMockControlStateToReplay();
View Full Code Here

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

    int faultCode = 8453;
    String faultMessage = "A fault";

    XmlRpcFault xmlRpcFault = new XmlRpcFault(faultCode, faultMessage);

    XmlRpcResponse response = new XmlRpcResponse(xmlRpcFault);

    StringBuffer builder = new StringBuffer(256);
    builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    builder
        .append("<methodResponse><fault><struct><member><name>faultCode</name><value><i4>");
View Full Code Here

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

    XmlRpcArray xmlRpcArray = new XmlRpcArray();
    xmlRpcArray.add(firstValue);
    xmlRpcArray.add(secondValue);

    XmlRpcElement[] parameters = { xmlRpcArray };
    XmlRpcResponse response = new XmlRpcResponse(parameters);

    StringBuffer builder = new StringBuffer(256);
    builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    builder
        .append("<methodResponse><params><param><value><array><data><value><string>");
View Full Code Here

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

    byte[] value = { 4, 6, 99, 5 };
    byte[] encodedValue = Base64.encodeBase64(value);
    XmlRpcBase64 xmlRpcBase64 = new XmlRpcBase64(value);

    XmlRpcElement[] parameters = { xmlRpcBase64 };
    XmlRpcResponse response = new XmlRpcResponse(parameters);

    StringBuffer builder = new StringBuffer(256);
    builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    builder.append("<methodResponse><params><param><value><base64>");
    builder.append(new String(encodedValue, 0, encodedValue.length));
View Full Code Here

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

   */
  public final void testWriteResponseWithBooleanParameters() {
    XmlRpcBoolean[] parameters = { new XmlRpcBoolean(Boolean.TRUE),
        new XmlRpcBoolean(Boolean.FALSE) };

    XmlRpcResponse response = new XmlRpcResponse(parameters);

    StringBuffer builder = new StringBuffer();
    builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    builder.append("<methodResponse><params>");

View Full Code Here

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

    Date value = calendar.getTime();
    XmlRpcDateTime xmlRpcDateTime = new XmlRpcDateTime(value);
    XmlRpcElement[] parameters = { xmlRpcDateTime };

    XmlRpcResponse response = new XmlRpcResponse(parameters);

    StringBuffer builder = new StringBuffer(256);
    builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    builder.append("<methodResponse><params><param><value><dateTime.iso8601>");
    builder.append(dateFormat.format(value));
View Full Code Here

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

    Double value = new Double(782.99);

    XmlRpcDouble xmlRpcDouble = new XmlRpcDouble(value);
    XmlRpcElement[] parameters = { xmlRpcDouble };

    XmlRpcResponse response = new XmlRpcResponse(parameters);

    StringBuffer builder = new StringBuffer(256);
    builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    builder.append("<methodResponse><params><param><value><double>");
    builder.append(value);
View Full Code Here

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

    Integer value = new Integer(54);

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

    XmlRpcResponse response = new XmlRpcResponse(parameters);

    StringBuffer builder = new StringBuffer(256);
    builder.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
    builder.append("<methodResponse><params><param><value><i4>");
    builder.append(value);
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.