xml_RPC client get a protocole error 302???

View: New views
5 Messages — Rating Filter:   Alert me  

xml_RPC client get a protocole error 302???

by Slim-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello All,
I tried this : http://www.dalkescientific.com/writings/diary/archive/2006/10/24/xmlrpc_in_turbogears.html
and a simple example

import xmlrpclib

server = xmlrpclib.ServerProxy("http://localhost:8080")
print server
res = server.add(2002, 8)
print res

and get a : ProtocolError

I'm newbie can someone explain ?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: xml_RPC client get a protocole error 302???

by Jorge Vargas :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Mon, Sep 29, 2008 at 7:25 AM, Slim <saouinet@...> wrote:

>
> Hello All,
> I tried this : http://www.dalkescientific.com/writings/diary/archive/2006/10/24/xmlrpc_in_turbogears.html
> and a simple example
>
> import xmlrpclib
>
> server = xmlrpclib.ServerProxy("http://localhost:8080")
> print server
> res = server.add(2002, 8)
> print res
>
> and get a : ProtocolError
>
will you give the detailed error?

> I'm newbie can someone explain ?
>
Given that the original article is from 2006 maybe something has
changed in TG that renders the code invalid.

> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: xml_RPC client get a protocole error 302???

by Slim-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Ok the error is :
xmlrpclib.ProtocolError: <ProtocolError for localhost:8080/RPC2: 302
found>

I saw something like this as a decorator:
@export(xml_rpc)

May be I should use it ???




On 29 sep, 16:36, "Jorge Vargas" <jorge.var...@...> wrote:

> On Mon, Sep 29, 2008 at 7:25 AM, Slim <saoui...@...> wrote:
>
> > Hello All,
> > I tried this :http://www.dalkescientific.com/writings/diary/archive/2006/10/24/xmlr...
> > and a simple example
>
> > import xmlrpclib
>
> > server = xmlrpclib.ServerProxy("http://localhost:8080")
> > print server
> > res = server.add(2002, 8)
> > print res
>
> > and get a : ProtocolError
>
> will you give the detailed error?
>
> > I'm newbie can someone explain ?
>
> Given that the original article is from 2006 maybe something has
> changed in TG that renders the code invalid.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: xml_RPC client get a protocole error 302???

by Christopher Arndt :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Slim schrieb:
> Ok the error is :
> xmlrpclib.ProtocolError: <ProtocolError for localhost:8080/RPC2: 302
> found>

When we ask for an error message, we usually mean the *full* error
output, including the traceback and any debug messages that might come
before the error. If it is too long, you can copy-and-paste the error
output at http://paste.turbogears.org and post the link to the resulting
page here.

> I saw something like this as a decorator:
> @export(xml_rpc)

Where did you see it? Please be more specific with your descriptions.

> May be I should use it ???

You could also have a look at TGWebServices:

    http://cheeseshop.python.org/pypi/TGWebServices


Chris

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: xml_RPC client get a protocole error 302???

by Slim-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Sorry, here it is:

Traceback (most recent call last):
  File "xmlclient.py", line 5, in <module>
    res = server.add(2002, 8)
  File "c:\python25\lib\xmlrpclib.py", line 986, in __call__
    marshalled_list = []
  File "c:\python25\lib\xmlrpclib.py", line 1239, in __request
    extra_headers = None
  File "c:\python25\lib\xmlrpclib.py", line 1027, in request

xmlrpclib.ProtocolError: <ProtocolError for localhost:8080/RPC2: 302
Found>


On 29 sep, 17:52, Christopher Arndt <chris.ar...@...> wrote:

> Slim schrieb:
>
> > Ok the error is :
> > xmlrpclib.ProtocolError: <ProtocolError for localhost:8080/RPC2: 302
> > found>
>
> When we ask for an error message, we usually mean the *full* error
> output, including the traceback and any debug messages that might come
> before the error. If it is too long, you can copy-and-paste the error
> output athttp://paste.turbogears.organd post the link to the resulting
> page here.
>
> > I saw something like this as a decorator:
> > @export(xml_rpc)
>
> Where did you see it? Please be more specific with your descriptions.
>
> > May be I should use it ???
>
> You could also have a look at TGWebServices:
>
>    http://cheeseshop.python.org/pypi/TGWebServices
>
> Chris
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

LightInTheBox - Buy quality products at wholesale price!