John Gedik
John Gedik

Reputation: 1

spyne How to get a list of soap action names?

I have two soap applications implementing different, soap actions which I want to route accordingly. How can I get the listing of the soap actions available in my spyne service? Is it available through spyne.interface.xml_schema or Application?

I do not want to hardcode a list of soap actions in my app if possible.

Upvotes: 0

Views: 93

Answers (2)

John Gedik
John Gedik

Reputation: 1

Thanks this helped. I used soap_actions = {k.split("}")[1] for k in spyne_app.interface.service_method_map.keys()}

Upvotes: 0

Burak Arslan
Burak Arslan

Reputation: 8001

You should look inside the Interface class.

I think you can use ctx.app.interface.method_id_map

If it doesn't help you, try one of the members initialized here:

https://github.com/arskom/spyne/blob/4ae0653e1e426e8c2ee4e3044bb85d5b48c8c10b/spyne/interface/_base.py#L65

Upvotes: 0

Related Questions