Ticket #323 (closed defect: invalid)

Opened 2 months ago

Last modified 2 months ago

Issue with expose_request and TwistedGateway

Reported by: thijs Owned by: nick
Priority: major Milestone: 0.5
Component: Gateway Version: 0.3.1
Keywords: Cc:

Description

The default expose_request param for the TwistedGateway is True. But for some reason setting this value to False, and exposing the request on a single method throws this error with the attached server and client:

$ python client.py 
2008-06-29 20:26:41,826 INFO  [pyamf.remoting.client.RemotingService.0xbb9410] Creating connection to http://localhost:8080
2008-06-29 20:26:41,827 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Adding request example.testn('Hello World',)
2008-06-29 20:26:41,827 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Executing single request: /1
2008-06-29 20:26:41,827 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] AMF version: 0
2008-06-29 20:26:41,827 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Client type: 0
2008-06-29 20:26:41,829 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Sending POST request to 
2008-06-29 20:26:41,831 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Waiting for response...
2008-06-29 20:26:41,864 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Got response status = 200
2008-06-29 20:26:41,865 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Content-Type = application/x-amf
2008-06-29 20:26:41,871 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Content-Length = 222
2008-06-29 20:26:41,871 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Read 222 bytes for the response
2008-06-29 20:26:41,873 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Response = <Envelope amfVersion=0 clientType=0>
 (u'/1', <Response status=/onStatus><ErrorFault level=error code=TypeError description=exposedRequest() takes exactly 2 arguments (1 given)></Response>)
</Envelope>
2008-06-29 20:26:41,874 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Removing request: /1
<ErrorFault level=error code=TypeError description=exposedRequest() takes exactly 2 arguments (1 given)>
2008-06-29 20:26:41,874 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Adding request example.add('user1234', 'John Doe', 'secret')
2008-06-29 20:26:41,875 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Executing single request: /2
2008-06-29 20:26:41,875 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] AMF version: 0
2008-06-29 20:26:41,875 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Client type: 0
2008-06-29 20:26:41,876 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Sending POST request to 
2008-06-29 20:26:41,876 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Waiting for response...
2008-06-29 20:26:41,888 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Got response status = 200
2008-06-29 20:26:41,888 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Content-Type = application/x-amf
2008-06-29 20:26:41,888 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Content-Length = 222
2008-06-29 20:26:41,888 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Read 222 bytes for the response
2008-06-29 20:26:41,889 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Response = <Envelope amfVersion=0 clientType=0>
 (u'/2', <Response status=/onStatus><ErrorFault level=error code=TypeError description=exposedRequest() takes exactly 2 arguments (1 given)></Response>)
</Envelope>
2008-06-29 20:26:41,890 DEBUG [pyamf.remoting.client.RemotingService.0xbb9410] Removing request: /2
<ErrorFault level=error code=TypeError description=exposedRequest() takes exactly 2 arguments (1 given)>

Attachments

client.py (370 bytes) - added by thijs 2 months ago.
server.py (4.3 kB) - added by thijs 2 months ago.

Change History

Changed 2 months ago by thijs

Changed 2 months ago by thijs

Changed 2 months ago by thijs

  • status changed from new to closed
  • resolution set to invalid

It was a programming error, I attached the updated and working server and marking this ticket as invalid.

Note: See TracTickets for help on using tickets.