Skip to content

should create_message require default service to be defined in wsdl? #833

Open
@fried-sausage

Description

@fried-sausage

Please provide the following information:

  1. The version of zeep: 3.1.0
  2. The WSDL you are using: https://www.onvif.org/ver10/events/wsdl/event.wsdl
  3. And most importantly, a runnable example script
import zeep
from zeep.cache import SqliteCache
from zeep.transports import Transport

WSDL_LOCATION = 'https://www.onvif.org/ver10/events/wsdl/event.wsdl'
ONVIF_SERVER = 'http://127.0.0.1:8787'

client = zeep.Client(WSDL_LOCATION, transport=Transport(cache=SqliteCache()))

event_service = client.create_service(
    '{http://www.onvif.org/ver10/events/wsdl}EventBinding',
    ONVIF_SERVER,
)

print(event_service.GetEventProperties())  # this will work
client.create_message(event_service, 'GetEventProperties')  # this fails

This fails with ValueError: There is no default service defined. This is usually due to missing wsdl:service definitions in the WSDL

I explicitly created ServiceProxy object and passed it to Client.create_message, is it still necessary for service to be defined in wsdl?

Activity

fried-sausage

fried-sausage commented on Oct 2, 2018

@fried-sausage
Author

This can be bypassed with client._default_service = my_service_proxy_object

added a commit that references this issue on Sep 11, 2024
a40fea3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @fried-sausage

      Issue actions

        should create_message require default service to be defined in wsdl? · Issue #833 · mvantellingen/python-zeep