struct for zsi-client

gal gal at adv.magwien.gv.at
Fri May 2 12:40:17 EDT 2003


Hello!

I want to use a Soap::Lite Perl service with ZSI. My code is here:

  from ZSI.client import Binding,AUTH,TC
  binding = Binding(url='/soap/api', host='myhost.magwien.gv.at', 
soapaction = 'api#db', ns='api', readerclass=TC.Any)
  binding.db ({'tree': {'zone': {'name': 'Prod', 'get': None}}})

This yields the following request:

  POST http://myhost.magwien.gv.at/soap/api
  Accept-Encoding: identity
  Content-Length: 595
  Content-Type: text/xml; charset=utf-8
  SOAPAction: api#db

  <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ZSI="http://www.zolera.com/schemas/ZSI/" SOAP- 
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns="api" >
  <SOAP-ENV:Body>
  <db>
  <None>
  <tree>
  <zone>
  <get xsi:nil="1"/>
  <xsd:string id="81b4020">Prod</xsd:string>
  </zone>
  </tree>
  </None>
  </db>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

Why do I have the <None> tag, and why is Prod unnamed and has this id?
What I want is:

  POST http://myhost.magwien.gv.at/soap/api
  Accept-Encoding: identity
  Content-Length: 595
  Content-Type: text/xml; charset=utf-8
  SOAPAction: api#db

  <SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ZSI="http://www.zolera.com/schemas/ZSI/" SOAP- 
ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns="api" >
  <SOAP-ENV:Body>
  <db>
  <tree>
  <zone>
  <get xsi:nil="1"/>
  <name xsi:type="xsd:string">Prod</name>
  </zone>
  </tree>
  </db>
  </SOAP-ENV:Body>
  </SOAP-ENV:Envelope>

I use the standard XML-module, is this the reason?

Thanks in advance for your answer.

Peter




More information about the Python-list mailing list