Yaxiong,

That's not enough, where's the start ?
Where's the POST /yourPath HTTP/1.0  ??

Here is a little dumb web-server. Invoke it with
java -classpath . DumbServer <yourPortNumber

It simply prints to the console what it receives.
Using it with your two versions of XML-RPC clients should show you some 
differences. For encoding reasons of the console, it may make sense to 
redirect the standard-output of this process to a file which you can 
then view with an hex-viewer. Alternatively, you can change the 
"System.out.print((char) r);" to something that uses a NumberFormat 
outputting in hexadecimal.

Hope that helps.

Paul

import java.net.Socket;
import java.net.ServerSocket;
import java.io.InputStream;
import java.io.IOException;

public class DumbServer {
        
        public static void main(String[] args ) throws Exception {
                ServerSocket server = new ServerSocket ( Integer.parseInt(args[0]) );
                while ( true ) {
                        Socket socket = server.accept();
                        System.out.println("Accepted connection.");
                        try {
                        InputStream in = socket.getInputStream();
                        int r = 0, n = 0;
                        while ( (r=in.read()) != -1 ) {
                                System.out.print((char) r);
                                if ( r == 13 || r == 10 ) {
                                        n++;
                                        if ( n >= 4 ) break; // should be the end of 
the header
                                } else n = 0;
                        }
                        in.close();
                        System.out.println(""); // that is... flush system.out
                        } catch (Exception ex) {ex.printStackTrace();}
                }
        }
        
}

On Lundi, mars 18, 2002, at 10:26 , Lin, Yaxiong wrote:
> Data stream received from XmlClientLite:
> 
>++Γπ@a@+ππ+a±K=§ΣoaO`-caouz@-u?aea@τ++`+++@±K=§+uouz@O==·)±==z±°==§+uouaou`
> π
> ?uaz
> @uaouaooo§+uouaou`+aocuez@=±)·§§x<?xml version="1.0"
> encoding="ISO-8859-1"?><meth
> ... more

Reply via email to