0
votes

new to Python/Zeep, please be gentle

when posting the following to my endpoint, all is working as expected:

<Envelope xmlns="http://www.w3.org/2003/05/soap-envelope">
    <Body>
        <PassThroughReq xmlns="http://amsservices.com/">
            <XMLinput>
                <INPUT>
                    <Account value="account" />
                    <Username value="username" />
                    <Password value="password" />
                    <Serverpool value="serverpool" />
                    <ProgramName name="WEBSERVICE.GET.POLICY.DATA.IDS" />
                    <Command cmd="279898" />
                </INPUT>
            </XMLinput>
        </PassThroughReq>
    </Body>
</Envelope>

I'm attempting to replicate the request with the following code:

import os
from zeep import Client

account = os.environ.get('sgws_account')
username = os.environ.get('sgws_username')
password = os.environ.get('sgws_password')
serverpool = os.environ.get('sgws_serverpool')
wsdl = os.environ.get('sgws_wsdl')

client = Client(wsdl)

xmlInput = {
    'INPUT':{
        'Account':account,
        'Username':username,
        'Password':password,
        'Serverpool':serverpool,
        'ProgramName':'WEBSERVICE.GET.POLICY.DATA.IDS',
        'Command':'279898'
    }
}

ptr = client.get_element('ns0:PassThroughReq')(xmlInput)

client.service.PassThroughReq(XMLinput=ptr)

the result is "Missing element for Any"

I've also tried the request as follows, with the same result:

client.service.PassThroughReq(ptr)

relative Global elements in the wdsl are:

ns0:PassThroughReq(XMLinput: {_value_1: ANY})

I will paste the full Traceback in a comment below.

I'm hoping this is a simple miss, due to ignorance, on my part but any light you may be able to shed would be greatly appreciated.

Traceback is too long for comments, but I'm happy to post anything you may deem relevantjbeckom
if possible show us the definition of PassThroughReq from python -mzeep wsdl.urlTarique