Browse Source

----------------------------------------------------------------------

Modified Files:
 	WSDLTools.py -- couple bug fixes for determining default
              wsa:Action values
 ----------------------------------------------------------------------
main
Joshua Boverhof 20 years ago
parent
commit
717c953783
1 changed files with 10 additions and 5 deletions
  1. +10
    -5
      WSDLTools.py

+ 10
- 5
WSDLTools.py View File

@@ -1014,9 +1014,12 @@ def GetWSAActionInput(operation):
attr = operation.input.action attr = operation.input.action
if attr is not None: if attr is not None:
return attr 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('/'): if targetNamespace.endswith('/'):
return '%s%s/%s' %(targetNamespace, ptName, msgName) return '%s%s/%s' %(targetNamespace, ptName, msgName)
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.""" """Find wsa:Action attribute, and return value or the default."""
attr = operation.output.action attr = operation.output.action
if attr is not None: if attr is not None:
return attr.value
return attr
targetNamespace = operation.getPortType().getWSDL().targetNamespace targetNamespace = operation.getPortType().getWSDL().targetNamespace
ptName = operation.getPortType().name ptName = operation.getPortType().name
msgName = operation.getOutputMessage().name
msgName = operation.output.name
if not msgName:
msgName = operation.name + 'Response'
if targetNamespace.endswith('/'): if targetNamespace.endswith('/'):
return '%s%s/%s' %(targetNamespace, ptName, msgName) return '%s%s/%s' %(targetNamespace, ptName, msgName)
return '%s/%s/%s' %(targetNamespace, ptName, msgName) return '%s/%s/%s' %(targetNamespace, ptName, msgName)


Loading…
Cancel
Save