From 717c9537839cf2655e5eb151c8cd820c699ea538 Mon Sep 17 00:00:00 2001 From: Joshua Boverhof Date: Sat, 5 Jun 2004 18:30:37 +0000 Subject: [PATCH] ---------------------------------------------------------------------- Modified Files: WSDLTools.py -- couple bug fixes for determining default wsa:Action values ---------------------------------------------------------------------- --- WSDLTools.py | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/WSDLTools.py b/WSDLTools.py index d0fcdba..fa41e17 100755 --- a/WSDLTools.py +++ b/WSDLTools.py @@ -1014,9 +1014,12 @@ def GetWSAActionInput(operation): attr = operation.input.action if attr is not None: return attr - targetNamespace = operation.getPortType().getWSDL().targetNamespace - ptName = operation.getPortType().name - msgName = operation.getInputMessage().name + portType = operation.getPortType() + targetNamespace = portType.getWSDL().targetNamespace + ptName = portType.name + msgName = operation.input.name + if not msgName: + msgName = operation.name + 'Request' if targetNamespace.endswith('/'): return '%s%s/%s' %(targetNamespace, ptName, msgName) return '%s/%s/%s' %(targetNamespace, ptName, msgName) @@ -1025,10 +1028,12 @@ def GetWSAActionOutput(operation): """Find wsa:Action attribute, and return value or the default.""" attr = operation.output.action if attr is not None: - return attr.value + return attr targetNamespace = operation.getPortType().getWSDL().targetNamespace ptName = operation.getPortType().name - msgName = operation.getOutputMessage().name + msgName = operation.output.name + if not msgName: + msgName = operation.name + 'Response' if targetNamespace.endswith('/'): return '%s%s/%s' %(targetNamespace, ptName, msgName) return '%s/%s/%s' %(targetNamespace, ptName, msgName)