python-zeep icon indicating copy to clipboard operation
python-zeep copied to clipboard

Transport with attachment

Open ellethee opened this issue 8 years ago • 6 comments

A basic MTOM implementation based on the post http://stackoverflow.com/questions/35558812/how-to-send-multipart-related-requests-in-python-to-soap-server by zapatilla

subclass Transport class for override the post_xml method and uses email.mime to attach the multipart files.

Hope it can help

sure it must be improved, anyway for me is working as is.

ellethee avatar Jan 20 '17 08:01 ellethee

Codecov Report

Merging #314 into master will decrease coverage by 2.21%. The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #314      +/-   ##
==========================================
- Coverage   90.11%   87.89%   -2.22%     
==========================================
  Files          40       58      +18     
  Lines        4066     4396     +330     
  Branches      744      755      +11     
==========================================
+ Hits         3664     3864     +200     
- Misses        256      365     +109     
- Partials      146      167      +21
Impacted Files Coverage Δ
src/zeep/transport_with_attach.py 0% <0%> (ø)
src/zeep/wsdl/messages/base.py 68.75% <0%> (-17.62%) :arrow_down:
src/zeep/xsd/elements/builtins.py 89.28% <0%> (-8.95%) :arrow_down:
src/zeep/wsdl/bindings/http.py 80.76% <0%> (-6.74%) :arrow_down:
src/zeep/wsdl/bindings/soap.py 84.97% <0%> (-5.13%) :arrow_down:
src/zeep/utils.py 92.3% <0%> (-5.03%) :arrow_down:
src/zeep/xsd/visitor.py 90.37% <0%> (-0.03%) :arrow_down:
src/zeep/__init__.py 100% <0%> (ø) :arrow_up:
src/zeep/xsd/elements/references.py 100% <0%> (ø) :arrow_up:
src/zeep/xsd/elements/element.py 88.96% <0%> (ø) :arrow_up:
... and 21 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 261af8f...356e12b. Read the comment docs.

codecov-io avatar Jan 20 '17 12:01 codecov-io

Thanks for this. I'm afraid this will take some refactoring to integrate nicely with zeep. What will help however is a couple of unittests. Are you able to add those?

mvantellingen avatar Jan 26 '17 20:01 mvantellingen

ok, i will try to make something as soon as possible.

Thank you.

2017-01-26 21:14 GMT+01:00 Michael van Tellingen [email protected]:

Thanks for this. I'm afraid this will take some refactoring to integrate nicely with zeep. What will help however is a couple of unittests. Are you able to add those?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mvantellingen/python-zeep/pull/314#issuecomment-275500400, or mute the thread https://github.com/notifications/unsubscribe-auth/ACRMaGjBtevcAerELYs2eD3jJ2fRI6a1ks5rWP6TgaJpZM4LpCpu .

-- Luca

ellethee avatar Jan 26 '17 20:01 ellethee

ok

scuria avatar Jun 09 '17 09:06 scuria

See also #599

erny avatar May 18 '18 12:05 erny

@mvantellingen review ping. Looks like something like this will be super useful

do-rtk avatar Oct 05 '23 10:10 do-rtk