Closed om26er closed 4 years ago
Here is the related to crossbar config
{
"$schema": "https://raw.githubusercontent.com/crossbario/crossbar/master/crossbar.json",
"version": 2,
"controller": {
},
"workers": [
{
"type": "router",
"realms": [
{
"name": "realm1",
"roles": [
{
"name": "anonymous",
"permissions": [
{
"uri": "",
"match": "prefix",
"allow": {
"call": true,
"register": true,
"publish": true,
"subscribe": true
},
"disclose": {
"caller": false,
"publisher": false
},
"cache": true
}
]
}
]
}
],
"transports": [
{
"type": "websocket",
"endpoint": {
"type": "tcp",
"port": 8089,
"backlog": 1024
}
},
{
"type": "web",
"endpoint": {
"type": "tcp",
"port": 8088,
"backlog": 1024
},
"paths": {
"ws": {
"type": "websocket"
},
"market1": {
"type": "path",
"paths": {
"/": {
"type": "archive",
"archive": "markets-ui.zip",
"origin": "http://localhost:9000/markets-ui.zip"
},
"config": {
"type": "json",
"value": {
"url": "ws://localhost:8080/ws",
"realm": "testing"
}
}
}
}
}
}
]
}
]
}
I looked inside the code, the issue happens here https://github.com/crossbario/crossbar/blob/master/crossbar/webservice/base.py#L357 and it seems create_web_service
doesn't really exist. Something that got missed/removed during a refactor maybe ?
no sure where/when this originates. the removed attribute came from this import:
from crossbar.worker.transport.resource import create_web_service, add_web_services, remove_web_services
so there must have been a resource.py
at some point? but somehow I can't find that ..
fixed via https://github.com/crossbario/crossbar/pull/1780 see https://github.com/crossbario/crossbar-examples/tree/master/webservices/path
to test (above example):
oberstet@intel-nuci7:~/scm/crossbario/crossbar-examples/webservices/path$ make test
(stdin)= 9c86c3c20ad4c9dd46ff53d18e593e25e0d872eed2460eb44344f6f28a042a41
(stdin)= 9c86c3c20ad4c9dd46ff53d18e593e25e0d872eed2460eb44344f6f28a042a41
(stdin)= 9c86c3c20ad4c9dd46ff53d18e593e25e0d872eed2460eb44344f6f28a042a41
(stdin)= efd3112dd986b472fc9260b166a8e27e64f78084f83f4bca61d34810adadefde
(stdin)= 9c86c3c20ad4c9dd46ff53d18e593e25e0d872eed2460eb44344f6f28a042a41
(stdin)= 9c86c3c20ad4c9dd46ff53d18e593e25e0d872eed2460eb44344f6f28a042a41
(stdin)= 1317d0892b0f4297391be9a2b239503bd9fa8fc5d8b06f3ccf36fdec8f42cbb9
(stdin)= 9c86c3c20ad4c9dd46ff53d18e593e25e0d872eed2460eb44344f6f28a042a41
(stdin)= 9c86c3c20ad4c9dd46ff53d18e593e25e0d872eed2460eb44344f6f28a042a41
(stdin)= 301f06d2a426f1e4afd14d2a8f96602411b2425cbcfee47b5202029ead7eefad
(stdin)= 9c86c3c20ad4c9dd46ff53d18e593e25e0d872eed2460eb44344f6f28a042a41
(stdin)= 9c86c3c20ad4c9dd46ff53d18e593e25e0d872eed2460eb44344f6f28a042a41
(stdin)= 82dbb6367aced3f6b1c8ed0240a56a4b8ecddddade392b3eb2393e0e289c2683
(stdin)= 82dbb6367aced3f6b1c8ed0240a56a4b8ecddddade392b3eb2393e0e289c2683
(stdin)= 82dbb6367aced3f6b1c8ed0240a56a4b8ecddddade392b3eb2393e0e289c2683
(stdin)= 82dbb6367aced3f6b1c8ed0240a56a4b8ecddddade392b3eb2393e0e289c2683
(stdin)= 82dbb6367aced3f6b1c8ed0240a56a4b8ecddddade392b3eb2393e0e289c2683
(stdin)= 82dbb6367aced3f6b1c8ed0240a56a4b8ecddddade392b3eb2393e0e289c2683
(stdin)= 82dbb6367aced3f6b1c8ed0240a56a4b8ecddddade392b3eb2393e0e289c2683
(stdin)= 82dbb6367aced3f6b1c8ed0240a56a4b8ecddddade392b3eb2393e0e289c2683
(stdin)= 3ce7faa29cad80f4814fcc0618a257d3d08103d1658af6cf48a52839877cc730
(stdin)= 65a21e590fb89c4a5607645526d4c88ecb5b914440a87917d7ce39a17568d52b
(stdin)= 3ce7faa29cad80f4814fcc0618a257d3d08103d1658af6cf48a52839877cc730
(stdin)= 65a21e590fb89c4a5607645526d4c88ecb5b914440a87917d7ce39a17568d52b
(stdin)= 3ce7faa29cad80f4814fcc0618a257d3d08103d1658af6cf48a52839877cc730
(stdin)= 65a21e590fb89c4a5607645526d4c88ecb5b914440a87917d7ce39a17568d52b
(stdin)= 3ce7faa29cad80f4814fcc0618a257d3d08103d1658af6cf48a52839877cc730
(stdin)= 65a21e590fb89c4a5607645526d4c88ecb5b914440a87917d7ce39a17568d52b
(stdin)= 879b60ca95a98091fc3635779a970da9a19c9aec6de6c0846787e56cef01bf5a
(stdin)= 879b60ca95a98091fc3635779a970da9a19c9aec6de6c0846787e56cef01bf5a
(stdin)= 879b60ca95a98091fc3635779a970da9a19c9aec6de6c0846787e56cef01bf5a
(stdin)= 879b60ca95a98091fc3635779a970da9a19c9aec6de6c0846787e56cef01bf5a
(stdin)= 879b60ca95a98091fc3635779a970da9a19c9aec6de6c0846787e56cef01bf5a
(stdin)= 879b60ca95a98091fc3635779a970da9a19c9aec6de6c0846787e56cef01bf5a
(stdin)= 879b60ca95a98091fc3635779a970da9a19c9aec6de6c0846787e56cef01bf5a
(stdin)= 879b60ca95a98091fc3635779a970da9a19c9aec6de6c0846787e56cef01bf5a
you will notice some hashes don't line up .. the reason is that some of our webservice don't like a trailing "/"
this might be an easy fix somewhere adding a getChild or what - but I'm too tired now to hunt it down;) maybe @meejah has the answer right in his pocket.
in any case, doesn't matter for what we need now ..
Nested paths causes crossbar start failure.