Autobahn/Python - What is the correct way to register methods for RPC on a callee?

#1

Hi All,

I try to build a RPC service using autobahn by registering a set of methods that belong to several objects.

Here is the high level concept explained in pseudo code:

service = CompositeService()

service.addService(ImageDeliveryService())

service.addService(MouseManagementService())
service.addService(WebGLDeliveryService())

service.start()

Where a service could look like that

class ImageDeliveryService(object):

@rpc(“my.method.stillRender”)

def stillRender(self, options):

Some random code

pass

And what should happen at start time (or onJoin() like I currently try to do:

class CompositeService(autobahn.twisted.wamp.ApplicationSession):

[…]

def _register_internal(self, obj):

for k in inspect.getmembers(obj.class, inspect.ismethod):

if k[1].dict.has_key("_vtk_wamp_uri"):

for methodURI in k[1].dict["_vtk_wamp_uri"]:

uri = methodURI

fn = k[1]

endpoint = autobahn.wamp.protocol.Endpoint(obj, fn, uri)

self.register(endpoint) # <----------------------------------------------------------- Does not seems to do what it is supposed to do

def onJoin(self, details):

ApplicationSession.onJoin(self, details)

self._register_internal(self)

for service in self.service_list:

self._register_internal(service)

@rpc(“my.method.exit”)

def exit(self):

reactor.stop()

And something like that was working perfectly under WAMP v1.

But with WAMP v2, once I’ve updated the Autobahn/JS client, I get the following server error when those method get called.

org.vtk.stillRender => call with invalid procedure URI ‘org.vtk.stillRender’

org.vtk.exit => no procedure ‘org.vtk.exit’ registered

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] RX Frame from 127.0.0.1:56874 : fin = True, rsv = 0, opcode = 1, mask = 3ce1797f, length = 348, payload = [1,“vtkweb”,{“roles”:{“caller”:{“features”:{“caller_identification”:true,“progressive_call_results”:true}},“callee”:{“features”:{“progressive_call_results”:true}},“publisher”:{“features”:{“subscriber_blackwhite_listing”:true,“publisher_exclusion”:true,“publisher_identification”:true}},“subscriber”:{“features”:{“publisher_identification”:true}}}}]

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] RX WAMP HELLO Message (realm = vtkweb, roles = [<autobahn.wamp.role.RoleSubscriberFeatures instance at 0x119cab638>, <autobahn.wamp.role.RolePublisherFeatures instance at 0x119cab680>, <autobahn.wamp.role.RoleCallerFeatures instance at 0x119cab6c8>, <autobahn.wamp.role.RoleCalleeFeatures instance at 0x119cab710>], authmethods = None)

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] TX WAMP WELCOME Message (session = 1785045083844384, roles = [<autobahn.wamp.role.RoleBrokerFeatures instance at 0x1152b4488>, <autobahn.wamp.role.RoleDealerFeatures instance at 0x1152b4518>], authid = None, authrole = None, authmethod = None)

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] TX Frame to 127.0.0.1:56874 : fin = True, rsv = 0, opcode = 1, mask = -, length = 237, repeat_length = None, chopsize = None, sync = False, payload = [2,1785045083844384,{“roles”:{“broker”:{“features”:{“publisher_identification”:true,“publisher_exclusion”:true,“subscriber_blackwhite_listing”:true}},“dealer”:{“features”:{“progressive_call_results”:true,“caller_identification”:true}}}}]

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] RX Frame from 127.0.0.1:56874 : fin = True, rsv = 0, opcode = 1, mask = 4aed16d2, length = 128, payload = [48,1355954912343022,{},“org.vtk.stillRender”,[{“size”:[1231,602],“view”:-1,“mtime”:0,“quality”:100,“localTime”:1402695945561}]]

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] RX WAMP CALL Message (request = 1355954912343022, procedure = org.vtk.stillRender, args = [{u’quality’: 100, u’view’: -1, u’mtime’: 0, u’localTime’: 1402695945561, u’size’: [1231, 602]}], kwargs = None, timeout = None, receive_progress = None, discloseMe = None)

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] TX WAMP Error Message (request_type = 64, request = 1355954912343022, error = wamp.error.invalid_uri, args = [“call with invalid procedure URI ‘org.vtk.stillRender’”], kwargs = None)

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] TX Frame to 127.0.0.1:56874 : fin = True, rsv = 0, opcode = 1, mask = -, length = 109, repeat_length = None, chopsize = None, sync = False, payload = [8,64,1355954912343022,{},“wamp.error.invalid_uri”,[“call with invalid procedure URI ‘org.vtk.stillRender’”]]

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] RX Frame from 127.0.0.1:56874 : fin = True, rsv = 0, opcode = 1, mask = 2f14d37c, length = 39, payload = [48,6358115348966988,{},“org.vtk.exit”]

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] RX WAMP CALL Message (request = 6358115348966988, procedure = org.vtk.exit, args = None, kwargs = None, timeout = None, receive_progress = None, discloseMe = None)

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] TX WAMP Error Message (request_type = 48, request = 6358115348966988, error = wamp.error.no_such_procedure, args = [“no procedure ‘org.vtk.exit’ registered”], kwargs = None)

