Browse Source

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.
main
Pavel Shramov 16 years ago
parent
commit
5462c56170
2 changed files with 13 additions and 4 deletions
  1. +9
    -0
      Namespaces.py
  2. +4
    -4
      WSDLTools.py

+ 9
- 0
Namespaces.py View File

@@ -183,6 +183,15 @@ class WSA200303:
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"



+ 4
- 4
WSDLTools.py View File

@@ -11,7 +11,7 @@ ident = "$Id$"

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 @@ class PortType(Element):
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 @@ class PortType(Element):
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 @@ class PortType(Element):
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)


Loading…
Cancel
Save