---------- Forwarded message ----------
From: Colleen Ross <[email protected]>
Date: Tue, Jul 2, 2013 at 1:45 PM
Subject: spyne-- multiple namespaces in one app?
To: [email protected]
Cc: Dustin Knie <[email protected]>


Note: please bear with me as I'm very new to spyne/soap/etc. Hopefully my
coworker (also working on this issue, I've cc-ed him) will correct me if I
say something incorrectly.

Is there a way/what would be the best way to use multiple namespaces on one
app?

we're attempting to use spyne with django, so our urls.py looks
approximately like:

urlpatterns = patterns('',
    url(r'^servicex/subservicea', 'path.to.our.service.service_a'),
)

(i.e. one url)

and our views.py looks like:

app1 = Application([SubserviceA],
    "http://www.someurl.com/schema/sub_service_a_blah";,
    in_protocol=Soap11(),
    out_protocol=Soap11(),
)

app2 = Application([SubserviceB],
    "http://www.someurl.com/schema/sub_service_b_blah";,
    in_protocol=Soap11(),
    out_protocol=Soap11(),
)

app3 = Application([SubserviceC],
    "http://www.someurl.com/schema/sub_service_c_blah";,
    in_protocol=Soap11(),
    out_protocol=Soap11(),
)

our_service = csrf_exempt(DjangoApplication(app1))

of course, if we then try to hit something with namespace
sub_service_b_blah, everything falls over because those methods aren't a
part of that app.

so we'd like to have something like

app1 = Application([SubserviceA, SubserviceB, SubserviceC],
    ["http://www.someurl.com/schema/sub_service_a_blah";,
    "http://www.someurl.com/schema/sub_service_b_blah";,
    "http://www.someurl.com/schema/sub_service_c_blah";],
    in_protocol=Soap11(),
    out_protocol=Soap11(),
)



How would we go about this? Best idea we have at the moment is to listen
for wsgi_call or wsgi_exception and somehow?? redirect?? based on the
namespace in the request??

Please let me know if you need more information! Thank you so much for any
direction you can give!
_______________________________________________
Soap mailing list
[email protected]
http://mail.python.org/mailman/listinfo/soap

Reply via email to