You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@ws.apache.org by Inaki Ortiz <In...@sciops.esa.int> on 2006/04/11 10:33:07 UTC

How to set HttpTransportFactory to XMLRpcClient

Dear All,

I was just following the basic instructions on how to set up a
XmlRpcClient 

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

when I realized that both XmlRpcCommonsTransportFactory and
XmlRpcLiteHttpTransportFactory requires the XmlRpcClient instance as an
argument to their constructors. However, the sample code present in the
web pages suggests to set the factory in this way:

 client.setTransportFactory(new XmlRpcCommonsTransportFactory());

So, what do I have to do? Pass the client instance to the factory
constructor and then set the factory to the client instance? This would
led to a code like this

 client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));

A little bit bizarre, isn't it? I wonder if it would it be sufficient to
pass the client instance to the factory constructor like this

 new XmlRpcCommonsTransportFactory(client);


Many thanks in advance

--
IƱaki



Re: How to set HttpTransportFactory to XMLRpcClient

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 4/11/06, Inaki Ortiz <In...@sciops.esa.int> wrote:

> I did not mean to be offensive when calling it "bizarre" :-(

I didn't understand it to be offensive. I simply could not follow. :-)

--
Whenever you find yourself on the side of the
majority, it is time to pause and reflect.
(Mark Twain)

Re: How to set HttpTransportFactory to XMLRpcClient

Posted by Inaki Ortiz <In...@sciops.esa.int>.
My apologies, Jochen

I did not mean to be offensive when calling it "bizarre" :-(

Many thanks for your quick reply.

--
Inaki

On Tue, 2006-04-11 at 10:40 +0200, Jochen Wiedmann wrote:
> On 4/11/06, Inaki Ortiz <In...@sciops.esa.int> wrote:
> 
> > So, what do I have to do? Pass the client instance to the factory
> > constructor and then set the factory to the client instance? This would
> > led to a code like this
> >
> >  client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));
> 
> I see that the docs require updates. However, I can't follow you in
> calling the above "bizarre". To me, this is simply a consequence of
> using "final" as much as possible.
> 
> Jochen
> 
> --
> Whenever you find yourself on the side of the
> majority, it is time to pause and reflect.
> (Mark Twain)
> 


Re: How to set HttpTransportFactory to XMLRpcClient

Posted by Jochen Wiedmann <jo...@gmail.com>.
On 4/11/06, Inaki Ortiz <In...@sciops.esa.int> wrote:

> So, what do I have to do? Pass the client instance to the factory
> constructor and then set the factory to the client instance? This would
> led to a code like this
>
>  client.setTransportFactory(new XmlRpcCommonsTransportFactory(client));

I see that the docs require updates. However, I can't follow you in
calling the above "bizarre". To me, this is simply a consequence of
using "final" as much as possible.

Jochen

--
Whenever you find yourself on the side of the
majority, it is time to pause and reflect.
(Mark Twain)