Re: Failed to parse server's response: Failed to parse integer value:

2010-08-26 Thread Jochen Wiedmann
Use tcpmon, ethereal, or a similar tool to trace the communication
between client and server and then let's discuss based on that.

Jochen


On Thu, Aug 26, 2010 at 12:25 PM, Tioe, April april.t...@cw.com wrote:
 Hi there,



 I've created an XML-RPC client which calls a remote method in a server.
 The client sends a string for e.g. 0123456789 to the server.



 I get an XmlRpcException at the client if the string does not exist in
 the server i.e. No such

 If I pass an invalid string for e.g. 1, I get the XmlRpcException
 Invalid



 If the string exists in the server, I should be getting a response back
 from the server with some information.

 Instead I keep getting the below error:

 Failed to parse server's response: Failed to parse integer value: 



 There is no integer value specified in the above error message.



 Please help.



 Thanks.


 Regards,

 April




 This e-mail has been scanned for viruses by the Cable  Wireless Worldwide 
 e-mail security system - powered by MessageLabs. For more information on a 
 proactive managed e-mail security service, visit 
 http://www.cw.com/managed-exchange



 The information contained in this e-mail is confidential and may also be 
 subject to legal privilege. It is intended only for the recipient(s) named 
 above. If you are not named above as a recipient, you must not read, copy, 
 disclose, forward or otherwise use the information contained in this email. 
 If you have received this e-mail in error, please notify the sender (whose 
 contact details are above) immediately by reply e-mail and delete the message 
 and any attachments without retaining any copies.

 Cable  Wireless Worldwide plc
 Registered in England and Wales. Company Number 07029206
 Registered office: Liberty House, 76 Hammersmith Road, London W14 8UD, England



-- 
I Am What I Am And That's All What I Yam (Popeye)


Re: Advanced Custom Data Type

2010-06-18 Thread Jochen Wiedmann
Can you imagine that it doesn't work won't give too many clues?


