Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

does it support multiple return values? #1396

Open
jeffery9 opened this issue Oct 27, 2023 · 1 comment
Open

does it support multiple return values? #1396

jeffery9 opened this issue Oct 27, 2023 · 1 comment

Comments

@jeffery9
Copy link

Please keep the issues that real bug reports only. Please request help/support on a relevant channel like stackoverflow. This issue will most likely be closed.

Doese Zeep support soap web services return multiple values?
Can add this feature into tests case?

thanks.

@jeffery9 jeffery9 changed the title does it support multiplie return values? does it support multiple return values? Oct 27, 2023
@jeffery9
Copy link
Author

great. have do a test, it support this features.

from zeep import Client

wsdl ='http://127.0.0.1:8000/?wsdl'

client = Client(wsdl=wsdl)

func = client.service.add_and_multiply
# add_and_multiply(num1: xsd:integer, num2: xsd:integer) -> add_and_multiplyResult0: xsd:integer, add_and_multiplyResult1: xsd:integer, add_and_multiplyResult2: xsd:string

repl = func(1,2)

print(repl.add_and_multiplyResult0)
print(repl.add_and_multiplyResult1)
print(repl.add_and_multiplyResult2)
print(repl)

# #
# 3
# 2
# The sum of 1 and 2 is 3, and the product is 2
# {
#     'add_and_multiplyResult0': 3,
#     'add_and_multiplyResult1': 2,
#     'add_and_multiplyResult2': 'The sum of 1 and 2 is 3, and the product is 2'
# }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant