From: <ps...@us...> - 2008-12-10 08:03:24
|
Revision: 1472 http://pywebsvcs.svn.sourceforge.net/pywebsvcs/?rev=1472&view=rev Author: psha Date: 2008-12-10 08:03:17 +0000 (Wed, 10 Dec 2008) Log Message: ----------- Add support for WS-Addressing WSDL Binding Search for Action attributes not only in WSA*.ADDRESS namespaces but also in WSAW*. wsaw is used by Globus Toolkit 4.2+ See http://www.w3.org/TR/ws-addr-wsdl/ for wsaw definition. Modified Paths: -------------- trunk/wstools/Namespaces.py trunk/wstools/WSDLTools.py Modified: trunk/wstools/Namespaces.py =================================================================== --- trunk/wstools/Namespaces.py 2008-12-10 07:57:09 UTC (rev 1471) +++ trunk/wstools/Namespaces.py 2008-12-10 08:03:17 UTC (rev 1472) @@ -183,6 +183,15 @@ WSA = WSA200408 WSA_LIST = (WSA200508, WSA200408, WSA200403, WSA200303) +class _WSAW(str): + """ Define ADDRESS attribute to be compatible with WSA* layout """ + ADDRESS = "" + +WSAW200605 = _WSAW("http://www.w3.org/2006/05/addressing/wsdl") +WSAW200605.ADDRESS = WSAW200605 # Compatibility hack + +WSAW_LIST = (WSAW200605,) + class WSP: POLICY = "http://schemas.xmlsoap.org/ws/2002/12/policy" Modified: trunk/wstools/WSDLTools.py =================================================================== --- trunk/wstools/WSDLTools.py 2008-12-10 07:57:09 UTC (rev 1471) +++ trunk/wstools/WSDLTools.py 2008-12-10 08:03:17 UTC (rev 1472) @@ -11,7 +11,7 @@ import weakref from cStringIO import StringIO -from Namespaces import OASIS, XMLNS, WSA, WSA_LIST, WSRF_V1_2, WSRF +from Namespaces import OASIS, XMLNS, WSA, WSA_LIST, WSAW_LIST, WSRF_V1_2, WSRF from Utility import Collection, CollectionNS, DOM, ElementProxy, basejoin from XMLSchema import XMLSchema, SchemaReader, WSDLToolsAdapter @@ -596,7 +596,7 @@ docs = GetDocumentation(item) msgref = DOM.getAttr(item, 'message') message = ParseQName(msgref, item) - for WSA in WSA_LIST: + for WSA in WSA_LIST + WSAW_LIST: action = DOM.getAttr(item, 'Action', WSA.ADDRESS, None) if action: break operation.setInput(message, name, docs, action) @@ -607,7 +607,7 @@ docs = GetDocumentation(item) msgref = DOM.getAttr(item, 'message') message = ParseQName(msgref, item) - for WSA in WSA_LIST: + for WSA in WSA_LIST + WSAW_LIST: action = DOM.getAttr(item, 'Action', WSA.ADDRESS, None) if action: break operation.setOutput(message, name, docs, action) @@ -617,7 +617,7 @@ docs = GetDocumentation(item) msgref = DOM.getAttr(item, 'message') message = ParseQName(msgref, item) - for WSA in WSA_LIST: + for WSA in WSA_LIST + WSAW_LIST: action = DOM.getAttr(item, 'Action', WSA.ADDRESS, None) if action: break operation.addFault(message, name, docs, action) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |