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/%22%3E 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%22/%3E
<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>
Hey Steffen,
Thanks for your interest in suds. One thing you might want to try is to print ArrayOf_xsd_string after it is created to see what its structure looks like. Based on the error, 'value' doesn't seem match the schema. Also, if you can include a copy or public link to your wsdl, I can be much more helpful.
Regards,
Jeff
Steffen Steidten wrote:
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/%22%3E 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%22/%3E
<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%22/%3E
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list
Jeff,
Thanks for your quick reply. The WSDL is attached (or see the last part of my first mail if it dowsn't work).
The ArrayOf_xsd_string instance with the string array ["", "-A"] as parameter seems to look good, as the following log shows (sorry, it's a bit lengthy). It seems like the string array cannot be resolved properly.
Regards, Steffen
The log output comes here:
in0.value = ["", "-A"] clt.service.generateEvent(in0)
1220458189.508:10:marshaller:process:processing: (Content){ tag = "in0" value = (ArrayOf_xsd_string){ value[] = "", "-A", } type = <Complex:0xf531e8 name="ArrayOf_xsd_string" /> } 1220458189.508:10:marshaller:encode:encoding name=(ArrayOf_xsd_string) 1220458189.508:10:marshaller:node:created - node: <in0 xmlns:intf="urn:WMSClientAdapter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:typ e="intf:ArrayOf_xsd_string"/> 1220458189.508:10:marshaller:append:appending parent: <in0 xmlns:intf="urn:WMSClientAdapter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:typ e="intf:ArrayOf_xsd_string"/> content: (Content){ tag = "in0" value = (ArrayOf_xsd_string){ value[] = "", "-A", } type = <Complex:0xf531e8 name="ArrayOf_xsd_string" /> } 1220458189.508:10:marshaller:__metatype:type (ArrayOf_xsd_string) found in metadata 1220458189.524:10:marshaller:start:starting content of type: <Complex:0xf531e8 name="ArrayOf_xsd_str ing" /> (Content){ tag = "in0" value = (ArrayOf_xsd_string){ value[] = "", "-A", } type = <Complex:0xf531e8 name="ArrayOf_xsd_string" /> } 1220458189.524:10:marshaller:__metatype:type (ArrayOf_xsd_string) found in metadata 1220458189.524:10:marshaller:encode:encoding name=(ArrayOf_xsd_string) 1220458189.524:10:marshaller:node:created - node: <in0 xmlns:intf="urn:WMSClientAdapter" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:typ e="intf:ArrayOf_xsd_string"/> 1220458189.524:10:marshaller:append:appending parent: <in0 xsi:type="intf:ArrayOf_xsd_string"/> content: (Content){ tag = "value" value[] = "", "-A", type = None } 1220458189.524:10:marshaller:start:starting content of type: None (Content){ tag = "value" value[] = "", "-A", type = None } 1220458189.524:40:resolver:__find:(value) not-found Traceback (most recent call last): File "<stdin>", line 1, in <module> File "U:\Util\Python25\lib\site-packages\suds\client.py", line 187, in __call__ result = self.client.invoke(self, args, kwargs) File "U:\Util\Python25\lib\site-packages\suds\client.py", line 297, in invoke msg = binding.get_message(method.name, args, soapheaders) File "U:\Util\Python25\lib\site-packages\suds\bindings\binding.py", line 77, in get_message p = self.param(method_name, pdef, arg) File "U:\Util\Python25\lib\site-packages\suds\bindings\binding.py", line 155, in param return marshaller.process(pdef[0], object, pdef[1]) File "U:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py", line 503, in process result = MBase.process(self, content) File "U:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py", line 364, in process self.append(root, content) File "U:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py", line 382, in append self.appender.append(parent, content) File "U:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py", line 121, in append appender.append(parent, content) File "U:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py", line 284, in append Appender.append(self, child, cont) File "U:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py", line 182, in append self.marshaller.append(parent, content) File "U:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py", line 381, in append if self.start(content): File "U:\Util\Python25\lib\site-packages\suds\bindings\marshaller.py", line 533, in start raise TypeNotFound(content.tag) suds.TypeNotFound: Type not found: 'value'
Am 4.9.2008 schrieb "Jeff Ortel" jortel@redhat.com:
Hey Steffen,
Thanks for your interest in suds. One thing you might want to try is to print ArrayOf_xsd_string after it is created to see what its structure looks like. Based on the error, 'value' doesn't seem match the schema. Also, if you can include a copy or public link to your wsdl, I can be much more helpful.
Regards,
Jeff
Steffen Steidten wrote:
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/%22%3E 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%22/%3E
<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%22/%3E
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list