[Fedora-suds-list] ArrayOf_xsd_string not working as expected
Steffen Steidten
steffen at steidten.de
Wed Sep 3 19:32:18 UTC 2008
Hallo,
I'm having trouble to generate a service method's input consisting of
an array of strings. WSDL file see below, it works fine with ZSI.
What's wrong with my input variable? Is there a missing feature in suds,
I have to wait for?
Regards,
Steffen
The code is:
from suds.client import Client
clt = Client("file:///wmsservice.xml")
print clt
The output indicates a correctly handled wsdl file:
suds
version=0.2.8
service (WMSClientService)
prefixes:
ns0 = "urn:WMSClientAdapter"
methods (1):
generateEvent(ArrayOf_xsd_string in0, )
types (1):
ArrayOf_xsd_string
When sending the request
in0 = clt.factory.create("ArrayOf_xsd_string")
in0.value = ["x", "-A"]
clt.service.generateEvent(in0)
the following error is returned:
ERROR:suds.resolver:(value) not-found
Traceback (most recent call last):
File "testsuds.py", line 12, in <module>
clt.service.generateEvent(in0)
File "C:\Util\Python25\lib\site-packages\suds\client.py", line
187, in __call__
result = self.client.invoke(self, args, kwargs)
File "C:\Util\Python25\lib\site-packages\suds\client.py", line
297, in invoke
msg = binding.get_message(method.name, args, soapheaders)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\binding.py",
line 77, in get_message
p = self.param(method_name, pdef, arg)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\binding.py",
line 155, in param
return marshaller.process(pdef[0], object, pdef[1])
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 505, in process
result = MBase.process(self, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 366, in process
self.append(root, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 384, in append
self.appender.append(parent, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 123, in append
appender.append(parent, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 286, in append
Appender.append(self, child, cont)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 184, in append
self.marshaller.append(parent, content)
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 383, in append
if self.start(content):
File
"C:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py",
line 535, in start
raise TypeNotFound(content.tag)
suds.TypeNotFound: Type not found: 'value'
--------------- wmsservice.xml -------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:WMSClientAdapter"
xmlns:impl="urn:WMSClientAdapter" xmlns:intf="urn:WMSClientAdapter"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns="http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="urn:WMSClientAdapter">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOf_xsd_string">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="xsd:string[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</wsdl:types>
<wsdl:message name="generateEventResponse">
</wsdl:message>
<wsdl:message name="generateEventRequest">
<wsdl:part name="in0" type="impl:ArrayOf_xsd_string"/>
</wsdl:message>
<wsdl:portType name="WMSClient">
<wsdl:operation name="generateEvent" parameterOrder="in0">
<wsdl:input name="generateEventRequest"
message="impl:generateEventRequest"/>
<wsdl:output name="generateEventResponse"
message="impl:generateEventResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WMSClientSoapBinding" type="impl:WMSClient">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="generateEvent">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="generateEventRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:WMSClientAdapter"/>
</wsdl:input>
<wsdl:output name="generateEventResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:WMSClientAdapter"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WMSClientService">
<wsdl:port name="WMSClient" binding="impl:WMSClientSoapBinding">
<wsdlsoap:address
location="http://localhost:7070/wmsWebService/services/WMSClient"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
More information about the fedora-suds-list
mailing list