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

Zeep always overriding namespace prefixes defined in the WSDL? #870

Open
plaes opened this issue Nov 20, 2018 · 3 comments
Open

Zeep always overriding namespace prefixes defined in the WSDL? #870

plaes opened this issue Nov 20, 2018 · 3 comments

Comments

@plaes
Copy link
Contributor

plaes commented Nov 20, 2018

For example in my WSDL ( https://www.emta.ee/sites/default/files/ariklient/aktsiisid-vara-hasartmang/hampi/hampi-xrd-v6.wsdl ) I have following namespace definitions:

<wsdl:definitions
  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
  xmlns:tns="http://emta-v6.x-road.eu"
  xmlns:xrd="http://x-road.eu/xsd/xroad.xsd"
  name="ompi"
  targetNamespace="http://emta-v6.x-road.eu">
python -m zeep wsdl/hampi-xrd-v4.wsdl

Prefixes:
     xsd: http://www.w3.org/2001/XMLSchema
     ns0: http://emta-v6.x-road.eu
     ns1: http://x-road.eu/xsd/xroad.xsd
     ns2: http://www.w3.org/XML/1998/namespace
     ns3: http://x-road.eu/xsd/identifiers

Is there a possibility zeep does not override the prefixes and I could use xrd:XRoadClientIdentifierType instead of ns3:XRoadClientIdentifierType ?

@jacobsvante
Copy link

I'm also looking for this. Keeping the original namespace prefixes would be a great help when digging through enormous WSDL definitions.

@zbynekdrlik
Copy link

+1

@dbjock
Copy link

dbjock commented May 12, 2019

with my sample wsdl def's (shown below)
<wsdl:definitions
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://www.foobar.com/services/v2"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:sm="http://www.foobar.com/services/v2/schema" name="TestService" targetNamespace="http://www.foobar.com/services/v2">

Prefixes:
xsd: http://www.w3.org/2001/XMLSchema
ns0: http://www.foobar.com/services/v2/schema

I am having a difficult time removing ns0: in the sending xml, which I believe is due to the the targetNamespace being set, therefore the receiving service errors with ns0:

jterrace added a commit to jterrace/python-onvif-zeep-async that referenced this issue Nov 21, 2024
This fixes some Tapo cameras that respond with a 500 error when
receiving the ns0/ns1 namespace prefix with embedded xmlns definitions
inside each element.

A similar change was done upstream here:
FalkTannhaeuser/python-onvif-zeep#46

for mvantellingen/python-zeep#870.

I also updated the events example that was broken.
bdraco added a commit to openvideolibs/python-onvif-zeep-async that referenced this issue Dec 3, 2024
* Add shortened common onvif namespace prefixes.

This fixes some Tapo cameras that respond with a 500 error when
receiving the ns0/ns1 namespace prefix with embedded xmlns definitions
inside each element.

A similar change was done upstream here:
FalkTannhaeuser/python-onvif-zeep#46

for mvantellingen/python-zeep#870.

I also updated the events example that was broken.

* chore(pre-commit.ci): auto fixes

* Update requirements.txt

* fix examples

---------

Co-authored-by: J. Nick Koston <nick@koston.org>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
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

4 participants