0
私は扱うことができなければならないことを、以下のSOAPリクエストを持っている:spyneでSOAPリモートプロシージャ属性をモデル化する方法は?
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Body>
<LogoutNotification xmlns="urn:mace:shibboleth:2.0:sp:notify" type="global">
<SessionID>
_d5628602323819f716fcee04103ad5ef
</SessionID>
</LogoutNotification>
</s:Body>
</s:Envelope>
セッションIDは、単にRPCパラメータです。それは簡単に処理できます。
しかし、spyneのtype
属性をどのようにモデル化できますか? type
は「グローバル」または「ローカル」のいずれかです。
私は現在、(単に属性を無視できるようにするには、無効検証)以下を持っています。
class LogoutNotificationService(Service):
@rpc(MandatoryUnicode, _returns=OKType,
_in_variable_names={'sessionid': 'SessionID'},
_out_variable_name='OK',
)
def LogoutNotification(ctx, sessionid):
pass # handle the request
完全を期すために、ここでは使用されたモデルです。
class OKType(ComplexModel):
pass
class MandatoryUnicode(Unicode):
class Attributes(Unicode.Attributes):
nullable = False
min_occurs = 1
スキーマがありますonline。しかし、この属性を含む公式のWSDLはありません。