2014-06-13 15:45:45-0600 [HTTPChannel,6,127.0.0.1] TX Frame to 127.0.0.1:56874 : fin = True, rsv = 0, opcode = 1, mask = -, length = 100, repeat_length = None, chopsize = None, sync = False, payload = [8,48,6358115348966988,{},“wamp.error.no_such_procedure”,[“no procedure ‘org.vtk.exit’ registered”]]

So my question is:

==> What is the correct way to register methods for RPC call on a callee?

I could not use the wamp annotation as when I was importing the module that contains all the classes that have annotated methods, the autobahn.wamp.uri.Pattern was throwing the “Invalid URI” exception at line 106.

So I made my own annotation and managed it myself. But now I’m stuck.

Help please… :wink:

Thanks and have a great weekend.

Seb

0 Likes

#2

You can use decorators, and you can use those also combined with a call to register() on a complete object with multiple decorated methods.

Have a look at this:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38

and something in this direction:

class ImageDeliveryService:

    @wamp.procedure('com.mathservice.add2')
    def add2(self, a, b):
       return a + b

class CompositeService(ApplicationSession):

    def __init__(self, config):
       ApplicationSession.__init__(self, config)
       self._services = []

    def addService(self, service):
       self._services.append(service)

    def onJoin(self, details):
       for svc in self._services:
          self.register(svc)

···

Am 14.06.2014 00:10, schrieb Sebastien Jourdain:

Hi All,

I try to build a RPC service using autobahn by registering a set of
methods that belong to several objects.

Here is the high level concept explained in pseudo code:

service = CompositeService()
service.addService(ImageDeliveryService())
service.addService(MouseManagementService())
service.addService(WebGLDeliveryService())
service.start()

Where a service could look like that

class ImageDeliveryService(object):

     @rpc("my.method.stillRender")
     def stillRender(self, options):
          # Some random code
          pass

