You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Jim Tay <jt...@tucows.com> on 2003/09/08 17:25:55 UTC
Client debug?
Hi,
Is there a way to see the actual xml that XmlRpcClient generates on an
execute call? I can't find any debug functions in this class...
(I'm using the libraries in xmlrpc-1.1.jar)
Thanks,
Jim Tay
Re: Client debug?
Posted by Jim Tay <jt...@tucows.com>.
I was hoping for something in XmlRpcClient to show the xml output... oh
well. This little class will come in handy...
Thanks!
Jim
On Mon, 8 Sep 2003, Lars Widmer wrote:
Hello!
Jim, I once used the following code:
***
import java.net.*;
import java.io.*;
public class httpviewer
{
public static void main(String[] asArgs)
{
try
{
ServerSocket ss = new ServerSocket(8899);
Socket s = ss.accept();
InputStream is = s.getInputStream();
while(true)
{
int i = is.read();
if (i==-1) break;
System.out.write(i);
}
System.out.println("\n\nConnection closed");
}
catch(IOException ioe)
{
System.err.println("Exception:");
ioe.printStackTrace();
}
}
}
***
It shows the lines which the client sends in order to make a call. They
look about the following HTTP-Request:
POST / HTTP/1.1
Content-Length: 127
Content-Type: text/xml
User-Agent: Java1.4.0_01
Host: dskt5591:8899
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
As an other try I used a tool like
"EffeTech HTTP Sniffer"
That was better, but it didn't show all.
I got the following HTTP-Response:
HTTP/1.1 200 OK
Server: Apache XML-RPC 1.0
Connection: close
Content-Type: text/xml
Content-Length: 135
At the end I had what I wanted :-)
More I haven't... Sorry
Lars
Jim Tay wrote:
>Hi,
>
>Is there a way to see the actual xml that XmlRpcClient generates on an
>execute call? I can't find any debug functions in this class...
>
>(I'm using the libraries in xmlrpc-1.1.jar)
>
>Thanks,
>Jim Tay
>
>
>
>
>
>
Content Security by MailMarshal
Re: Client debug?
Posted by Lars Widmer <La...@gmx.ch>.
Hello!
Jim, I once used the following code:
***
import java.net.*;
import java.io.*;
public class httpviewer
{
public static void main(String[] asArgs)
{
try
{
ServerSocket ss = new ServerSocket(8899);
Socket s = ss.accept();
InputStream is = s.getInputStream();
while(true)
{
int i = is.read();
if (i==-1) break;
System.out.write(i);
}
System.out.println("\n\nConnection closed");
}
catch(IOException ioe)
{
System.err.println("Exception:");
ioe.printStackTrace();
}
}
}
***
It shows the lines which the client sends in order to make a call. They
look about the following HTTP-Request:
POST / HTTP/1.1
Content-Length: 127
Content-Type: text/xml
User-Agent: Java1.4.0_01
Host: dskt5591:8899
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive
As an other try I used a tool like
"EffeTech HTTP Sniffer"
That was better, but it didn't show all.
I got the following HTTP-Response:
HTTP/1.1 200 OK
Server: Apache XML-RPC 1.0
Connection: close
Content-Type: text/xml
Content-Length: 135
At the end I had what I wanted :-)
More I haven't... Sorry
Lars
Jim Tay wrote:
>Hi,
>
>Is there a way to see the actual xml that XmlRpcClient generates on an
>execute call? I can't find any debug functions in this class...
>
>(I'm using the libraries in xmlrpc-1.1.jar)
>
>Thanks,
>Jim Tay
>
>
>
>
>
>
Content Security by MailMarshal
RE: Client debug?
Posted by Jim Tay <jt...@tucows.com>.
Hi Jason,
I'm using the client only. I send requests off to a remote server, so I
don't have access to see my requests at the server.
But your suggestion gave me an idea; perhaps a solution lies in the
xmlTransportFactory...
Thanks for your help,
Jim
On Thu, 11 Sep 2003, Jason Wyatt wrote:
Jim,
One of our guys modified the 1.1 library to print out the incoming XML at
the server end. I think we just changed the ServerInputStream. If you would
like me to send it, please reply and I'll post it directly to your email
rather spam everyone on the list :)
Regards,
Jason
--
Falun Gong: A peaceful meditation practice under persecution in China
http://www.faluninfo.net
Truth - Compassion - Forbearance
-----Original Message-----
From: Jim Tay [mailto:jtay@tucows.com]
Sent: Tuesday, 9 September 2003 1:26 AM
To: xmlrpc-user@ws.apache.org
Subject: Client debug?
Hi,
Is there a way to see the actual xml that XmlRpcClient generates on an
execute call? I can't find any debug functions in this class...
(I'm using the libraries in xmlrpc-1.1.jar)
Thanks,
Jim Tay
RE: Client debug?
Posted by Jason Wyatt <jw...@itree.com.au>.
Jim,
One of our guys modified the 1.1 library to print out the incoming XML at
the server end. I think we just changed the ServerInputStream. If you would
like me to send it, please reply and I'll post it directly to your email
rather spam everyone on the list :)
Regards,
Jason
--
Falun Gong: A peaceful meditation practice under persecution in China
http://www.faluninfo.net
Truth - Compassion - Forbearance
-----Original Message-----
From: Jim Tay [mailto:jtay@tucows.com]
Sent: Tuesday, 9 September 2003 1:26 AM
To: xmlrpc-user@ws.apache.org
Subject: Client debug?
Hi,
Is there a way to see the actual xml that XmlRpcClient generates on an
execute call? I can't find any debug functions in this class...
(I'm using the libraries in xmlrpc-1.1.jar)
Thanks,
Jim Tay