Failed to parse servers response: Missing whitespace before SYSTEM literal

Hi iam using XML-RPC iam getting this error while running the program.

This is the Client Program..

package org.apache.xmlrpc.demo.client;

import java.net.MalformedURLException;

import java.net.URL;

import org.apache.xmlrpc.XmlRpcException;

import org.apache.xmlrpc.client.XmlRpcClient;

import org.apache.xmlrpc.client.XmlRpcClientConfigImpl;

import org.apache.xmlrpc.client.XmlRpcCommonsTransportFactory;

import org.apache.xmlrpc.client.util.ClientFactory;

//import org.apache.xmlrpc.demo.proxy.Adder;

public class Client {

public static void main(String args[]) throws Exception{

try{

XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();

config.setServerURL(new URL("http://localhost:7001/xmlrpc"));

config.setEnabledForExtensions(true);

config.setConnectionTimeout(60*1000);

config.setReplyTimeout(60*1000);

XmlRpcClient client = new XmlRpcClient();

client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));

client.setConfig(config);

Object[] params = new Object[] {new Integer(3), new Integer(2)};

System.out.println("Before:::calling the exceute");

Integer result = (Integer)client.execute("Calculator.add",params);

System.out.println(params[0] + " + " + params[1] + " = " + result);

}

catch(Exception e)

{

e.printStackTrace();

}

}

}

***********

This is the class thru which iam calling the remote method.

package org.apache.xmlrpc.demo;

public class Calculator {

public int add(int i1,int i2){

return i1+i2;

}

public int subtract(int i1,int i2){

return i1-i2;

}

}

********

While running this program iam getting this error

org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse servers response: Missing whitespace before SYSTEM literal URI.

at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:177)

at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)

at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)

at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)

at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)

at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)

at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)

at org.apache.xmlrpc.demo.client.Client.main(Client.java:34)

Caused by:

org.xml.sax.SAXParseException: Missing whitespace before SYSTEM literal URI.

at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3376)

at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3370)

at org.apache.crimson.parser.Parser2.whitespace(Parser2.java:736)

at org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2922)

at org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1309)

at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:656)

at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)

at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)

at org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:175)

at org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:145)

at org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:94)

at org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:53)

at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:166)

at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:136)

at org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:125)

at org.apache.xmlrpc.demo.client.Client.main(Client.java:34)

[4020 byte] By [AK007a] at [2007-11-27 11:05:29]
# 1

My guess is that if you open up whatever file your trying to parse and search for SYSTEM, you will see its missing a space before or after that word. If the file is an xml document, open it in an xml editor that can validate the xml to see if its well formed and valid (if it as a DTD or schema).

George123a at 2007-7-29 13:08:59 > top of Java-index,Java Essentials,Java Programming...
# 2

@AK007 plz try to keep the code and the error messages in code tages that were provided here..That helps the readability of the program

sarath44a at 2007-7-29 13:08:59 > top of Java-index,Java Essentials,Java Programming...