And what should happen at start time (or onJoin() like I currently try
to do:

0 Likes

#3

Hi Tobias,

thanks for your feedback but what you are suggesting is precisely what I did in the first place.

Basically if the service classes are defined inside a different module, when I import that module

the annotation generates an exception like I was explaining below.

I could not use the wamp annotation as when I was importing the module that contains all

the classes that have annotated methods, the autobahn.wamp.uri.Pattern was throwing

the “Invalid URI” exception at line 106.

And when I was managing my own registration, I couldn’t understand why the server was complaining with the following issue when the call was made by a client (JS).

org.vtk.stillRender => call with invalid procedure URI ‘org.vtk.stillRender’

org.vtk.exit => no procedure ‘org.vtk.exit’ registered

Any thoughts or idea would be great…

Thanks,

Seb

PS: I’m not using master just the latest release tag.

···

On Saturday, June 14, 2014 3:04:06 AM UTC-6, Tobias Oberstein wrote:

Am 14.06.2014 00:10, schrieb Sebastien Jourdain:

Hi All,

I try to build a RPC service using autobahn by registering a set of

methods that belong to several objects.

Here is the high level concept explained in pseudo code:

service = CompositeService()

service.addService(ImageDeliveryService())

service.addService(MouseManagementService())

service.addService(WebGLDeliveryService())

service.start()

Where a service could look like that

class ImageDeliveryService(object):

 @rpc("my.method.stillRender")
 def stillRender(self, options):
      # Some random code
      pass

And what should happen at start time (or onJoin() like I currently try

to do:

You can use decorators, and you can use those also combined with a call
to register() on a complete object with multiple decorated methods.

Have a look at this:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38

and something in this direction:

class ImageDeliveryService:

@wamp.procedure('com.mathservice.add2')

def add2(self, a, b):

   return a + b

class CompositeService(ApplicationSession):

def __init__(self, config):

   ApplicationSession.__init__(self, config)

   self._services = []



def addService(self, service):

   self._services.append(service)



def onJoin(self, details):

   for svc in self._services:

      self.register(svc)
0 Likes

#4

Hi Tobias,

thanks for your feedback but what you are suggesting is precisely what I
did in the first place.

Well, it works for me:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py

oberstet@COREI7 ~/scm/tavendo/autobahn/AutobahnPython/examples/twisted/wamp/basic (master)
$ make s8
PYTHONPATH=../../../../autobahn python server.py --component "rpc.decorators.backend.Component"
Ok, registered procedure on <rpc.decorators.backend.Component instance at 0x0300F198> with registration ID 8721557701242
622
Ok, registered procedure on <rpc.decorators.backend.Component instance at 0x0300F198> with registration ID 5018642870241
1
Ok, registered procedure on <rpc.decorators.backend.MyService1 instance at 0x0300F418> with registration ID 839832363415
8935
Ok, registered procedure on <rpc.decorators.backend.MyService1 instance at 0x0300F418> with registration ID 884877581214
4253

oberstet@COREI7 ~/scm/tavendo/autobahn/AutobahnPython/examples/twisted/wamp/basic (master)
$ make f8
PYTHONPATH=../../../../autobahn python client.py --component "rpc.decorators.frontend.Component"
com.mathservice.add2: 5
com.mathservice.mul2: 6
com.mathservice.square2: 13
com.mathservice.div2: 0.666666666667

···

Am 15.06.2014 05:15, schrieb Sebastien Jourdain:

Basically if the service classes are defined inside a different module,
when I import that module
the annotation generates an exception like I was explaining below.

> I could not use the wamp annotation as when I was importing the
module that contains all
> the classes that have annotated methods, the
autobahn.wamp.uri.Pattern was throwing
> the "Invalid URI" exception at line 106.

And when I was managing my own registration, I couldn't understand why
the server was complaining with the following issue when the call was
made by a client (JS).

org.vtk.stillRender => call with invalid procedure URI 'org.vtk.stillRender'
org.vtk.exit => no procedure 'org.vtk.exit' registered

Any thoughts or idea would be great...

Thanks,

Seb

PS: I'm not using master just the latest release tag.

On Saturday, June 14, 2014 3:04:06 AM UTC-6, Tobias Oberstein wrote:

    Am 14.06.2014 00:10, schrieb Sebastien Jourdain:
     > Hi All,
     >
     > I try to build a RPC service using autobahn by registering a set of
     > methods that belong to several objects.
     >
     > Here is the high level concept explained in pseudo code:
     >
     > service = CompositeService()
     > service.addService(ImageDeliveryService())
     > service.addService(MouseManagementService())
     > service.addService(WebGLDeliveryService())
     > service.start()
     >
     > Where a service could look like that
     >
     > class ImageDeliveryService(object):
     >
     > @rpc("my.method.stillRender")
     > def stillRender(self, options):
     > # Some random code
     > pass
     >
     > And what should happen at start time (or onJoin() like I
    currently try
     > to do:

    You can use decorators, and you can use those also combined with a call
    to register() on a complete object with multiple decorated methods.

    Have a look at this:

    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38>

    and something in this direction:

    class ImageDeliveryService:

         @wamp.procedure('com.mathservice.add2')
         def add2(self, a, b):
            return a + b

    class CompositeService(ApplicationSession):

         def __init__(self, config):
            ApplicationSession.__init__(self, config)
            self._services = []

         def addService(self, service):
            self._services.append(service)

         def onJoin(self, details):
            for svc in self._services:
               self.register(svc)

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com
<mailto:autobahnws+...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

0 Likes

#5

Thanks Tobias,

I’ve finally managed to understand why the @wamp.procedure(‘xxx’) was not working with my existing service set.

And why I was getting that (“Invalid URI” exception at line 106).

The reason was that I was using camel case name inside that annotation. Which does not seems to be supported.

I don’t know if it is expected or not.

Just wanted to give some feedback regarding the issue that I was facing. Hopefully that could help someone else…

Seb

···

On Sunday, June 15, 2014 9:46:49 AM UTC-6, Tobias Oberstein wrote:

Am 15.06.2014 05:15, schrieb Sebastien Jourdain:

Hi Tobias,

thanks for your feedback but what you are suggesting is precisely what I

did in the first place.

Well, it works for me:

https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py

oberstet@COREI7
~/scm/tavendo/autobahn/AutobahnPython/examples/twisted/wamp/basic (master)

$ make s8

PYTHONPATH=…/…/…/…/autobahn python server.py --component
“rpc.decorators.backend.Component”

Ok, registered procedure on <rpc.decorators.backend.Component instance
at 0x0300F198> with registration ID 8721557701242

622

Ok, registered procedure on <rpc.decorators.backend.Component instance
at 0x0300F198> with registration ID 5018642870241

1

Ok, registered procedure on <rpc.decorators.backend.MyService1 instance
at 0x0300F418> with registration ID 839832363415

8935

Ok, registered procedure on <rpc.decorators.backend.MyService1 instance
at 0x0300F418> with registration ID 884877581214

4253

oberstet@COREI7
~/scm/tavendo/autobahn/AutobahnPython/examples/twisted/wamp/basic (master)

$ make f8

PYTHONPATH=…/…/…/…/autobahn python client.py --component
“rpc.decorators.frontend.Component”

com.mathservice.add2: 5

com.mathservice.mul2: 6

com.mathservice.square2: 13

com.mathservice.div2: 0.666666666667

Basically if the service classes are defined inside a different module,

when I import that module

the annotation generates an exception like I was explaining below.

I could not use the wamp annotation as when I was importing the

module that contains all

the classes that have annotated methods, the

autobahn.wamp.uri.Pattern was throwing

the “Invalid URI” exception at line 106.

And when I was managing my own registration, I couldn’t understand why

the server was complaining with the following issue when the call was

made by a client (JS).

org.vtk.stillRender => call with invalid procedure URI ‘org.vtk.stillRender’

org.vtk.exit => no procedure ‘org.vtk.exit’ registered

Any thoughts or idea would be great…

Thanks,

Seb

PS: I’m not using master just the latest release tag.

On Saturday, June 14, 2014 3:04:06 AM UTC-6, Tobias Oberstein wrote:

Am 14.06.2014 00:10, schrieb Sebastien Jourdain:
 > Hi All,
 >
 > I try to build a RPC service using autobahn by registering a set of
 > methods that belong to several objects.
 >
 > Here is the high level concept explained in pseudo code:
 >
 > service = CompositeService()
 > service.addService(ImageDeliveryService())
 > service.addService(MouseManagementService())
 > service.addService(WebGLDeliveryService())
 > service.start()
 >
 > Where a service could look like that
 >
 > class ImageDeliveryService(object):
 >
 >      @rpc("my.method.stillRender")
 >      def stillRender(self, options):
 >           # Some random code
 >           pass
 >
 > And what should happen at start time (or onJoin() like I
currently try
 > to do:
You can use decorators, and you can use those also combined with a call
to register() on a complete object with multiple decorated methods.
Have a look at this:
[https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38](https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38)
<[https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38](https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38)>
and something in this direction:
class ImageDeliveryService:
     @wamp.procedure('com.mathservice.add2')
     def add2(self, a, b):
        return a + b
class CompositeService(ApplicationSession):
     def __init__(self, config):
        ApplicationSession.__init__(self, config)
        self._services = []
     def addService(self, service):
        self._services.append(service)
     def onJoin(self, details):
        for svc in self._services:
           self.register(svc)

You received this message because you are subscribed to the Google

Groups “Autobahn” group.

To unsubscribe from this group and stop receiving emails from it, send

an email to autobahnws+...@googlegroups.com

mailto:autobahnws+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes

#6

Thanks Tobias,

I've finally managed to understand why the @wamp.procedure('xxx') was
not working with my existing service set.
And why I was getting that ("Invalid URI" exception at line 106).

Ah, ok. Good!

The reason was that I was using camel case name inside that annotation.
Which does not seems to be supported.
I don't know if it is expected or not.

This is expected: by default, URIs are checked against a very restrictive patterns - lower-case only.

You can provide options when creating the Router

https://github.com/tavendo/AutobahnPython/blob/master/autobahn/autobahn/wamp/router.py#L46

and

https://github.com/tavendo/AutobahnPython/blob/master/autobahn/autobahn/wamp/types.py#L33

which will determine which one of the following patterns is in use:

https://github.com/tavendo/AutobahnPython/blob/master/autobahn/autobahn/wamp/message.py#L58

for checking URIs.

Sorry for the inconvenience,

/Tobias

···

Am 16.06.2014 18:05, schrieb Sebastien Jourdain:

Just wanted to give some feedback regarding the issue that I was facing.
Hopefully that could help someone else...

Seb

On Sunday, June 15, 2014 9:46:49 AM UTC-6, Tobias Oberstein wrote:

    Am 15.06.2014 05:15, schrieb Sebastien Jourdain:
     > Hi Tobias,
     >
     > thanks for your feedback but what you are suggesting is precisely
    what I
     > did in the first place.

    Well, it works for me:

    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py>

    oberstet@COREI7
    ~/scm/tavendo/autobahn/AutobahnPython/examples/twisted/wamp/basic
    (master)
    $ make s8
    PYTHONPATH=../../../../autobahn python server.py --component
    "rpc.decorators.backend.Component"
    Ok, registered procedure on <rpc.decorators.backend.Component instance
    at 0x0300F198> with registration ID 8721557701242
    622
    Ok, registered procedure on <rpc.decorators.backend.Component instance
    at 0x0300F198> with registration ID 5018642870241
    1
    Ok, registered procedure on <rpc.decorators.backend.MyService1 instance
    at 0x0300F418> with registration ID 839832363415
    8935
    Ok, registered procedure on <rpc.decorators.backend.MyService1 instance
    at 0x0300F418> with registration ID 884877581214
    4253

    oberstet@COREI7
    ~/scm/tavendo/autobahn/AutobahnPython/examples/twisted/wamp/basic
    (master)
    $ make f8
    PYTHONPATH=../../../../autobahn python client.py --component
    "rpc.decorators.frontend.Component"
    com.mathservice.add2: 5
    com.mathservice.mul2: 6
    com.mathservice.square2: 13
    com.mathservice.div2: 0.666666666667

     >
     > Basically if the service classes are defined inside a different
    module,
     > when I import that module
     > the annotation generates an exception like I was explaining below.
     >
     > > I could not use the wamp annotation as when I was importing the
     > module that contains all
     > > the classes that have annotated methods, the
     > autobahn.wamp.uri.Pattern was throwing
     > > the "Invalid URI" exception at line 106.
     >
     > And when I was managing my own registration, I couldn't
    understand why
     > the server was complaining with the following issue when the call
    was
     > made by a client (JS).
     >
     > org.vtk.stillRender => call with invalid procedure URI
    'org.vtk.stillRender'
     > org.vtk.exit => no procedure 'org.vtk.exit' registered
     >
     > Any thoughts or idea would be great...
     >
     > Thanks,
     >
     > Seb
     >
     > PS: I'm not using master just the latest release tag.
     >
     > On Saturday, June 14, 2014 3:04:06 AM UTC-6, Tobias Oberstein wrote:
     >
     > Am 14.06.2014 00:10, schrieb Sebastien Jourdain:
     > > Hi All,
     > >
     > > I try to build a RPC service using autobahn by registering
    a set of
     > > methods that belong to several objects.
     > >
     > > Here is the high level concept explained in pseudo code:
     > >
     > > service = CompositeService()
     > > service.addService(ImageDeliveryService())
     > > service.addService(MouseManagementService())
     > > service.addService(WebGLDeliveryService())
     > > service.start()
     > >
     > > Where a service could look like that
     > >
     > > class ImageDeliveryService(object):
     > >
     > > @rpc("my.method.stillRender")
     > > def stillRender(self, options):
     > > # Some random code
     > > pass
     > >
     > > And what should happen at start time (or onJoin() like I
     > currently try
     > > to do:
     >
     > You can use decorators, and you can use those also combined
    with a call
     > to register() on a complete object with multiple decorated
    methods.
     >
     > Have a look at this:
     >
    https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38>

     >
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38
    <https://github.com/tavendo/AutobahnPython/blob/master/examples/twisted/wamp/basic/rpc/decorators/backend.py#L38>>

     >
     > and something in this direction:
     >
     > class ImageDeliveryService:
     >
     > @wamp.procedure('com.mathservice.add2')
     > def add2(self, a, b):
     > return a + b
     >
     > class CompositeService(ApplicationSession):
     >
     > def __init__(self, config):
     > ApplicationSession.__init__(self, config)
     > self._services = []
     >
     > def addService(self, service):
     > self._services.append(service)
     >
     > def onJoin(self, details):
     > for svc in self._services:
     > self.register(svc)
     >
     > --
     > You received this message because you are subscribed to the Google
     > Groups "Autobahn" group.
     > To unsubscribe from this group and stop receiving emails from it,
    send
     > an email to autobah...@googlegroups.com <javascript:>
     > <mailto:autobahnws+...@googlegroups.com <javascript:>>.
     > For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.

--
You received this message because you are subscribed to the Google
Groups "Autobahn" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com
<mailto:autobahnws+...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

0 Likes

#7

I was using camel case name inside that annotation. Which does not seems to be supported.

This is expected: by default, URIs are checked against a very
restrictive patterns - lower-case only.

Is there a reason for that restriction? I’m trying to port an application that exposes some C++ functions through Python to a JS web client. Changing the names of these is not an option, and currently I am using a helper to create the bindings by simply passing a list of methods to be exported as RPC’s, so manually renaming each one is going to be painful (not to mention that all of my existing JS code would need to change also).

You can provide options when creating the Router

This doesn’t seem to help. I’m getting exceptions just when the class is defined, before I’ve even set up a router¹:

Traceback:
“/path/to/my/package/init.py”, line 1
“/path/to/my/package/Server.py”, line 41 # This is the ‘class WebProtocol’
“/path/to/my/package/Server.py”, line 114 # This is the ‘@register

(¹ …which I know to be the case because that code (my end) is currently broken.)

···

On Monday, June 16, 2014 at 5:37:27 PM UTC-4, Tobias Oberstein wrote:

Am 16.06.2014 18:05, schrieb Sebastien Jourdain:


Matthew

0 Likes