On Thu, Jun 17, 2010 at 2:57 PM, stefan V steta...@gmx.de wrote:

 Hello,

 I'm new in Apaches' XMLRPC.
 I try to get some data from a xmlrpc-server (I got a simple String from a
 method, so it works - a bit)
 The date format on the server is -MM-dd HH:mm:ss.SSS.

 So I tried to use the Custom Data Type Example
 (http://ws.apache.org/xmlrpc/advanced.html).

 But it doesn't work.

 Did I forgot something? Is there a mistake in it?

 Thank you for your help!
 --
 View this message in context: 
 http://old.nabble.com/Advanced-%22Custom-Data-Type%22-tp28913982p28913982.html
 Sent from the Apache Xml-RPC - Dev mailing list archive at Nabble.com.





-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Question: http client not found

2010-06-05 Thread Jochen Wiedmann
You've got the wrong httpclient. What you need is commons-httpclient. See

http://hc.apache.org/httpclient-3.x/

Apart from that, there's no reason I am aware of to prefer the
httpclient transport over the sun transport.

Jochen



On Sat, Jun 5, 2010 at 3:44 PM, James Carroll
jamesdcarrol...@verizon.net wrote:
 My sincere apologies. Work's been crazy.

 I'm trying to access the Bugzilla XMLRPC interface to automate the
 loading of bugs. Its crashing with:

 java.lang.NoClassDefFoundError:
 org/apache/commons/httpclient/HttpException

 I have the HTTP Client jar on my build path, but the classes are
 packaged as org.apache.http.*

 Could you help me find the right class/jar to use?

 Thanks,

 James





-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Package org.apache.xmlrpc.secure does not exist

2010-05-26 Thread Jochen Wiedmann
Reading the docs, perhaps? See

http://ws.apache.org/xmlrpc/ssl.html



2010/5/26 Patrick Stürmlinger patr...@mindf.org:
 Hello,
 I need a SecureXmlRpcClient to initiate a secure connection over ssl. My
 problem is that org.apache.xmlrpc.secure isn't included in any .jar file
 at my classpath.

 I have following .jars there:
 commons-codec-1.4.jar
 ws-commons-util-1.0.2.jar
 xmlrpc-client-3.1.3.jar
 xmlrpc-common-3.1.3.jar


 What did I miss?


 Thanks,
 Patrick




-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Port Range?

2010-04-22 Thread Jochen Wiedmann
The problem is most likely that you don't understand how to configure
the firewall.

A connection made from a client to your server will have port 8080 on
the server side, but some arbitrary port between 1024 and 65535 on the
client side.

Jochen


On Thu, Apr 22, 2010 at 3:08 PM, Sven Kerkling kerkl...@bds-online.com wrote:
 Hi!

 I have a small problem with my XMLRPC Server.
 I have a Firewall between my Server and my Client.
 When I forward only the port 8080, on which my Server is listening, then
 nothing worked. If I forward all the ports, it works just fine.

 Which Portrange must I forward to tighten the security?

 Regards
 Sven Kerkling


 Für Rückfragen stehe ich Ihnen gerne zur Verfügung

 Sven Kerkling

 Business Data Solutions GmbH  Co. KG
 Kettelerstr. 3-11
 97222 Rimpar

 Tel: 09365/897778
 Fax: 09365/897779
 Internet: http://www.bds-online.com

 Geschäftsführer: Dr. Oliver Bopp, Roland Wolff

 Amtsgericht Würzburg, HRA 6191
 USt-Ident-Nr.: DE229435321





-- 
Germanys national anthem is the most boring in the world - how telling!


Re: how to get the xml bytes

2010-04-13 Thread Jochen Wiedmann
Use tcpdump, wireshark, or a similar tool.


On Tue, Apr 13, 2010 at 8:38 AM, Lucio Crusca lu...@sulweb.org wrote:
 Hello *,

 I'm coding some XMLRPC client tests for certain XMLRPC webservices. The server
 is Django and it's being written by someone else, but that's only to say I
 have no control over that code. All I have to do is to write client Java tests
 for the documented services.

 Now one of my tests fails. The developer who writes server code asked me to
 add to my failed test output the xml string sent by my client to his server.
 Here is my current java code:

    XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
    config.setServerURL(new URL(url));
    config.setBasicUserName(admin);
    config.setBasicPassword(admin);

    XmlRpcClient client = new XmlRpcClient();
    client.setConfig(config);

    String rpcmethod = resources.myrpcservice;
    params = new Object[]{1};
    client.execute(rpcmethod, params);

 (basically cut  pasted from the examples). How do I intercept the xml string
 my client sends to the server?

 Thanks in advance,
 Lucio.




-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Connection re-use bug in XML-RPC 3.1.3

2010-04-02 Thread Jochen Wiedmann
Hi, Greg,

I am not sure, whether I do understand the issue completely, so let me
repeat it first:

You start by configuring the client with an initial user name and
password. Later on, you reconfigure it to use another, bogus
password. As soon as the server rejects the bogus user name and
password, the client starts using the initial credentials again and
authenticates successfully. Right?

If that's right: First of all, I'd consider that the server has a
*much more* important security problem, if it does accept the initial
(and no longer valid) credentials again. Second, I'd be interested to
see your proof of your assertion first before I believe it. For
example, a network protocol, or something like that. Third, I am not
believing that the problem is in the Apache XML-RPC code, unless you
also demonstrate me that you can create said network protocol
*without* the use of the Authenticator class (indeed, I haven't got
the slightest idea, why you are using both) and with a complete source
code example.

Sorry,

Jochen


On Thu, Apr 1, 2010 at 6:06 PM, Greg Smethells gsmethe...@medstrat.com wrote:
 -- Forwarded message --
 From: Greg Smethells gsmethe...@medstrat.com
 To: xmlrpc-a...@ws.apache.org
 Date: Thu, 18 Mar 2010 10:22:21 -0500
 Subject: Connection re-use bug in XML-RPC 3.1.3

 XML-RPC Developers,

 There is a security hole in the re-use of server connections when
 basic authentication is involved.

 Context:
 We have an XML-RPC client that connects to a server over HTTPS and
 requires basic authentication. Initially, the app starts up using a
 1st username/password and our java.net.Authenticator does a
 setDefault() to our own WebServerAuthenticator class. It's
 getPasswordAuthentication() is called by HttpURLConnection and the
 connection succeeds on the server. I cannot tell if it is ever used,
 but the XmlRpcClientConfigImpl also has its setBasicUserName and
 setBasicPassword set on the xmlrpcClient instance. Everything looks
 good at that point.
 Then, we have an administration dialog we use to configure the server
 side, which is where the issue starts to come up. The
 username/password at this point is different than when the app first
 signed into the server. A new WebServerAuthenticator class is
 setDefault()-ed with this admin (2nd) username/password and a new
 XmlRpcClientConfigImpl is instantiated and set to the admin's (2nd)
 user/pass and a new xmlrpcClient is also instantiated and set to the
 new client config. On the server side, I can see the client try to log
 in as the admin (2nd); however, if I provide a bogus password, I can
 see the basic auth fail on the server side AND THEN the original
 (1st) username/password (not the admin (2nd) credentials) are used to
 sign in and the RPC returns successfully (no exception thrown for
 password mismatch!). Unbeknownst to the app the xmlrpcClient has used
 credentials that were not asked to be used!

 Source Code:
 This is called during construction of the client-side server proxy ...
                        // Assign an Authenticator to pass username
 and password data during HTTPS requests
                        // Required for getting past Apache
 authentication (.htaccess)
                        Authenticator.setDefault(new
 WebServerAuthenticator(username, password));
                        // Create the XML-RPC client
 XmlRpcClientConfigImpl config = new XmlRpcClientConfigImpl();
 // Set-up the URL to the XML-RPC server
 config.setServerURL(new URL(https://; + ipAddress + / + cgiScript));
 // Set-up the log-in credentials that provide our actual security
 config.setBasicUserName(username);
 config.setBasicPassword(password);
 config.setEnabledForExtensions(true);
 // WARNING: must be as high enough to allow all timeouts given to call()
 config.setConnectionTimeout(30 * 1000);        // Timeout for connecting
 config.setReplyTimeout(MAX_TIMEOUT * 1000);    // Timeout for XML-RPC
 replies
 xmlrpcClient = new XmlRpcClient();
 xmlrpcClient.setConfig(config);
 // Timeout after timeout seconds (timeout seconds x 1000 milliseconds)
 TimingOutCallback callback = new TimingOutCallback(15 * 1000);
 // Fault tolerant connect
 try {
 Object[] result;
 Object[] params = new Object[] {};
 if( testRPC.length()  0 ) {
 // Asynchronous remote procedure call
 xmlrpcClient.executeAsync(testRPC, getParams(params), callback);
 result = (Object[]) callback.waitForResponse();

 // If we did not throw an exception and got here, then we are connected
  state = CONNECTED;
 // Finish any internal state set-up
 setupState(result);
 Console.print(Connection opened to  + toString());
 }
 else {
 // Assume we are connected
 state = CONNECTED;
 Console.print(Proxy created for  + toString());
 }
 }
 catch(TimeoutException e) {
 setState(e.getMessage(), ADDRESS_UNREACHABLE);
 }
 catch(XmlRpcException xrex) {
 parseState(xrex.getMessage());
 }
 catch(Exception ex) {
 parseState(ex.getMessage());
 }
 catch(Throwable t) {
 parseState(t.toString());
 

Re: changing the way objects are created as a result of a xmlrpc invocation

2010-02-16 Thread Jochen Wiedmann
Should soon be available on

http://ws.apache.org/xmlrpc/handlerCreation.html

if mirrors have synced up.

Thanks,

Jochen

On Tue, Feb 16, 2010 at 4:43 PM, teemu kanstren tkanst...@gmail.com wrote:

 How about you contributing one or two pages? :-)

 Here is some text for you. You can modify and use as you like

-- 
Germanys national anthem is the most boring in the world - how telling!


Re: XML-RPC timeout

2010-02-15 Thread Jochen Wiedmann
Quite possible. Try 3.1.3.


On Mon, Feb 15, 2010 at 11:50 AM, Lars Schnoor lars.schn...@ifad.dk wrote:
 When I look at the source code for XML-RPC 3.1.2 I can't see any
 initHttpHeaders in XmlRpcSun15HttpTransport, is this initHttpHeaders a newer
 thing?

 Jochen Wiedmann wrote:

 Put a breakpoint into XmlRpcSun15HttpTransport.initHttpHeaders. That
 should demonstrate you that the timeout values are set. If they aren't
 working, contact Sun.



 On Fri, Feb 12, 2010 at 4:40 PM, Lars Schnoor lars.schn...@ifad.dk
 wrote:


 Would this be correct?
              XmlRpcClientConfigImpl config = new
 XmlRpcClientConfigImpl();
              config.setConnectionTimeout(2000);
              config.setReplyTimeout(5000);
              this.client = new XmlRpcClient();
              this.client.setConfig(config);
              this.client.setTransportFactory(new
 XmlRpcSun15HttpTransportFactory(this.client));

 I tried it, but still get about 20 seconds before the XML-RPC invocation
 fails.


 Jochen Wiedmann wrote:



 http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory)



 On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor lars.schn...@ifad.dk
 wrote:



 How do I set the transport factory? I followed the example on the
 website.

 Jochen Wiedmann wrote:



 Are you using a proper transport factory, like
 XmlRpcSun15HttpTransportFactory?



 On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor lars.schn...@ifad.dk
 wrote:




 Hi
 I have seen that the XmlRpcClientConfigImpl has two methods to set
 timeout,
 there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
 pTimeout). Do these methods do anything? I have used these methods to
 set
 the two timeouts to 2 and 5 seconds respectively.
 I setup a client with these timeouts, print out a debug statement
 with
 timestamp and then I attempt to execute a XML-RPC method on my server
 which
 does not exist.
 The first thing in my catch block for the exception is a new debug
 statement
 that tells me that attempted XML-RPC failed after about 20 seconds.
 So, for me it looks like XML-RPC does not care about the timeouts I
 set,
 is
 this correct? Is there a way to set the timeouts and have XML-RPC
 attempt
 for the timeout period?
 I am using Windows XP.
 Thanks

 Lars

















-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Log xml sent and received

2010-02-12 Thread Jochen Wiedmann
Use wireshark, tcpmon, or a similar tool.


On Fri, Feb 12, 2010 at 11:18 AM, jz jehanzeb.qay...@gmail.com wrote:
 Hi,

 How can i log complete XML sent and received using apache xml rpc?


 Regards,
 Jehanzeb Qayyum




-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Exception handling

2010-02-12 Thread Jochen Wiedmann
Catch the XmlRpcException.


On Fri, Feb 12, 2010 at 11:19 AM, jz jehanzeb.qay...@gmail.com wrote:
 Hi,

 Where can i find good docs on exception handling in xml rpc client?
 Specificall i want to know the hhtp response code, fault code, fault details
 etc.

 Thanks


 Regards,
 Jehanzeb Qayyum




-- 
Germanys national anthem is the most boring in the world - how telling!


Re: changing the way objects are created as a result of a xmlrpc invocation

2010-02-12 Thread Jochen Wiedmann
Have a look at the

RequestProcessorFactoryFactory



On Fri, Feb 12, 2010 at 4:08 PM, teemu kanstren tkanst...@gmail.com wrote:
 Hello all,

  As I understand, each time a server receives an xmlrpc invocation a new
 object is created for the class registered to handle this. I do not wish to
 have this happen as it produces problems for me to map the invocations to
 any non-static objects especially if I have more than one xml-rpc server.
 From browsing some discussion earlier this month on the mailing list I
 gather that there is not much control provided in apache xmlrpc over this
 behaviour. In any case, I managed to hack something that seems to work and
 this is how I managed to address the issue, maybe it is of some help to
 anyone else who needs something similar..

 when starting the xmlrpc server I need to register a handler mapping that is
 used to find the classes to create and the methods to invoke:

 xmlRpcServer.setHandlerMapping(mapping);

 to have some control over object creation I then use my own handler mapping
 like this

 public class XmlRpcFooHandlerMapping implements XmlRpcHandlerMapping {
  //this is set in the constructor and gets as a parameter the non-static
 object I wish to use..
  private final XmlRpcFooHandler handler;

  public XmlRpcFooHandlerMapping(XmlRpcFooHandler handler) {
    this.handler = handler;
  }

  public XmlRpcHandler getHandler(String name) throws
 XmlRpcNoSuchHandlerException, XmlRpcException {
    //.. here some simple checks on the name like it contains Foo..
    return handler;
  }
 }

 and the handler..

 public class XmlRpcFooHandler implements XmlRpcHandler {
  //set this in the constructor and use in any way you like, it should be
 the same obejct for all invocations..
  private final Foo foo;

  public XmlRpcFooHandler(Foo foo) {
    this.foo = foo;
  }

 //here I inspire from the default implementation and use the TypeConverter
 class to conver the parameters..
 //since I know exactly the class (Foo.class) I wish to use, I can do lots of
 shortcuts such as expect method matching with just method names to be
 enough...
 }

 So thats it.. I hope it helps someone.

  If someone can suggest something more elegant, point out some flaws in it
 or whatever I am happy to hear..

 Teemu




-- 
Germanys national anthem is the most boring in the world - how telling!


Re: XML-RPC timeout

2010-02-12 Thread Jochen Wiedmann
http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/XmlRpcClient.html#setTransportFactory(org.apache.xmlrpc.client.XmlRpcTransportFactory)



On Fri, Feb 12, 2010 at 4:12 PM, Lars Schnoor lars.schn...@ifad.dk wrote:
 How do I set the transport factory? I followed the example on the website.

 Jochen Wiedmann wrote:

 Are you using a proper transport factory, like
 XmlRpcSun15HttpTransportFactory?



 On Fri, Feb 12, 2010 at 4:01 PM, Lars Schnoor lars.schn...@ifad.dk
 wrote:


 Hi
 I have seen that the XmlRpcClientConfigImpl has two methods to set
 timeout,
 there is setReplyTimeout(int pTimeout) and setConnectionTimeout(int
 pTimeout). Do these methods do anything? I have used these methods to set
 the two timeouts to 2 and 5 seconds respectively.
 I setup a client with these timeouts, print out a debug statement with
 timestamp and then I attempt to execute a XML-RPC method on my server
 which
 does not exist.
 The first thing in my catch block for the exception is a new debug
 statement
 that tells me that attempted XML-RPC failed after about 20 seconds.
 So, for me it looks like XML-RPC does not care about the timeouts I set,
 is
 this correct? Is there a way to set the timeouts and have XML-RPC attempt
 for the timeout period?
 I am using Windows XP.
 Thanks

 Lars










-- 
Germanys national anthem is the most boring in the world - how telling!


[RESULT] Release Apache XML-RPC 3.1.3

2010-02-11 Thread Jochen Wiedmann
Passed with

+1:  7 (Binding: Amila Suriarachchi, Ruchith Fernando, Deepal
Jayasinghe, Andreas Veithen, Jochen Wiedmann, non-binding: Johan
Hägre, Don Albertson)
=0:  0
-1:  0

I'll promote the files to the repositories and will be sending a
formal announcement.

Jochen


-- 
Germanys national anthem is the most boring in the world - how telling!


[VOTE] Release Apache XML-RPC 3.1.3

2010-02-06 Thread Jochen Wiedmann
Hi,

due to a recently discovered security issue, I'd like to release
Apache XML-RPC 3.1.3. This is a minor bugfix release. The complete
list of changes can be found at

http://people.apache.org/~jochen/xmlrpc/changes-report.html#a3.1.3


The proposed binaries can be found at

https://repository.apache.org/content/repositories/orgapachexmlrpc-004/

In particular, the proposed distribution files are at


https://repository.apache.org/content/repositories/orgapachexmlrpc-004/org/apache/xmlrpc/xmlrpc-dist/3.1.3/

The proposed site is at

 http://people.apache.org/~jochen/xmlrpc


Please cast your vote.

Thanks,

Jochen


[ ] +1
[ ] =0
[ ] -1


Re: [PATCH] Setting SAX features for XML-RPC

2010-02-03 Thread Jochen Wiedmann
Hi, Johan,

lets distinguish between two different questions:

- Whether there is a security issue. If so, this is of course of
general interest and ought to be fixed immediately.

I can imagine that you include an external entity into the clients
message. I can also imagine that this adds a local files contents to
the request. However, I have difficulties to understand why this
should become a part of the response? Is this specific to your
application?

- Whether and how you'd like to access the SAX parser.

Give me a few days to think about this.


Jochen

On Wed, Feb 3, 2010 at 11:23 AM, Johan Hägre johan.ha...@home.se wrote:
 I should of course attach the patch as well, sorry.

 This is the first time I'm submitting a patch, so I'm hoping this is the
 right way to do it.

 In our use of XML-RPC we have discovered a security issue regarding the use
 of external entities in XML. By creating a custom XML message and sending it
 to the XML-RPC handling service it is possible to get the contents of files
 stored on the server's file system as part of the response. The way we would
 like to solve this is to set the features
 http://xml.org/sax/features/external-general-entities and
 http://xml.org/sax/features/external-parameter-entities to false for the SAX
 parser. However we have not been able to find a way to set this since we
 can't get hold of the parser object. The solution we propose is to add a way
 to set features in the org.apache.xmlrpc.util.SAXParsers class. The features
 set here will be used for all XMLReaders created through subsequent calls to
 SAXParsers.newXMLReader(). This modification will not affect any existing
 application since if the setFeature() method in the SAXParsers class isn't
 used nothing will happen. The patch file (created using svn diff) is
 attached to this post.


 Best regards
 Johan Hägre




 Index: SAXParsers.java
 ===
 --- SAXParsers.java     (revision 905923)
 +++ SAXParsers.java     (arbetskopia)
 @@ -23,6 +23,8 @@

  import org.apache.xmlrpc.XmlRpcException;
  import org.xml.sax.SAXException;
 +import org.xml.sax.SAXNotRecognizedException;
 +import org.xml.sax.SAXNotSupportedException;
  import org.xml.sax.XMLReader;


 @@ -36,6 +38,14 @@
                spf.setValidating(false);
        }

 +       public static void setFeature(String pName, boolean pValue) throws
 SAXNotRecognizedException, SAXNotSupportedException,
 ParserConfigurationException {
 +               spf.setFeature(pName, pValue);
 +       }
 +
 +       public static boolean getFeature(String pName) throws
 SAXNotRecognizedException, SAXNotSupportedException,
 ParserConfigurationException {
 +               return spf.getFeature(pName);
 +       }
 +
        /** Creates a new instance of {...@link XMLReader}.
         */
        public static XMLReader newXMLReader() throws XmlRpcException {





-- 
Germanys national anthem is the most boring in the world - how telling!


Re: [Fwd: Fwd: How to invoke XmlRpcServer without using web.xml in tomcat]

2010-01-29 Thread Jochen Wiedmann
On Thu, Jan 28, 2010 at 8:55 AM, Casper Wandahl Schmidt
kalle.pri...@gmail.com wrote:

 Okay let me ask in another way: which class/interface can I use/implement to
 get to use the  server-side functionality if I don't want to use the
 WebServer and can't extend the XmlRpcServer/XmlRpcServerServlet?

Shameless copy of code from the servlet into your framework?


-- 
Germanys national anthem is the most boring in the world - how telling!


Re: How to invoke XmlRpcServer without using web.xml in tomcat

2010-01-27 Thread Jochen Wiedmann
On Wed, Jan 27, 2010 at 1:31 PM, Casper Wandahl Schmidt
kalle.pri...@gmail.com wrote:

 My question is how to use the XmlRpc framework within this JWIG framework.


That's a question you should rather put to the framework authors or users.


-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Problem (302 moved error)

2009-10-29 Thread Jochen Wiedmann
Try using the URL from the location header. In other words, add a /
to the URL.


On Wed, Oct 28, 2009 at 8:49 PM, Mike Baranski
list-subscripti...@secmgmt.com wrote:
 I have the following java class:

 package com.secmgmt.xmlrpc.change_status;
 import org.apache.log4j.Logger;

 public class ChangeStatus
 {
    public static final int SUCCESS = 0;
    public static final int INVALID_LOGIN = 1;
    public static final int EID_NOT_FOUND = 2;
    public static final int SERVER_NOT_PRIMARY = 3;
    public static final int NO_CHANGE_NEEDED = 4;

    private static Logger l = Logger.getLogger(ChangeStatus.class);

    public static final String ACTIVE = ACTIVE;
    public static final String INACTIVE = INACTIVE;

    public static final int PP_ACTIVE = 0;
    public static final int PP_INACTIVE = 1;

    public ChangeStatus()
        {
            l.debug(Created the status xmlrpc class);
        }

    public boolean ping()
        {
            return true;
        }

    public int add(int one, int two)
        {
            l.debug(Adding  + one +  and  + two);
            return one + two;
        }

    public int changeStatus(String eid, String user, String password, String
 status)
        {
            return SUCCESS;
        }
 }

 The following in the properties file:
 ChangeStatus=com.secmgmt.xmlrpc.picture.four.change_status.ChangeStatus

 My webapp deploys properly, and I never see an error in the logs anywhere
 when I hit it.  My python program is:

 #!/usr/bin/python2
 import xmlrpclib
 from pprint import pprint

 p = xmlrpclib.ServerProxy(http://192.168.1.15:8080/xmlrpc-status;)
 print Server created
 try:
    #print p.system.listMethods()
    #print dir(p)
    p._ServerProxy__verbose = 1
    print Ping result: %s % (p.ChangeStatus.ping())
 except xmlrpclib.Error, v:
    print ERROR, v
    pass

 print Done

 Here is the output:

 Server created
 connect: (192.168.1.15, 8080)
 send: 'POST /xmlrpc-status HTTP/1.0\r\nHost:
 192.168.1.15:8080\r\nUser-Agent: xmlrpclib.py/1.0.1 (by
 www.pythonware.com)\r\nContent-Type: text/xml\r\nContent-Length:
 111\r\n\r\n'
 send: ?xml
 version='1.0'?\nmethodCall\nmethodNameChangeStatus.ping/methodName\n
 params\n/params\n/methodCall\n
 reply: 'HTTP/1.1 302 Moved Temporarily\r\n'
 header: Server: Apache-Coyote/1.1
 header: Location: http://192.168.1.15:8080/xmlrpc-status/
 header: Date: Wed, 28 Oct 2009 19:47:50 GMT
 header: Connection: close
 ERROR ProtocolError for 192.168.1.15:8080/xmlrpc-status: 302 Moved
 Temporarily
 Done

 Any idea why I get the 302 error?  My XML-RPC appears to be correct.







-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Problem (302 moved error)

2009-10-29 Thread Jochen Wiedmann
Alternatively, remove the /* from the pattern below.


On Wed, Oct 28, 2009 at 8:55 PM, Mike Baranski
list-subscripti...@secmgmt.com wrote:
 Here is the web.xml, also:

 ?xml version=1.0 encoding=ISO-8859-1?
 !DOCTYPE web-app PUBLIC -//Sun Microsystems, Inc.//DTD Web Application
 2.3//EN http://java.sun.com/dtd/web-app_2_3.dtd;
 web-app

    display-nameSecurity Managment Consulting/display-name

   servlet
        servlet-nameXmlRpcServlet/servlet-name

 servlet-classorg.apache.xmlrpc.webserver.XmlRpcServlet/servlet-class
    /servlet

    servlet-mapping
        servlet-nameXmlRpcServlet/servlet-name
        url-pattern/xmlrpc-status/*/url-pattern
    /servlet-mapping

 /web-app

-Original Message-
From: Mike Baranski [mailto:list-subscripti...@secmgmt.com]
Sent: Wednesday, October 28, 2009 3:49 PM
To: xmlrpc-dev@ws.apache.org
Subject: Problem (302 moved error)

I have the following java class:

package com.secmgmt.xmlrpc.change_status;
import org.apache.log4j.Logger;

public class ChangeStatus
{
    public static final int SUCCESS = 0;
    public static final int INVALID_LOGIN = 1;
    public static final int EID_NOT_FOUND = 2;
    public static final int SERVER_NOT_PRIMARY = 3;
    public static final int NO_CHANGE_NEEDED = 4;

    private static Logger l = Logger.getLogger(ChangeStatus.class);

    public static final String ACTIVE = ACTIVE;
    public static final String INACTIVE = INACTIVE;

    public static final int PP_ACTIVE = 0;
    public static final int PP_INACTIVE = 1;

    public ChangeStatus()
        {
            l.debug(Created the status xmlrpc class);
        }

    public boolean ping()
        {
            return true;
        }

    public int add(int one, int two)
        {
            l.debug(Adding  + one +  and  + two);
            return one + two;
        }

    public int changeStatus(String eid, String user, String password,
String
status)
        {
            return SUCCESS;
        }
}

The following in the properties file:
ChangeStatus=com.secmgmt.xmlrpc.picture.four.change_status.ChangeStatus

My webapp deploys properly, and I never see an error in the logs
anywhere
when I hit it.  My python program is:

#!/usr/bin/python2
import xmlrpclib
from pprint import pprint

p = xmlrpclib.ServerProxy(http://192.168.1.15:8080/xmlrpc-status;)
print Server created
try:
    #print p.system.listMethods()
    #print dir(p)
    p._ServerProxy__verbose = 1
    print Ping result: %s % (p.ChangeStatus.ping())
except xmlrpclib.Error, v:
    print ERROR, v
    pass

print Done

Here is the output:

Server created
connect: (192.168.1.15, 8080)
send: 'POST /xmlrpc-status HTTP/1.0\r\nHost:
192.168.1.15:8080\r\nUser-Agent: xmlrpclib.py/1.0.1 (by
www.pythonware.com)\r\nContent-Type: text/xml\r\nContent-Length:
111\r\n\r\n'
send: ?xml
version='1.0'?\nmethodCall\nmethodNameChangeStatus.ping/methodName
\n
params\n/params\n/methodCall\n
reply: 'HTTP/1.1 302 Moved Temporarily\r\n'
header: Server: Apache-Coyote/1.1
header: Location: http://192.168.1.15:8080/xmlrpc-status/
header: Date: Wed, 28 Oct 2009 19:47:50 GMT
header: Connection: close
ERROR ProtocolError for 192.168.1.15:8080/xmlrpc-status: 302 Moved
Temporarily
Done

Any idea why I get the 302 error?  My XML-RPC appears to be correct.






-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Problem (302 moved error)

2009-10-29 Thread Jochen Wiedmann
On Thu, Oct 29, 2009 at 1:42 PM, Mike Baranski
list-subscripti...@secmgmt.com wrote:

 I tried both, removing the /* and leaving the test script gives a 302 error, 
 leaving the /* and adding / to the test script gives 404.

I don't really trust this. I'd expect that you have some problem in
your setup, like not properly reloading, or something like that.

Anyways, as the problem is way before the XML-RPC code is touched, I
suggest that you contact tomcat-user, or a similar mailing list for
your web server.

Jochen


-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Vague XML-RPC exceptions

2009-10-27 Thread Jochen Wiedmann
Unless you don't mismatch ports and the port is actually an http port,
not an https port: This is clearly a purely SSL related problem. SSL
client and server don't seem to match. (For example, SSL 1 client, and
SSL 2 server, or vice versa.) Sorry, but I don't think that this list
may help in that case.

Jochen



On Mon, Oct 26, 2009 at 6:43 PM, Daphna Wasserman (dwasserm)
dwass...@cisco.com wrote:
 Hi,

 We are using XML-RPC version 3.1.1 with SSL in our application.

 We have been receiving the following XMLRpc exceptions, and are unable
 to figure them out, as we cannot determine which request caused it or by
 whom it was sent (dozens of XML-RPC requests are sent in 1 min).

 ERROR [10 26 2009 13:32:55.739 IST] -  server.XmlRpcErrorLogger -
 Unsupported SSL v2.0 ClientHello
 javax.net.ssl.SSLException: Unsupported SSL v2.0 ClientHello
 .
 .
 ERROR [10 26 2009 13:32:55.771 IST] -- server.XmlRpcErrorLogger - Remote
 host closed connection during handshake
 javax.net.ssl.SSLHandshakeException: Remote host closed connection
 during handshake
 .
 .
 .Caused by: java.io.EOFException: SSL peer shut down incorrectly
 .
 .
 ERROR [10 26 2009 13:32:55.858 IST] -  server.XmlRpcErrorLogger - Failed
 to parse XML-RPC request: Premature end of file.
 org.apache.xmlrpc.XmlRpcException: Failed to parse XML-RPC request:
 Premature end of file.
 .
 .
 .Caused by:
 org.xml.sax.SAXParseException: Premature end of file.

 Is there anyway we can better understand the source/cause of these
 errors?

 Thanks
 Daphna






-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Adding string tag in XML-RPC 3.1

2009-10-19 Thread Jochen Wiedmann
Sigh! Is anyone actually using the FAQ and that stuff?

http://ws.apache.org/xmlrpc/faq.html#string_format


On Mon, Oct 19, 2009 at 3:33 PM, Shirabur, Aravind Ashok
(Communication  Media Solutions) arvin...@hp.com wrote:
 Hi,

 We are using java XML-RPC library 3.1; when my client application send's 
 string datatype, string tag is missing.

 String tag missing::

 ?xml version=1.0\?
 methodCall
 methodNameGetMyDetails/methodName
 paramsparam
 value
 struct
 membernameoriginNodeType/namevalueEXT/value/member
 membernameoriginHostName/namevaluetestserver/value/member
 /struct
 /value
 /param
 /params
 /methodCall

 Expected request message with string tag::

 ?xml version=1.0\?
 methodCall
 methodNameGetMyDetails/methodName
 paramsparam
 value
 struct
 membernameoriginNodeType/namevaluestringEXT/string/value/member
 membernameoriginHostName/namevaluestringtestserver/string/value/member
 /struct
 /value
 /param
 /params
 /methodCall


 Thanks
 Aravind




-- 
Germanys national anthem is the most boring in the world - how telling!


Re: XML RPC Question

2009-10-13 Thread Jochen Wiedmann
Hi,

if your task actually requires more than one hour to run, I'd strongly
recommend an asynchronous procedure, like this:

- On the server, spawn a thread, which creates a unique ID. The new thread
  starts performing the task and returns the ID to the client.
- Client starts running in a loop. Every minute or so, send a query to
the server,
  whether the thread is ready. If so, leave the loop. Otherwise, go sleeping for
  another minute.

Should be much easier to implement than taking care of all these TCP/IP and
HTTP related timeout considerations.

Jochen


On Tue, Oct 13, 2009 at 3:49 PM,  balakarthik.baska...@wipro.com wrote:
 Hi,

 We are making use of a configuration where the XMLRPC Server is brought
 up in one linux server and the XMLRpc Client class is invoked in another
 Linux Server(via a shell script and both are behind the firewall).The
 XMLRPC server invokes a java business class and it runs for more than
 one hour.The server is set to return 0 on success and 1 on failure.

 We are seeing the connection to be terminated b/w the client and server
 exactly after one hour although the server process is completing without
 any issues.We are seeing a Connection reset error and the message
 displayed is an error (msg to be displayed when return is 1).However,we
 are not seeing any exceptions in the server log(after 1 hr and 30 mins
 run).We are seeing success messages or completion of the business class.

 Is there a default connection timeout that is set/could be defined b/w
 the XMLRPC Client and Server?Or could it be a socket connection
 timeout/OS level timeout that could be creating the issue?


 Regards,
 Bala

 Please do not print this email unless it is absolutely necessary.

 The information contained in this electronic message and any attachments to 
 this message are intended for the exclusive use of the addressee(s) and may 
 contain proprietary, confidential or privileged information. If you are not 
 the intended recipient, you should not disseminate, distribute or copy this 
 e-mail. Please notify the sender immediately and destroy all copies of this 
 message and any attachments.

 WARNING: Computer viruses can be transmitted via email. The recipient should 
 check this email and any attachments for the presence of viruses. The company 
 accepts no liability for any damage caused by any virus transmitted by this 
 email.

 www.wipro.com




-- 
Germanys national anthem is the most boring in the world - how telling!


Re: class cast exception with array return result

2009-10-13 Thread Jochen Wiedmann
You are right, Stan. Fixed!


On Tue, Oct 13, 2009 at 11:36 PM, Stanislav Miklik
stanislav.mik...@gmail.com wrote:
 Hi,

 you are right, there is a bug in FAQ.
 the point is, that you can not cast the result of the XML RPC call, in your
 case

 return (String []) windows.getInstances(category);

 is the problem.
 You have to transform the result to String[] as described in the FAQ (but
 without the cast in the first line of FAQ example)

 If you have any further questions, pls, ask ;-)
 Regards

 Stano

 On Tue, Oct 13, 2009 at 19:06, christopher.coo...@rsa.com wrote:

 I am continuing this from my bug post (sorry).
 I am having difficulty with an array not being cast properly. I have done
 what is outlined on here as far as I can tell.
 http://ws.apache.org/xmlrpc/faq.html#arrays

 This is the issue I opened for some background info
 https://issues.apache.org/jira/browse/XMLRPC-178

 I have done what is in the last comment, and I am still getting the class
 cast exception, I am really unsure where to go from here and any help would
 be much appreciated.

 Thanks,
 _
 Christopher Cooper
 Performance Engineer
 RSA Security
 781-515-7141






-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Problem with ReadTimeout in SunHttpTransport

2009-10-08 Thread Jochen Wiedmann
Isn't that already in? See


http://www.nabble.com/svn-commit:-r813462---in--webservices-xmlrpc-trunk:-client-src-main-java-org-apache-xmlrpc-client-XmlRpcSun15HttpTransport.java-pom.xml-src-changes-changes.xml-td25384668.html


2009/10/8 Mikhail Sarychev m...@magicworld-ltd.com:
 In XmlRpcSunHttpTransport ReadTimeout don't work! For repair this problem, 
 need add one string in sendRequest function in XmlRpcSunHttpTransport.java:

 final URLConnection c = conn = newURLConnection(config.getServerURL());
 c.setReadTimeout(config.getReplyTimeout());  // need add this string !!!
 c.setUseCaches(false);

 Please, add it in next release.

 With best regards,
 Mikhail Sarychev,
 Magic World, ltd





-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Support for HttpComponents HttpClient?

2009-10-03 Thread Jochen Wiedmann
So far no, but should be fairly trivial. Wonna provide a patch?


On Wed, Sep 23, 2009 at 4:42 PM, Christoph Jaehnigen
christoph.jaehni...@gmail.com wrote:
 Is there gone be support for the HttpComponents HttpClient (successor
 of Apache Commons HTTP Client) in Apache XML-RPC?

 Regards
 Chris




-- 
Germanys national anthem is the most boring in the world - how telling!


Re: XmlRpcSunHttpTransport and read timeout

2009-09-11 Thread Jochen Wiedmann
On Fri, Sep 11, 2009 at 6:46 AM, Gam gamal...@fastmail.fm wrote:

 I see that this class is specifically for Java 1.5. Do you know were is the
 code that selects the correct class at runtime? I'm very interested to know
 how it work.

See

https://svn.apache.org/viewvc/webservices/xmlrpc/trunk/client/src/main/java/org/apache/xmlrpc/client/XmlRpcClientDefaults.java?view=markup


-- 
Germanys national anthem is the most boring in the world - how telling!


Re: XmlRpcSunHttpTransport and read timeout

2009-09-10 Thread Jochen Wiedmann
Ok, commited.

On Thu, Sep 10, 2009 at 12:19 PM, Lars Gramark l...@stickybit.se wrote:
 Works like a charm. I've verified reply timeout and connection timeout.



-- 
Germanys national anthem is the most boring in the world - how telling!


Re: XmlRpcSunHttpTransport and read timeout

2009-09-08 Thread Jochen Wiedmann
You're the first one to point this out. Compatibility to 1.4 is not a
problem, because we already have JDK specific variants of the
transports. Wanna provide a patch?


On Tue, Sep 8, 2009 at 3:39 PM, Lars Gramarkl...@stickybit.se wrote:
 The reply timeout set in the XmlRpcHttpClientConfig is ignored when making 
 synchronous calls from the client.
 This may cause calls to hang forever if there is no response.

 Digging into the code, I noticed that the read timeout provided by the 
 XmlRpcHttpClientConfig
 is ignored when creating a URLConnection from the
 XmlRpcSunHttpTransport. The method URLConnection.setReadTimeout, made 
 available in Java 1.5, could be used to solve this.
 Is this a bug or is it a deliberate choice you've made to keep Java 1.4 
 compatibility?

 Thanks
 Lars Gråmark





-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Can I send XML document as parameter in xml-rpc

2009-09-05 Thread Jochen Wiedmann
On Sat, Sep 5, 2009 at 1:23 PM, John Wilsont...@wilson.co.uk wrote:

 the client end. Using a CDATA section is not a good idea because the
 included document might contain a CDATA section and they don't nest.

Unless you do consider, of course. :-)


I'll post some sample code which will handle streaming using CDATA later
this weekend.


Jochen



-- 
Germanys national anthem is the most boring in the world - how telling!


Re: Can I send XML document as parameter in xml-rpc

2009-09-03 Thread Jochen Wiedmann
On Thu, Sep 3, 2009 at 5:08 PM, Petersen,
Jenniferjennifer.peter...@cbsa-asfc.gc.ca wrote:

 I am anticipating we could have some problems with the xml messages as
 it will result in an XML document embedded in another...

Apart from the resulting document size: No, there should not be any
problem, providing that both sides are capable to create and parse
well formed XML. (Apache XML-RPC is capable, of course.)

Jochen


-- 
Perl rules: http://xkcd.com/224/


Re: Can I send XML document as parameter in xml-rpc

2009-09-03 Thread Jochen Wiedmann
On Thu, Sep 3, 2009 at 6:25 PM, Thomas Gaertnergaer...@tu-cottbus.de wrote:

 Encoding would be indeed a good idea. I'd gzip the doc and then send it as
 Base64 encoded data. That way you can also save a bit bandwidth.

No need to do so, unless the document is really large. And in that
case, it would make more sense to consider streaming the document
contents rather than use encoding and an additional byte buffer.

Jochen


-- 
Perl rules: http://xkcd.com/224/


Re: No string element for String types

2009-08-14 Thread Jochen Wiedmann
I have added the following FAQ entry now.


Apache XML-RPC is sending strings as valueSomeString/value.
Whereas I would expect valuestringSomeString/string/value.

Both formats are valid. XML-RPC compliant software (as Apache
XML-RPC is) must be able to understand both. Of course, you can only
produce one. Unfortunately there are a lot of processors out there,
which understand just one. Which is the reason, why this FAQ entry
exists.

Fortunately, it is not overly difficult to change the format, that
Apache XML-RPC produces. First of all, create a custom type factory:

package mypackage;

import org.apache.xmlrpc.common.TypeFactoryImpl;
import org.apache.xmlrpc.common.XmlRpcController;
import org.apache.xmlrpc.common.XmlRpcStreamConfig;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;

public class MyTypeFactory extends TypeFactoryImpl {
private static final TypeSerializer myStringSerializer =
new StringSerializer(){
public void write(ContentHandler pHandler, Object
pObject) throws SAXException {
write(pHandler, STRING_TAG, pObject.toString());
}
};

public MyTypeFactory(XmlRpcController pController) {
super(pController);
}

public TypeSerializer getSerializer(XmlRpcStreamConfig pConfig,
Object pObject) throws SAXException {
if (pObject instanceof String) {
return myStringSerializer;
}
return super.getSerializer(pConfig, pObject);
}
   }


Then you'e got to install that custom type factory. This works as
described in the section on Custom Data Types.


Re: Static Methods

2009-07-21 Thread Jochen Wiedmann
Static methods are ignored by Apache XML-RPC, by default. Either you
have to create your own handler mapping, or you create wrapper
instances.

Jochen


On Tue, Jul 21, 2009 at 3:00 PM, Keit Isenseekeit.isen...@bredex.de wrote:
 Hello!

 I am just evaluating XML RPC for my project and have a little problem with
 static methods. I can´t execute them but get an error. Normal methods are
 fine.

 Any suggestions?

 Working with Win2003 Server / Version 3.1.2 of XMLPRC / Java 1.6.0_13


 Error message when executing static method:

 SCHWERWIEGEND: No such handler: Execute.doubleTest
 org.apache.xmlrpc.server.XmlRpcNoSuchHandlerException: No such handler:
 Execute.doubleTest
        at
 org.apache.xmlrpc.server.AbstractReflectiveHandlerMapping.getHandler(AbstractReflectiveHandlerMapping.java:214)
        at
 org.apache.xmlrpc.server.XmlRpcServerWorker.execute(XmlRpcServerWorker.java:45)
        at
 org.apache.xmlrpc.server.XmlRpcServer.execute(XmlRpcServer.java:86)
        at
 org.apache.xmlrpc.server.XmlRpcStreamServer.execute(XmlRpcStreamServer.java:200)
        at org.apache.xmlrpc.webserver.Connection.run(Connection.java:208)
        at
 org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:68)
 org.apache.xmlrpc.XmlRpcException: No such handler: Execute.doubleTest
        at
 org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:197)
        at
 org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:156)
        at
 org.apache.xmlrpc.client.XmlRpcHttpTransport.sendRequest(XmlRpcHttpTransport.java:115)
        at
 org.apache.xmlrpc.client.XmlRpcSunHttpTransport.sendRequest(XmlRpcSunHttpTransport.java:69)
        at
 org.apache.xmlrpc.client.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:56)
        at
 org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:167)
        at
 org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:158)
        at
 org.apache.xmlrpc.client.XmlRpcClient.execute(XmlRpcClient.java:147)
        at Client.executeMethod(Client.java:48)
        at Client.startClient(Client.java:32)
        at ExecuteJava.main(ExecuteJava.java:33)


 Thanks in advance

 Keit






-- 
Base64 decoding, 300% faster than sun.misc.BASE64Decoder:
http://archive.netbsd.se/?ml=commons-deva=2008-05t=7522166


Re: How to create an XmlRpcRequest object?

2009-07-19 Thread Jochen Wiedmann
Use the XmlRpcRequestParser.

Jochen

On Sun, Jul 19, 2009 at 5:35 PM, Sergiy Kolesnikovskstu...@gmx.de wrote:
 Hi All,

 is there any possibility to create a XmlRpcReaquest object from, for
 example, a XML file or character stream containing a single XML-RPC
 method call in the format described by the XML-RPC Specification?

 Why I need this:
 1. I have a XML file with a XML-RPC method call.
 2. I read the file and create an XmlRpcReaquest object from that data.
 3. Pass this object to the XmlRpcClient.execute to perform the call.

 I use XML-RPC 3.1.2

 --
 Regards,
 Sergiy S. Kolesnikov






-- 
Base64 decoding, 300% faster than sun.misc.BASE64Decoder:
http://archive.netbsd.se/?ml=commons-deva=2008-05t=7522166


Re: how to enable mapping for methods of return type *void*

2009-07-01 Thread Jochen Wiedmann
On Tue, Jun 30, 2009 at 8:33 PM, Aggarwal,
Ajayajay.aggar...@stratus.com wrote:

 Some methods in my class implementing RPC are of return type VOID.

That works only, if

a) both client and server are written in Apache XML-RPC and
b) you are enabling extensions on both and
c) you are enabling void methods on both

Jochen




-- 
Don't trust a government that doesn't trust you.


Re: XML RPC client seems to be sending GET request instead of POST

2009-06-26 Thread Jochen Wiedmann
On Thu, Jun 25, 2009 at 5:39 PM, Roald Hoolwerfro...@hoolwerf.net wrote:

 But that is exactly my problem: Why is my client sending a GET request
 instead of a POST request?

No idea. That is definitely a nonsense and be it just for the length
restrictions of GET.

 I’ve tried “redirecting” the request to
 super.doPost(), but that gave the following error:
 org.apache.xmlrpc.XmlRpcException: Failed to parse XML-RPC request:
 Premature end of file.

Makes no sense.

A POST request allows to process an unnamed object: The request body.
In a GET request, we could at best select a particular parameter to
parse it.

In other words, you need to have the client fixed.


 I’ve tried looking up the Content-length of the request, but for both
 doGet() and doPost() those are -1. They shouldn’t be -1 as far as I know?

For GET the -1 is perfectly fine: There is no request body, hence no content.


Jochen


-- 
Don't trust a government that doesn't trust you.


Re: Change the xmlrpc server reponse encoding

2009-06-18 Thread Jochen Wiedmann
You are aware, that this is a violation of the XML-RPC spec, aren't you?

If so, you've got to create a custom instance of XmlWriter and a
corresponding XmlWriterFactory and set that on your XmlRpcServer
instance.

Jochen


On Thu, Jun 18, 2009 at 11:15 AM, jameljamel.essou...@gmail.com wrote:

 Hi,
 I would like to change the server response encoding from default value
 (ISO-8859-1) to utf-8 such as I use the xmlrpc 3.1.

 Regards
 --Jamel
 --
 View this message in context: 
 http://www.nabble.com/Change-the-xmlrpc-server-reponse-encoding-tp24089237p24089237.html
 Sent from the Apache Xml-RPC - Dev mailing list archive at Nabble.com.





-- 
Don't trust a government that doesn't trust you.


Re: Client Factory

2009-06-15 Thread Jochen Wiedmann
It would be better, if you'd file a bug report with a suggested patch.

Jochen


On Mon, Jun 15, 2009 at 7:55 AM, Livnat Peerlp...@redhat.com wrote:
 Hello,
 I am working with xmlrpc-client version 3.1.1.
 I have a java client and the server is written in python.
 I want to invoke a remote methods, who's name is without any prefix, on the
 server side.
 The problem is when using the methods newInstance they can:
 1.  add the class name as a prefix  (if i use the first 2 signatures):
   public interface X{
      public void foo();
   }

    foo()  invokes-- X.foo()
 2. add the string i pass in pRemoteName as a prefix (if i used the 3rd
 signature):
   invoking newInstance with pRemoteName=goo invokes-- goo.foo()
   passing  pRemoteName=   invokes --   .foo()

 The fix i need is in the class
   ClientFactory.java
 in method
   public Object newInstance(ClassLoader pClassLoader, final Class pClass,
 final String pRemoteName)

 add a check if the pRemoteName is empty, if this is the case then no need to
 concatenate . before the method name.

 today - String methodName = pRemoteName + . + pMethod.getName();

 a fix - String methodName = pMethod.getName();
               if(pRemoteName.length()0){
                   methodName = pRemoteName + . + methodName;
               }


 Is it possible to get this fix into the package?

 thank you, Livnat.












-- 
Don't trust a government that doesn't trust you.


Re: [jira] Commented: (XMLRPC-169) XmlRpcSunHttpTransport creates a new connection for every request.

2009-06-08 Thread Jochen Wiedmann
At least, your account is valid, and you're a member of the ws
group. Don't know about the svn privileges, but that's something I
cannot check.

Jochen


On Mon, Jun 8, 2009 at 9:10 AM, Alan Burlisonalan.burli...@sun.com wrote:
 Jochen Wiedmann (JIRA) wrote:

    [
 https://issues.apache.org/jira/browse/XMLRPC-169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=12717172#action_12717172
 ]
 Jochen Wiedmann commented on XMLRPC-169:
 

 Alan, you should now be able to apply this patch for yourself.

 Still haven't heard anything - is everything set up?

 --
 Alan Burlison
 --




-- 
Don't trust a government that doesn't trust you.


Re: org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse servers response: Unknown type: string

2009-06-07 Thread Jochen Wiedmann
Please, use tcpmon, WireShark, or a similar tool to create a trace of
the servers response and let us see that.

Thanks,

Jochen


On Sat, Jun 6, 2009 at 9:34 PM, Satya Prasad Sahusatya.s...@gmail.com wrote:
 Hi All,I need help urgently.
 My back end is python script acting as a server using XMLRPC.
 And my client is Java using the XMLRPC to call the python methods.
 Its all new to me.
 I am trying to call a method , but ending up with the following problem.

 org.apache.xmlrpc.client.XmlRpcClientException: Failed to parse servers
 response: Unknown type: string
        at
 org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:267)
        at
 org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:216)
        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 javatestprograms.Main.main(Main.java:36)
 Caused by:
 org.xml.sax.SAXParseException: Unknown type: string
        at
 org.apache.xmlrpc.parser.RecursiveTypeParserImpl.startElement(RecursiveTypeParserImpl.java:115)
        at
 org.apache.xmlrpc.parser.MapParser.startElement(MapParser.java:137)
        at
 org.apache.xmlrpc.parser.RecursiveTypeParserImpl.startElement(RecursiveTypeParserImpl.java:126)
        at
 org.apache.xmlrpc.parser.XmlRpcResponseParser.startElement(XmlRpcResponseParser.java:126)
        at
 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(AbstractSAXParser.java:533)
        at
 com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:330)
        at
 com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
        at
 com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
        at
 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
        at
 com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
        at
 com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
        at
 com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
        at
 org.apache.xmlrpc.client.XmlRpcStreamTransport.readResponse(XmlRpcStreamTransport.java:265)
        at
 org.apache.xmlrpc.client.XmlRpcStreamTransport.sendRequest(XmlRpcStreamTransport.java:216)
        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 javatestprograms.Main.main(Main.java:36)


 I am not getting any definite solution from net.
 Please help me as soon as possible.






 --
 Best Regards,
 Satya Prasad Sahu
 Contact Me @ +91-9901644330




-- 
Don't trust a government that doesn't trust you.


Re: ThreadPool deadlock

2009-05-19 Thread Jochen Wiedmann
On Mon, May 18, 2009 at 5:41 PM, Lars Schnoor lars.schn...@ifad.dk wrote:

 I am using the newest snapshot and it reduced the frequency of crashes
 considerably, but I still have problems with it from time to time. I did
 however not get a chance to check if it is the same deadlock problem as
 before.

See

  https://issues.apache.org/jira/browse/XMLRPC-168

both for a description of the issue, which is fixed in the snapshot and what we
need if you actually encounter more deadlocks.

Jochen


-- 
Don't trust a government that doesn't trust you.


RESULT: Alan Burlison as committer

2009-05-13 Thread Jochen Wiedmann
Passed with three positive votes: Siegfried, Henri, and myself.

Welcome to the club, Alan. :-)


-- 
Don't trust a government that doesn't trust you.


Re: How can I add a custom attribute (for example php_class) in the xmlrpc server xml output

2009-05-11 Thread Jochen Wiedmann
On Mon, May 11, 2009 at 12:07 PM, Jamel ESSOUSSI
jessou...@active-telecom.com wrote:

 I use a xmlrpc java server with a php client, i would like know how can I
 add a custom attribute in the struct tag in the java server side. I use the
 apache xmlrpc version 2.

Not so easy with version 2. In version 3, you might be able to achieve
this by using a custom TypeFactory.

See the advanced and FAQ entries on the home page for examples.


-- 
Don't trust a government that doesn't trust you.


Re: Problem with XmlRpcClient.execute()

2009-05-10 Thread Jochen Wiedmann
On Sun, May 10, 2009 at 1:51 PM, Lars Schnoor lars.schn...@ifad.dk wrote:

 Now I checked the newest source out, but how do I build it? I found some
 eclipse files, but my NetBeans 6.5 does not want to import them as a Eclipse
 project. Is there maybe some documentation to explain how to get the
 jar-files generated?

Lars, I have uploaded a snapshot to

  https://repository.apache.org/content/repositories/snapshots/org/apache/xmlrpc

Jochen


-- 
Don't trust a government that doesn't trust you.


Re: Problem with XmlRpcClient.execute()

2009-05-09 Thread Jochen Wiedmann
Funny, looks like https://issues.apache.org/jira/browse/XMLRPC-168

Checkout and build the latest version from SVN.


On Sat, May 9, 2009 at 11:21 PM, Lars Schnoor lars.schn...@ifad.dk wrote:
 Hi Alan
 Now I have been able to recreate the problem and can post the stack traces.
 I have actually one client and one server on each machine, but in the
 example below the call from the client to the server does not return.
 *On the client side:*

 /XML-RPC-1 prio=6 tid=0x02bf1c00 nid=0xd70 in Object.wait()
 [0x03a7f000..0x03a7fd14]
  java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java:485)
   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
   - locked 0x22f506b8 (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

  Locked ownable synchronizers:
   - None

 XML-RPC-0 prio=6 tid=0x02c8a400 nid=0xb00 in Object.wait()
 [0x036df000..0x036dfb14]
  java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   at java.lang.Object.wait(Object.java:485)
   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
   - locked 0x22f42870 (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

  Locked ownable synchronizers:
   - None

 XML-RPC Weblistener prio=6 tid=0x03008800 nid=0x798 runnable
 [0x037df000..0x037dfb94]
  java.lang.Thread.State: RUNNABLE
   at java.net.PlainSocketImpl.socketAccept(Native Method)
   at java.net.PlainSocketImpl.accept(Unknown Source)
   - locked 0x22f13ec8 (a java.net.SocksSocketImpl)
   at java.net.ServerSocket.implAccept(Unknown Source)
   at java.net.ServerSocket.accept(Unknown Source)
   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:326)
   at java.lang.Thread.run(Unknown Source)

  Locked ownable synchronizers:
   - None/

 *On the server side:*

 /XML-RPC-2 prio=6 tid=0x030e9400 nid=0xe64 waiting for monitor entry
 [0x035af000..0x035afa94]
  java.lang.Thread.State: BLOCKED (on object monitor)
   at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
   - waiting to lock 0x09293ac0 (a
 org.apache.xmlrpc.util.ThreadPool$Poolable)
   at
 org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
   - locked 0x09293a50 (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

  Locked ownable synchronizers:
   - None

 XML-RPC-1 prio=6 tid=0x02d2f000 nid=0x26c in Object.wait()
 [0x03baf000..0x03bafb14]
  java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on 0x0928f800 (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
   at java.lang.Object.wait(Object.java:485)
   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
   - locked 0x0928f800 (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

  Locked ownable synchronizers:
   - None

 XML-RPC-0 prio=6 tid=0x02d3c800 nid=0x3d0 in Object.wait()
 [0x03b5f000..0x03b5fb94]
  java.lang.Thread.State: WAITING (on object monitor)
   at java.lang.Object.wait(Native Method)
   - waiting on 0x0928e1e0 (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
   at java.lang.Object.wait(Object.java:485)
   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:60)
   - locked 0x0928e1e0 (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)

  Locked ownable synchronizers:
   - None

 XML-RPC Weblistener prio=6 tid=0x0309b400 nid=0x584 waiting for monitor
 entry [0x0340f000..0x0340fb94]
  java.lang.Thread.State: BLOCKED (on object monitor)
   at org.apache.xmlrpc.util.ThreadPool$Poolable.start(ThreadPool.java:107)
   - waiting to lock 0x09293a50 (a
 org.apache.xmlrpc.util.ThreadPool$Poolable$1)
   - locked 0x09293ac0 (a org.apache.xmlrpc.util.ThreadPool$Poolable)
   at org.apache.xmlrpc.util.ThreadPool.startTask(ThreadPool.java:168)
   - locked 0x091a3c60 (a org.apache.xmlrpc.util.ThreadPool)
   at org.apache.xmlrpc.webserver.WebServer.run(WebServer.java:338)
   at java.lang.Thread.run(Unknown Source)

  Locked ownable synchronizers:
   - None


 Found one Java-level deadlock:
 =
 XML-RPC-2:
  waiting to lock monitor 0x030fd5bc (object 0x09293ac0, a
 org.apache.xmlrpc.util.ThreadPool$Poolable),
  which is held by XML-RPC Weblistener
 XML-RPC Weblistener:
  waiting to lock monitor 0x030a6134 (object 0x09293a50, a
 org.apache.xmlrpc.util.ThreadPool$Poolable$1),
  which is held by XML-RPC-2

 Java stack information for the threads listed above:
 ===
 XML-RPC-2:
   at org.apache.xmlrpc.util.ThreadPool$Poolable.getTask(ThreadPool.java:99)
   - waiting to lock 0x09293ac0 (a
 org.apache.xmlrpc.util.ThreadPool$Poolable)
   at
 org.apache.xmlrpc.util.ThreadPool$Poolable.access$100(ThreadPool.java:47)
   at org.apache.xmlrpc.util.ThreadPool$Poolable$1.run(ThreadPool.java:59)
   - locked 0x09293a50 (a org.apache.xmlrpc.util.ThreadPool$Poolable$1)
 XML-RPC 

Re: How to send or upload large binary file to RPC server

2009-05-08 Thread Jochen Wiedmann
On Fri, May 8, 2009 at 9:48 PM, Abdel Olakara olak...@gmail.com wrote:

  XMLRPC is not not huge file trasnfer. there are limitations for XMLRPC. A
 better choice would be SOAP i think. XMLRPC can be used for smaller tasks
 and use SOAP for complex tasks as it support more data types.

That's not necessarily the case.

In Apache XML-RPC, you have the possibility to pass an InputStream on
the sending side. In conjunction with certain vendor options, this
will stream the output.

On the input side, things are a little bit more difficult: You'd need
to create a special type handler for base64 encoded input. But that's
certainly possible.

Jochen


-- 
Don't trust a government that doesn't trust you.


VOTE: Alan Burlison as committer

2009-05-08 Thread Jochen Wiedmann
Hi,

I'd like to propose Alan Burlison as a committer for XML-RPC. Alan is
a long time contributor of this project, providing bug reports and
patches. Additionally, his interests are in an area, which has always
been promoted by users on this list (standalone XML-RPC server, as
opposed to servlet based solutions), but less by developers like me.
He'd be able to fill a gap.

Thanks,

Jochen

[ ] -1
[ ] =0
[ ] +1

-- 
Don't trust a government that doesn't trust you.


Re: static mehods in handlers

2009-04-28 Thread Jochen Wiedmann
Hi, Michael,

I have compared versions 3.1.1 and 3.1.2, and cannot find any
difference in the handler mapping and the related classes. Can you
provide an example? Which exact version have you been using before?

Jochen

On Tue, Apr 28, 2009 at 8:43 PM, Pitoniak, Michael
mpito...@enterasys.com wrote:
 Greetings,

  In the previous release I heavily leveraged static methods in handlers. This 
 does not appear to be supported in the latest release, as 
 PropertyHandlerMapping.addHandler() does not add static methods. Is there a 
 work around for this?

 Thx,

 mike




-- 
Don't trust a government that doesn't trust you.


Re: Do we care about Java 1.4 compatibility?

2009-04-28 Thread Jochen Wiedmann
On Tue, Apr 28, 2009 at 7:29 PM, Alan Burlison alan.burli...@sun.com wrote:
 Don Albertson wrote:

 [1] http://java.sun.com/products/archive/eol.policy.html

 I have a few applications that are still running in 1.4 but they only use
 the client functions

 Good point, this would just affect the server - but the current code is in
 the common lib so I'm not sure how that would play out.

No it wouldn't. The ThreadPool isn't in the common package by change.
The client uses it for load limitation too.

Jochen

-- 
Don't trust a government that doesn't trust you.


[RESULT] Release Apache XML-RPC 3.1.2 (RC1)

2009-04-26 Thread Jochen Wiedmann
Hi,

for the record: Passed

+1: Glen Daniels, Ant Elder, Tom Jordahl, Asankha Perera,  Samisa
Abeysinghe, Jochen Wiedmann, Don Albertson (Non-Binding)
+0: Henri Gomez

I'll publish the distribution and will post a formal announcement when
the mirrors are loaded.

Jochen

-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: [RESULT] Release Apache XML-RPC 3.1.2 (RC1)

2009-04-26 Thread Jochen Wiedmann
On Sun, Apr 26, 2009 at 10:16 PM, Alan Burlison alan.burli...@sun.com wrote:

 FYI, I haven't forgotten about helping out with the XML-RPC stuff, I'm still
 waiting for our legal dept to get back to me.

Fine :-)


-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: Basic Authentication perl client

2009-04-21 Thread Jochen Wiedmann
On Tue, Apr 21, 2009 at 3:23 PM, Daphna Wasserman (dwasserm)
dwass...@cisco.com wrote:

 I've tried using both LWP::UserAgent's  method credentials() 
 HTTP:Headers' method Authorization_Basic().

I'd expect authorization_basic to do the trick. When in doubt, try to
use Wireshark, tcpmon, or a similar tool first, in order to find out
whether the problem is on the client or on the server.

If it turns out that the problem should be on the server side, take

http://svn.apache.org/repos/asf/webservices/xmlrpc/trunk/server/src/test/java/org/apache/xmlrpc/test/AuthenticationTest.java

as an example.


Jochen


-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


VOTE: Release Apache XML-RPC 3.1.2 (RC1)

2009-04-20 Thread Jochen Wiedmann
Hi,

I'd like to call for a release of Apache XML-RPC, version 3.1.2. This
is a bug fix release with no functional changes, compared to 3.1.1.
See below for changes. The proposed release can be found at


https://repository.apache.org/content/repositories/xmlrpc-010/org/apache/xmlrpc/xmlrpc-dist/3.1.2/

The proposed site is at

http://people.apache.org/~jochen/xmlrpc

The SVN tag is

http://svn.apache.org/repos/asf/webservices/xmlrpc/tags/xmlrpc-3.1.2

Please cast your vote:

[ ] +1
[ ] =0
[ ] -1


- Fix: Eliminated a possible race condition in the ThreadPool. Fixes
XMLRPC-162. Thanks to Mark Gertsvolf.
- Fix: The ThreadPool could create more threads than configured. Fixes
XMLRPC-161. Thanks to Mark Gertsvolf.
- Fix: Weakened the access control in the WebServer class in order to
make subclassing easier. Fixes XMLRPC-160. Thanks to James Baldassari.
- Fix: Improved the handling of HTTP status codes that indicate an
error. Fixes XMLRPC-159. Thanks to Brandon DuRette.
- Fix: Fixed a possible NPE in case of a malformed HTTP request in the
WebServer. Thanks to Alan Burlison.
- Fix: The webserver's connection timeout wasn't applied to the
ServletWebServer. Fixes XMLRPC-166. Thanks to Alan Burlison.
- Fix: A client could prevent other clients from connecting by not
sending any data. Fixes XMLRPC-166. Thanks to Alan Burlison.
- Fix: The platforms default encoding has been used at some point when
decoding HTTP headers. Fixes XMLRPC-164. Thanks to Greg Wurth.
- Fix: Could not resolve Maven dependency in repo1. Thanks to Yuen-Chi Lian.


-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: Session handling in XML-RPC

2009-04-15 Thread Jochen Wiedmann
On Thu, Apr 16, 2009 at 7:48 AM, Andrei Sirghi
andrei.sir...@tss-yonder.com wrote:

 Is it possible to access HTTP Sessions from XML-RPC server and client,

 Can somebody tell me how can I do that.

On the server: See the example on reading the client's IP address,
should be easy to adopt:

http://ws.apache.org/xmlrpc/faq.html#client_ip

On the client: See the section on cookie handling:

http://ws.apache.org/xmlrpc/advanced.html



-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Release 3.1.2?

2009-04-09 Thread Jochen Wiedmann
Hi,

thanks to the work of several contributors, we have a good set of
minor bug fixes and improvements. Apart from that, there is bug
XMLRPC-163, which can only be resolved by publishing a new release.
Therefore, I'd like to prepare an RC in the next weeks and call for a
vote. Any objections?

Thanks,

Jochen

-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: Release 3.1.2?

2009-04-09 Thread Jochen Wiedmann
On Thu, Apr 9, 2009 at 2:06 PM, Henri Gomez henri.go...@gmail.com wrote:

 Did there is a changelog somewhere ?

https://svn.apache.org/repos/asf/webservices/xmlrpc/trunk/src/changes/changes.xml



-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: Migrating from xmlrpc-1 to version 3

2009-03-24 Thread Jochen Wiedmann
On Tue, Mar 24, 2009 at 9:00 AM, Daphna Wasserman (dwasserm)
dwass...@cisco.com wrote:

 We have been using xmlrpc-1.jar in our application for a while,and are
 currently trying to migrate to the latest version (3.1.1)
 Today, on the server side, we have a class which implements
 XmlRpcHandler and handles all incoming XML-RPC requests. In order to
 migrate to 3.1.1, it is necessary to add handlers specifically. The
 problems is that our handlers contain invalid datatypes in terms of the
 XML-RPC, and its is impossible for us now to add support for all of
 these custom data types.

 Is there a more generic way to handle requests, such as i version 1?

I do not understand how you handled invalid datatypes in version 1.
An example of the XML and/or class in question could help.

In theory, custom data types shouldn't be a problem. See the secion on
that topic in

http://ws.apache.org/xmlrpc/advanced.html

handlers

Jochen



-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: Multiple xmlrpc calls over single connection

2009-01-13 Thread Jochen Wiedmann
On Tue, Jan 13, 2009 at 7:37 PM, Yanwar Asrigo asrigoyan...@gmail.com wrote:

 In my simple code, I created the xmlrpc client and then execute two xmlrpc
 calls using this client. However, from what I see from the log, it seems
 that the client reopen a new connection for the second execution.

First question: Did the server offer HTTP keepalive? The decision
whether a connection can be used must be agreed upon by both parties.

Next question: I have absolutely no idea what the commons library
does, but the standard Java libraries should support HTTP Keepalive
out of the box. (See
http://java.sun.com/j2se/1.4.2/docs/guide/net/properties.html.)


Jochen


-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: Multiple xmlrpc calls over single connection

2009-01-13 Thread Jochen Wiedmann
On Wed, Jan 14, 2009 at 4:11 AM, Yanwar Asrigo asrigoyan...@gmail.com wrote:

 Yes the server does offer the keepalive as I have modified it so.

Did you verify that by looking into the output of tcpmon or wireshark?

Jochen


-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: Handler objects..?

2009-01-09 Thread Jochen Wiedmann
On Fri, Jan 9, 2009 at 11:50 AM, Lars 'Levia' Wesselius
le...@openfrag.org wrote:

 I'm using the Java ws-apache-xmlrpc library, but I was wondering, in Helma
 you were able to do like: addHandler(Auth, new WhateverClass());, if I
 recall correctly. In this, you have to give the classname. Now I have no
 access to my classes anymore? How do I get access to the handler classes,
 since I need them internally.

See

   http://ws.apache.org/xmlrpc/faq.html#handler_initialization




-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: View raw server response

2008-11-16 Thread Jochen Wiedmann
On Mon, Nov 17, 2008 at 12:51 AM, Al Twohill [EMAIL PROTECTED] wrote:

 Is there a way I can retrieve the raw server response in order to
 debug this further? The server I'm communicating with is HTTPS so
 packet sniffers aren't too helpful.

Use Wireshark, Tcpmon, or a similar tool.

Jochen

-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: View raw server response

2008-11-16 Thread Jochen Wiedmann
On Mon, Nov 17, 2008 at 2:01 AM, Al Twohill [EMAIL PROTECTED] wrote:

 Like I said, the communication is over HTTPS. All I see in Wireshark is

Sorry for the fast shot. AFAIK, you might use
http://donsproxy.sourceforge.net/ for that.


-- 
I have always wished for my computer to be as easy to use as my
telephone; my wish has come true because I can no longer figure out
how to use my telephone.

-- (Bjarne Stroustrup,
http://www.research.att.com/~bs/bs_faq.html#really-say-that
   My guess: Nokia E50)


Re: Custom data types with TypeConverter

2008-09-05 Thread Jochen Wiedmann
On Fri, Sep 5, 2008 at 3:28 PM, Stefan Gmeiner [EMAIL PROTECTED] wrote:

 I have tried to achieve this through implementing a custom TypeConverter.

The TypeConverter is the wrong approach. Use a custom TypeFactory and
take the JAXBTypeFactory as an example.

Jochen


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


VOTE: Release Apache XML-RPC 3.1.1 (Take 2)

2008-08-10 Thread Jochen Wiedmann
Hi,

once more, I'd like to call for a release of Apache XML-RPC 3.1.1.
Compared to the first attempt, the following problems have been fixed:

- The distributed jar files are now containing META-INF/NOTICE.txt and
META-INF/LICENSE.txt files.
- All source files have been updated to carry headers, as outlined by
the latest ASF policy for
  source files.

Thanks,

Jochen

[ ] +1
[ ] =0
[ ] -1


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: VOTE: Release Apache XML-RPC 3.1.1 (Take 2)

2008-08-10 Thread Jochen Wiedmann
Forgot to note:

The proposed distribution is at

   http://people.apache.org/~jochen/xml-rpc/dist

The proposed site is at

   http://people.apache.org/~jochen/xml-rpc/dist


On Sun, Aug 10, 2008 at 8:34 PM, Jochen Wiedmann
[EMAIL PROTECTED] wrote:
 Hi,

 once more, I'd like to call for a release of Apache XML-RPC 3.1.1.
 Compared to the first attempt, the following problems have been fixed:

 - The distributed jar files are now containing META-INF/NOTICE.txt and
 META-INF/LICENSE.txt files.
 - All source files have been updated to carry headers, as outlined by
 the latest ASF policy for
  source files.

 Thanks,

 Jochen

 [ ] +1
 [ ] =0
 [ ] -1


 --
 Look, that's why there's rules, understand? So that you think before
 you break 'em.

  -- (Terry Pratchett, Thief of Time)




-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: VOTE: Release Apache XML-RPC 3.1.1

2008-08-09 Thread Jochen Wiedmann
On Sat, Aug 9, 2008 at 10:44 AM, ant elder [EMAIL PROTECTED] wrote:

 Looks like the artifacts are missing LICENSE and NOTICE files, and the
 source files still have the old ASF header.

Ok, I'll fix that.

Thanks,

Jochen



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: XML RPC 3.1.1 - REPUBLISH

2008-08-07 Thread Jochen Wiedmann
On Thu, Aug 7, 2008 at 4:18 PM, vizireanu-isaic dragos
[EMAIL PROTECTED] wrote:

 I'm using the xml-rpc 3.1 library, but I have problems with the User Agent. 
 As I saw, you resolved this problem, and even publish the library at this 
 adress:

  http://people.apache.org/repo/m2-snapshot-repository/org/apache/xmlrpc


 The problem is that the library is no longer available.

 Could you republish 3.1.1 library ?

See

http://www.nabble.com/VOTE%3A-Release-Apache-XML-RPC-3.1.1-td18833564.html


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


VOTE: Release Apache XML-RPC 3.1.1

2008-08-05 Thread Jochen Wiedmann
Hi,

as the snapshot releases have recently been removed from the
repository, it seems to be about time for a bug fixing release. See

http://people.apache.org/~jochen/xml-rpc/site/changes-report.html

for a detailed list of changes.

Therefore, I'd like to call for a vote on the release of Apache
XML-RPC 3.1.1. The proposed distribution is at

http://people.apache.org/~jochen/xml-rpc/dist

The proposed site is at

http://people.apache.org/~jochen/xml-rpc/dist

Thanks,

Jochen

[ ] +1
[ ] =0
[ ] -1



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: Regarding custom dateTime.iso8601 format...

2008-07-31 Thread Jochen Wiedmann
On Thu, Jul 31, 2008 at 3:55 PM, Kent Närling [EMAIL PROTECTED] wrote:

 We have a customer that insists on having FULL ISO 8601 dates (ie with
 timezone)

 However instead of using proper a extension datatype for this, they have
 modified the standard dateTime.iso8601 type to use this format!
 ie. they expect dates like this:
 dateTime.iso860120080730T19:39:10+/dateTime.iso8601

 Now, as far as I can see, this is not possible to work around easily, so I
 ended up patching the xmlrpc-commons code to allow this.

Why do you think so? This is quite easy. See

http://ws.apache.org/xmlrpc/advanced.html

The example is even using the date tag for overwriting.


Jochen


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: xmlrpc 3.1

2008-07-21 Thread Jochen Wiedmann
On Mon, Jul 21, 2008 at 11:26 AM, TomazM [EMAIL PROTECTED] wrote:

 On http://ws.apache.org/xmlrpc/advanced.html write Note, that this means 
 losing the XmlRpcClients multithreading abilities! so this is not a good
 solution. I wonder why is the limitation in HTTP header, in HTTP RFC there is 
 no limits of how long is message(maybe attacker will put 2G in header).

 Is there any example or documentation(not API) how you read this cookie on 
 server side?.

The problem is not the message size or something like that. If you
bind a cookie to the XmlRpcClient instance, then the instance contains
the details of the current session. For security purposes, you most
possibly don't want to share the instance between multiple threads.

In the case of Basic Authentication, there is no problem to use a
single instance of XmlRpcClient with multiple threads, as the
authentication details are bound to the configuration in that case.

Jochen

-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: xmlrpc 3.1

2008-07-21 Thread Jochen Wiedmann
On Mon, Jul 21, 2008 at 1:40 PM, TomazM [EMAIL PROTECTED] wrote:

 I would like to pass token(800 characters long Base64) as a password and on 
 server side validate this token.

Most HTTP servers (note: *Not* XML-RPX)  will refuse that, as headers
are typically restricted to something like 1024 characters.

Jochen


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: XML-RPC and File Transfer

2008-07-16 Thread Jochen Wiedmann
On Wed, Jul 16, 2008 at 9:19 PM, Mike Boyers [EMAIL PROTECTED] wrote:

 I also thought of the possibility of pulling the contents of a file into a 
 large byte[] and sending that.  This might work, but I could I potentially 
 run into encoding issues?  And I'm also wondering if it even makes sense to 
 try to transfer a large amount of data via this mechanism.  Would it be 
 unreliable to do so or prone to errors?  Would the underlying HTTP 
 transferring mechanism chunk the large data up and send it in pieces?

No, a byte[] is basically the right way to go. On the client side you
may as well use an InputStream (for example to an open file), if I
remember right.

Jochen


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: RPC With A Dynamic Number of Variables

2008-07-15 Thread Jochen Wiedmann
On Tue, Jul 15, 2008 at 3:51 PM, Elam Daly [EMAIL PROTECTED] wrote:

 We have a client who is expecting us to create an XML-RPC service with a
 dynamic number of variables, ie myRPC(var_1,var_2, var_x);

 Considering the static nature of the ws-xmlrpc library, I don't see how I
 can achieve this without using a Filter or something similar.

Why not simply using an Object[] or a List?

Jochen

-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: Problem with login using xml-rpc api

2008-07-02 Thread Jochen Wiedmann
On Wed, Jul 2, 2008 at 3:03 PM, Helder Ribeiro [EMAIL PROTECTED] wrote:

 I tried to run the login before calling the create but. The login works
 fine, it returns the logged user id, but when I call the create I got the
 same error.

Do you have a pointer to the API of the login method? I could assume
that it does something like returning a Cookie that you need to pass
later on.

Jochen


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: Problem with login using xml-rpc api

2008-07-02 Thread Jochen Wiedmann
On Wed, Jul 2, 2008 at 3:15 PM, Helder Ribeiro [EMAIL PROTECTED] wrote:
 This is the api documentation:

 http://www.bugzilla.org/docs/3.0/html/api/Bugzilla/WebService/User.html

 It says 
 *Returns*

 On success, a hash containing one item, id, the numeric id of the user that
 was logged in. A set of http cookies is also sent with the response. These
 cookies must be sent along with any future requests to the webservice, for
 the duration of the session.
 
 but when I run the execute method in the client for the Bug.login method
 it returns a Map with only one property, the user id.

See the section on Cookie handling on

http://ws.apache.org/xmlrpc/advanced.html

-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)


Re: hi...problem with xml rpc java and tomcat

2008-04-14 Thread Jochen Wiedmann
On Mon, Apr 14, 2008 at 1:05 AM, eejimkos [EMAIL PROTECTED] wrote:

  (HashMapString,ListString)client.execute(Open.OpenEnvironment1,
  params);

I am not exactly sure, what you receive, but

  - Generics are a no
  - The ListString is converted into an Object[]

Possibly other problems may be there as well. I recommend that you try
to use the


http://ws.apache.org/xmlrpc/apidocs/org/apache/xmlrpc/client/util/ClientFactory.html

See the section on Dynamic Proxies on
http://ws.apache.org/xmlrpc/advanced.html for how to use that.


Jochen




-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi...problem with xml rpc java and tomcat

2008-04-14 Thread Jochen Wiedmann
On Mon, Apr 14, 2008 at 12:40 PM, Stanislav Miklik
[EMAIL PROTECTED] wrote:

  return value (Jochen probably knows that always Object[], but since it is
  not described...)

That's not completely true: See

http://ws.apache.org/xmlrpc/faq.html#arrays

May be, that we need to make this more explicit, but I don't remember
receiving a patch for the docs or something like that?




-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: hi...problem with xml rpc java and tomcat

2008-04-14 Thread Jochen Wiedmann
On Mon, Apr 14, 2008 at 12:55 PM, Stanislav Miklik
[EMAIL PROTECTED] wrote:

 Btw: how can I create patch for doc?

Just checkout the projects source code. All docs, including the web
site, are part of it.


Jochen



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Clientside SSL Question

2008-04-10 Thread Jochen Wiedmann
On Thu, Apr 10, 2008 at 8:34 PM, Thomas Gaertner
[EMAIL PROTECTED] wrote:

  I have to admit I haven't used xmlrpc since some time now, but I'm pretty
  certain that you still have to implement your own way to deal with certs.
  Yet having your cert signed by a trusted authority makes things a bit easier.

In the case of a certificate, which is issued by a trusted authority,
there is basically no difference between HttpUrlConnection and
HttpsUrlConnection. In other words, there is nothing left do to.

Jochen



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: embedding a string into structure XML RPC request

2008-03-13 Thread Jochen Wiedmann
On Thu, Mar 13, 2008 at 10:41 AM, fahad.aizaz [EMAIL PROTECTED] wrote:

  public TypeParser getParser(XmlRpcStreamConfig pConfig, NamespaceContextImpl

You don't need to create a custom parser. The serializer is sufficient
in your case. Btw, it would be nice if you could create an entry on
http://wiki.apache.org/ws/XML-RPC, which describes what you did,
because your problem is somewhat of an FAQ.

Thanks,

Jochen


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: embedding a string into structure XML RPC request

2008-03-12 Thread Jochen Wiedmann
On Wed, Mar 12, 2008 at 10:56 AM, fahad.aizaz [EMAIL PROTECTED] wrote:

  
 membernameoriginNodeType/namevaluestringTEST/string/value/member

[...]

  membernameoriginNodeType/namevalueTEST/value/member

[...]

  The tag string/string is missing from the output xml data above.

The XML-RPC spec specifies the absence of any type indicator as
equivalent with the use of the string indicator. In other words, it
is the servers fault that it doesn't accept your response.

However, to know that won't help you. Visit
http://ws.apache.org/xmlrpc/advanced.html and find the section on
Custom data types. What you need is to have a custom type factory
with a custom TypeSerializer for the String class. The default
TypeSerializer for string is omitting the string tag, your's would
add it.


Jochen



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

 -- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XmlRpcServlet is not a javax.servlet.Servlet error

2008-02-17 Thread Jochen Wiedmann
On Feb 17, 2008 4:18 PM,  [EMAIL PROTECTED] wrote:

 But I got exception after loading jetty:

 javax.servlet.UnavailableException: Servlet class
 org.apache.xmlrpc.webserver.XmlRpcServlet is not a
 javax.servlet.Servlet
 at 
 org.mortbay.jetty.servlet.ServletHolder.checkServletType(ServletHolder.java:377)
 at 
 org.mortbay.jetty.servlet.ServletHolder.doStart(ServletHolder.java:234)
 at 
 org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
 at 
 org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:612)

As XmlRpcServlet extends the HttpServlet class, I can think of no
reason for causing this error message. Please ask the jetty mailing
list.

Jochen


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Basic Authentication with xmlrpc-3.1

2007-11-22 Thread Jochen Wiedmann
On Nov 22, 2007 7:16 PM, Simson Garfinkel [EMAIL PROTECTED] wrote:

 I have no problem with the username  password using either my browser
 or using my XML-RPC implementation in python. Is there any chance that
 this code just doesn't work?

Unlikely. I am myself using it in more than one project and it is
checked in the test suite.


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XML RPC request/response standards

2007-11-12 Thread Jochen Wiedmann
On Nov 13, 2007 2:33 AM,  [EMAIL PROTECTED] wrote:

 I want to know if the XML request formed using Apache XML RPC library is
 null-terminated?

It certainly isn't.


 Furthermore, is it a part of XML RPC standards to have null terminated
 request/response?

No. In contrary, the NUL character is explicitly invalid in any XML document.


 The C library our server side team is using just handles null terminated
 requests so not sure if it is part of XML RPC standards or what?

I don't know how your C library works. If it is parsing raw HTTP
requests, then it is wrong. If the C library assumes, for example,
that *you* are parsing the HTTP requests data, delegate it to the
library and terminate the data by adding a NUL character, then that
would work.


Jochen


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XmlRpcRequest

2007-11-09 Thread Jochen Wiedmann
On Nov 9, 2007 11:33 PM, John Bellone [EMAIL PROTECTED] wrote:

 All I basically need is to parse and serialize the messages. I'm
 receiving them in a ByteBuffer

What do you plan to take as the parsers input/output? The parsers I
know require In-/OutputStream, not ByteBuffer.




-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Examining XML RPC request packets

2007-11-07 Thread Jochen Wiedmann
On 11/7/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 I have tried Ethreal and Wireshark , they don't help.

Then you did something wrong. They do help. An alternative tool is tcpmon, btw.


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: contentLengthOptional really working as documented?

2007-09-24 Thread Jochen Wiedmann
On 9/24/07, Andreas Sahlbach [EMAIL PROTECTED] wrote:

 No guru available? I just want to know what is the official roadmap
 regarding streaming. Has it changed away from the documented features or is
 it maybe currently unknown? Or is it just a personal problem of my
 installation? Any hint would be welcome so I can figure out what to do
 next...

Andreas, I agree with your diagnosis. Unfortunately, I haven't found
the time to actually work on it. If you want to move things forward:

- Create a Jira issue and add your previous mail to it.
- Try to think of something that might fix the problem. (For example, sending a
  particular attribute as part of the request.) Add your ideas to the
Jira issue, so
  that we can discuss it.
- Create a patch and attach it to the issue.

Jochen

-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XmlRpcContext in version 3

2007-09-20 Thread Jochen Wiedmann
On 9/20/07, Raghbir Singh [EMAIL PROTECTED] wrote:

I have been using XML-RPC version 2 for some time and I decided to
 upgrade to version 3 but I am stuck at a roadblock which comes from
 XmlRpcContext.
My server used one handler and that handler extended
 ContextXmlRpcHandler and for every request I created an object of a
 class that implemented the XmlRpcContext interface. This way I could
 pass extra per-request information to the server like which database
 connection to use etc.
Since there is not ContextXmlRpcHandler and XmlRpcContext in version
 3, can anybody tell me how to do this now ?

The suggested way to do this is to subclass
RequestSpecificProcessorFactoryFactory and let it configure your
processor objects.

Jochen


-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: XmlRpcContext in version 3

2007-09-20 Thread Jochen Wiedmann
On 9/20/07, Raghbir Singh [EMAIL PROTECTED] wrote:

 I was thinking of extending a Server class like XmlRpcServletServer
 and then overloading the function newConfig which returns a new class
 MyConfig which is a subclass of XmlRpcHttpRequestConfigImpl. Now before
 calling doPost in servlet I can set the required parameters in MyConfig
 and they will show up in execute method of the handler.

That should also work.

Jochen

-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Apache XML-RPC Server - No such handler exception

2007-09-09 Thread Jochen Wiedmann
On 9/9/07, Ondrej Martinsky [EMAIL PROTECTED] wrote:

 doesn't recognize the handler MyRemoteProcedure provided by addHandler

I believe the problem is that you need to add the method name. For
example, don't use MyRemoteProcedure, but
MyRemoteProcedure.someMethod.

Jochen

-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Bug in FAQ for WS-XMLRPC 3.1

2007-09-04 Thread Jochen Wiedmann
Hello, Daniel,

On 9/4/07, Daniel Janus [EMAIL PROTECTED] wrote:

 However, this does not work because (as I found out after several hours' worth
 of digging through the code) the reflexive handler mapping is established
 during the call to super.newPropertyHandlerMapping(), when the new factory is
 not yet set up.

 The solution is to re-establish the mappings after setting up the custom
 request processor factory factory, by adding the following before
 the return statement:

   mapping.load(Thread.currentThread().getContextClassLoader(), url);

That sounds like a problem, which we should not simply handle by
changing the FAQ. Would you please be so kind to create a JIRA issue,
where we can continue the discussion?


Thanks,

Jochen



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: content-length problems?

2007-09-04 Thread Jochen Wiedmann
On 9/4/07, Póka Balázs [EMAIL PROTECTED] wrote:

 which must be wrong, because it sets the ContentLength header to be
 the length of the _uncompressed_ request, but returning the compressed
 message. This is bad according to the HTTP spec.

Do you have a quote that supports your opinion?


 I/O exception (org.apache.commons.httpclient.NoHttpResponseException)
 caught when processing request: The server xx.xx failed to respond
 Retrying request causes I/O error while communicating with HTTP
 server: Unbuffered entity enclosing request can not be repeated.


 The HTTPClient got an EOFException while transmitting the request or
 receiving the reply. It couldn't retry, because isRepeatable()
 returned false. I went through the code to find (if I'm right, again)
 that there is nothing to prevent the writeRequest() method to be
 called more than one time, every time writing the same result. So my
 proposal is to simply return true so that the HTTPClient may call
 writeRequest() more than once if it fails.

Applied, thank you.


Jochen



-- 
Look, that's why there's rules, understand? So that you think before
you break 'em.

-- (Terry Pratchett, Thief of Time)

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Does XML-RPC support xen kernel Linux

2007-09-03 Thread Jochen Wiedmann
On 9/3/07, Da Shuang He [EMAIL PROTECTED] wrote:

 I try XML RPC on the XEN kernel Linux, but when I call a method via
 XML-RPC, both server and client have no response, but When I restart the
 system to the normal kernel, it works well, so I wonder whether the
 XML-RPC support xen kernel Linux ?

Apart from general network connectivity questions (including use of a
different IP address, bridging, NAT; and stuff like that) I am
absolutely unaware of any problems related to XML-RPC, that might be
related to XEN. Most possibly, your problems lie in the former area.

Jochen


-- 
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Looking for pointers - sorry if posting to wrong group

2007-08-10 Thread Jochen Wiedmann
On 8/10/07, John Harrison [EMAIL PROTECTED] wrote:
 I'm looking for pointers, I am trying to run XML-RPC server through tomcat
 is there any way that the server can get the id of the client that has
 called the request this way or will I have to change the way the server is
 hosted.

What is the id of the client?

Btw, please not, that you aren't subscribed to this mailing list and I
had to approve your posting manually. Please be so kind to subscribe,
otherwise you risk that I miss a posting and it will get lost.

Jochen

-- 
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Vendor extensions

2007-08-03 Thread Jochen Wiedmann
On 8/3/07, Andreas Schlicker [EMAIL PROTECTED] wrote:

 That was what I was suspecting. However, I'm using the xmlrpc-server-3.0.jar
 from the current release. Is there a way for telling the WebServer to use
 XML-RPC 3.0 on the server side?

Use the XML-RPC 3.0 WebServer, of course. Or, even better, use a real
servlet container and the XmlRpcServlet.


-- 
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Vendor extensions

2007-08-02 Thread Jochen Wiedmann
On 8/2/07, Andreas Schlicker [EMAIL PROTECTED] wrote:

 [Fatal Error] :1:1: Content is not allowed in prolog.

Most likely an error on the server side, which causes that the server
returns an HTML page, and not an XML page, as expected.

Use tcpmon, wireshark or a similar tool to trace the servers reply. Or
look for error messages in the servers log file.

Jochen

-- 
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Vendor extensions

2007-08-02 Thread Jochen Wiedmann
On 8/2/07, Andreas Schlicker [EMAIL PROTECTED] wrote:

 As soon as I add config.setGzipCompressing(true); in the client, it doesn't 
 work
 anymore.

Yes, of course. If I read the headers right, then you are using
XML-RPC 1.0 on the server side, which didn't support that feature.

Jochen


-- 
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [jira] Updated: (XMLRPC-132) Enabling the ability for the xml-rpc client to redirect requests

2007-07-23 Thread Jochen Wiedmann

On 7/23/07, COHEN, STEVEN M (ATTSI) [EMAIL PROTECTED] wrote:


java.nio.charset.IllegalCharsetNameException:


No, this looks more like an encoding problem. May be, the server uses
non-ascii characters in headers, or something like that.


--
Besides, manipulating elections is under penalty of law, resulting in
a preventative effect against manipulating elections.

The german government justifying the use of electronic voting machines
and obviously  believing that we don't need a police, because all
illegal actions are forbidden.

http://dip.bundestag.de/btd/16/051/1605194.pdf

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



  1   2   3   4   >