Hi Jeff,
The version you sent me a while ago is working correctly for what I
need. Just thought I'd let you know that the current trunk does not,
it's producing the following errors when I attempt to use it instead:
2008-07-30 12:48:40,139 [ERROR] __find() @resolver.py:203
(@set) not-found
2008-07-30 12:48:40,140 [WARNING] append_attr() @unmarshaller.py:382
attribute (set) type, not-found
2008-07-30 12:48:40,140 [ERROR] __find() @resolver.py:203
(@cout) not-found
2008-07-30 12:48:40,140 [WARNING] append_attr() @unmarshaller.py:382
attribute (cout) type, not-found
2008-07-30 12:48:40,140 [ERROR] __find() @resolver.py:203
(@projectid) not-found
...<cut off lots of extra text>...
I will continue to use the version that works for me, but I thought
you'd like to know.
Cheers,
Cam
2008/6/11 Jeff Ortel <jortel(a)redhat.com>:
> Hey Cameron,
>
> I've attached a pre-release version of 0.2.2 for you to try. It's still
> being tested so ... :-)
>
> Let me know how you make out.
>
> Regards,
>
> Jeff
>
>
>
> Cameron Morrison wrote:
>>
>> Hi,
>>
>> I am trying to call the service GetRecordings(...) defined in the
>> attached wsdl, like so:
>>
>> ---
>> #!/bin/python
>>
>> from suds.client import Client
>> from suds import *
>>
>> logger('suds.serviceproxy').setLevel(logging.DEBUG)
>>
>> client = Client('http://localhost:2048/services/Recording.asmx?WSDL',
>> faults=False, proxy={'http':'localhost:8888'})
>> print client.service.GetRecordings('FilterBySong', 'None', 1, 10, '2')
>> ---
>>
>> The call works, and the following xml is returned:
>>
>> ---
>> <?xml version="1.0" encoding="utf-8"?>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>> <soap:Body>
>> <GetRecordingsResponse xmlns="http://tempuri.org/">
>> <GetRecordingsResult>
>> <status>Success</status>
>> <result>
>> <recordings count="4" total="4" xmlns="">
>> <recording id="317879" Votes="0" comments="0"
>> soundId="2">
>> <p1name><![CDATA[rob1]]></p1name>
>> <p2name><![CDATA[rob2]]></p2name>
>> <voice1Url>v1url</voice1Url>
>> <voice2Url>v2url</voice2Url>
>> </recording>
>> <recording id="317878" Votes="0" comments="0"
>> soundId="2">
>> <p1name><![CDATA[cam1]]></p1name>
>> <p2name><![CDATA[cam2]]></p2name>
>> <voice1Url>v1url</voice1Url>
>> <voice2Url>v2url</voice2Url>
>> </recording>
>> <recording id="317877" Votes="0" comments="0"
>> soundId="2">
>> <p1name><![CDATA[rob1]]></p1name>
>> <p2name><![CDATA[cam1]]></p2name>
>> <voice1Url>v1url</voice1Url>
>> <voice2Url>v2url</voice2Url>
>> </recording>
>> <recording id="317876" Votes="0" comments="0"
>> soundId="2">
>> <p1name><![CDATA[Cam]]></p1name>
>> <p2name><![CDATA[Rob]]></p2name>
>> <voice1Url>Cams voice</voice1Url>
>> <voice2Url>Robs voice</voice2Url>
>> </recording>
>> </recordings>
>> </result>
>> </GetRecordingsResult>
>> </GetRecordingsResponse>
>> </soap:Body>
>> </soap:Envelope>
>> ---
>>
>> ... but the unmarshaller is throwing an exception when trying to
>> process the recordings element of the returned document:
>>
>> ---
>> 2008-06-11 09:41:58,250 {2796} (resolver.py, 167) [ERROR] (recordings)
>> not-found
>> Traceback (most recent call last):
>> File "./test_driver.py", line 15, in <module>
>> print client.service.GetRecordings('FilterBySong', 'None', 1, 10, '2')
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/client.py", line 145,
>> in __call__
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/client.py", line 258, in
>> send
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/client.py", line 305,
>> in succeeded
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/binding.py",
>> line 86, in get_reply
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/binding.py",
>> line 111, in unmarshal
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
>> line 73, in process
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
>> line 91, in __process
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
>> line 122, in import_children
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
>> line 91, in __process
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
>> line 122, in import_children
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
>> line 89, in __process
>> File "build/bdist.cygwin-1.5.25-i686/egg/suds/bindings/unmarshaller.py",
>> line 275, in start
>> suds.TypeNotFound: WSDL type: recordings not-found
>> ---
>>
>> The "recordings" element is not specified in the WSDL - the Result
>> field of a ServiceResponse is intended to be arbitrarly formatted xml
>> - is there any way that Suds can handle this?
>>
>> Cheers,
>> Cameron
>>
>> ps. the service is internal, so I am unable to provide a test url, sorry!
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> fedora-suds-list mailing list
>> fedora-suds-list(a)redhat.com
>> https://www.redhat.com/mailman/listinfo/fedora-suds-list
>
>
I have the following as a response from one of the web service method.
It is an ArrayOfComplexType with an xsd:extension
Executing the code below
from suds.serviceproxy import ServiceProxy
url = 'http://chouwmlci0849.amrs.win.ml.com/Cds/Calendar/CalendarService.svc?wsdl'
myservice=ServiceProxy(url)
print myservice.FindCalendarValuesByName('','','','','','')
is giving me the following error
Traceback (most recent call last):
File "C:\MerrillLynch\projects\PYTHON\WSTest01.py", line 20, in ?
print myservice.FindCalendarValuesByName('LCCME_OPTIONS','2008-01-01','2008-
06-30','','','')
File "build\bdist.win32\egg\suds\sudsobject.py", line 119, in __str__
File "build\bdist.win32\egg\suds\sudsobject.py", line 122, in __unicode__
File "build\bdist.win32\egg\suds\sudsobject.py", line 161, in tostr
File "build\bdist.win32\egg\suds\sudsobject.py", line 171, in process
File "build\bdist.win32\egg\suds\sudsobject.py", line 234, in print_object
File "build\bdist.win32\egg\suds\sudsobject.py", line 183, in process
File "build\bdist.win32\egg\suds\sudsobject.py", line 274, in print_collection
File "build\bdist.win32\egg\suds\sudsobject.py", line 171, in process
File "build\bdist.win32\egg\suds\sudsobject.py", line 234, in print_object
File "build\bdist.win32\egg\suds\sudsobject.py", line 186, in process
File "build\bdist.win32\egg\suds\__init__.py", line 129, in tostr
ValueError: tzinfo.utcoffset() returned 1440; must be in -1439 .. 1439
<xsd:element name="FindCalendarValuesByNameResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1"
name="FindCalendarValuesByNameResult"
type="tns:ArrayOfCalendarValueData" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ArrayOfCalendarValueData">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded"
name="CalendarValueData" nillable="true" type="tns:CalendarValueData"
/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CalendarValueData">
<xsd:complexContent mixed="false">
<xsd:extension base="tns:ActiveHeader">
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="CalendarValueID"
type="xsd:int" />
<xsd:element minOccurs="1" maxOccurs="1" name="CalendarValue"
type="xsd:dateTime" />
<xsd:element minOccurs="1" maxOccurs="1"
name="CalendarValueDescription" nillable="true" type="xsd:string" />
<xsd:element minOccurs="1" maxOccurs="1" name="CalendarLocalValue"
nillable="true" type="xsd:dateTime" />
<xsd:element minOccurs="1" maxOccurs="1" name="ContractDate"
nillable="true" type="xsd:dateTime" />
<xsd:element minOccurs="1" maxOccurs="1" name="CalendarValueTypeID"
type="xsd:int" />
<xsd:element minOccurs="1" maxOccurs="1"
name="CalendarValueTypeName" nillable="true" type="xsd:string" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="ActiveHeader">
<xsd:complexContent mixed="false">
<xsd:extension base="tns:Header">
<xsd:sequence>
<xsd:element minOccurs="1" maxOccurs="1" name="Status"
type="tns:DataState" />
<xsd:element minOccurs="1" maxOccurs="1" name="UpdatedOn"
type="xsd:dateTime" />
<xsd:element minOccurs="1" maxOccurs="1" name="UpdatedBy"
nillable="true" type="xsd:string" />
<xsd:element minOccurs="1" maxOccurs="1" name="Active" type="xsd:boolean" />
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
<xsd:complexType name="Header" abstract="true" />
<xsd:simpleType name="DataState">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Unchanged" />
<xsd:enumeration value="Insert" />
<xsd:enumeration value="Delete" />
<xsd:enumeration value="Update" />
</xsd:restriction>
</xsd:simpleType>
I tested with a simple Complex type below for which it worked.
<xsd:element name="TestDocResponse">
<xsd:complexType>
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="TestDocResult"
type="tns:ArrayOfEmployee" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ArrayOfEmployee">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="unbounded" name="Employee"
nillable="true" type="tns:Employee" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Employee">
<xsd:sequence>
<xsd:element minOccurs="0" maxOccurs="1" name="FirstName"
type="xsd:string" />
<xsd:element minOccurs="0" maxOccurs="1" name="LastName" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
I would appreciate any pointers into that
Please read the README file in the suds base directory for instructions on
how to use it. There are no external dependencies as you can tell by
looking at the setup.py file.
On Tue, Jul 29, 2008 at 12:09 PM, Rizwan Raza <rizwan.raza(a)gmail.com> wrote:
> Nathan:
>
> Thanks for bearing with me. Anyways I was able to build and install
> SUDS. Now I am using the legacy approach to call a web service. Below
> is the code
>
>
> from serviceproxy import ServiceProxy
> myurl = 'http://localhost/CalendarService.svc?wsdl'
> myservice=ServiceProxy(myurl)
> ret = myservice.TestDoc('some value')
> print ret
>
> but I am getting the following error
>
> ImportError: No module named serviceproxy. Is that also some module
> that needs to be installed before I can use SUDS? Can you please send
> me the link. I really would appreciate it.
>
>
> On 7/29/08, Nathan Van Gheem <vangheem(a)gmail.com> wrote:
> > Sorry everyone for forgetting the "reply to all"
> >
> > Rizwan,
> >
> > A little googling would have giving you
> > http://pypi.python.org/pypi/setuptools
> >
> > This list is really not the place for these questions because
> installing
> > suds is just standard python. Please read up more next time.
> >
> >
> > Thanks,
> > Nathan
> >
> >
> >
> > On Tue, Jul 29, 2008 at 10:32 AM, Rizwan Raza <rizwan.raza(a)gmail.com>
> wrote:
> > > I ran python setup.py build and get the following error
> > >
> > > No module named setuptools
> > >
> > >
> > >
> > >
> > > On 7/29/08, Rizwan Raza <rizwan.raza(a)gmail.com> wrote:
> > > > I got it. Thanks
> > > >
> > > > On 7/29/08, Nathan Van Gheem <vangheem(a)gmail.com> wrote:
> > > > > If you used svn then you should have it. You're looking at the
> > directory
> > > > > structure one down from where you should be. If you just go to the
> > address
> > > > > http://svn.fedorahosted.org/svn/suds/trunk/ you'll
> > see the
> > > > > setup.py in there.
> > > > >
> > > > >
> > > > > -Nathan
> > > > >
> > > > >
> > > > > On Tue, Jul 29, 2008 at 10:23 AM, Rizwan Raza <
> rizwan.raza(a)gmail.com>
> > wrote:
> > > > > > Ok I downloaded the repository using SVN
> > > > > > cd suds but did not see any setup.py file there. Attached is the
> > > > > > folder listing for suds folder
> > > > > >
> > > > > > Then I tried the second approach. Got the tar ball. Tried to
> > > > > > decompress it on Windows XP got the error attached
> > > > > >
> > > > > > Any help would be greatly appreciated.
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On 7/28/08, Nathan Van Gheem <vangheem(a)gmail.com> wrote:
> > > > > > > Forgot to mention you can actually just download the source
> from
> > > > > > >
> > > > >
> >
> https://fedorahosted.org/suds/attachment/wiki/WikiStart/suds-0.2.4.tar.gz
> > > > > > > have a lot at the main project page for a list of all the
> files
> > > > > > > https://fedorahosted.org/suds
> > > > > > >
> > > > > > > -Nathan
> > > > > > >
> > > > > > >
> > > > > > > On Mon, Jul 28, 2008 at 6:06 PM, Nathan Van Gheem
> > <vangheem(a)gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > Yes, you can checkout the trunk from the svn or you can use
> > > > > easy_install
> > > > > > > to download and install the package for you(although the latest
> > 0.2.4
> > > > > > > release isn't in pypi yet). Once you check it out just use the
> > setup.py
> > > > > in
> > > > > > > there to install or you can just run from the source....
> > > > > > > >
> > > > > > > > First, make sure subversion is installed. I've used tortoise
> > svn
> > > > > > > http://tortoisesvn.tigris.org/ for windows before. It is very
> > easy to
> > > > > use.
> > > > > > > > The command sequence will be like so(if you just use the
> basic
> > svn
> > > > > > > install)
> > > > > > > >
> > > > > > > > svn co
> > http://svn.fedorahosted.org/svn/suds/trunk
> > > > > suds
> > > > > > > > cd suds
> > > > > > > > python setup.py build
> > > > > > > > python setup.py install
> > > > > > > > That should work... Anyways, good luck.
> > > > > > > >
> > > > > > > > To use suds just check out the README in the root folder.
> > > > > > > >
> > > > > > > > -Nathan
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > On Mon, Jul 28, 2008 at 5:58 PM, Rizwan Raza
> > <rizwan.raza(a)gmail.com>
> > > > > > > wrote:
> > > > > > > >
> > > > > > > > > I am new to PYTHON and SUDS, I need to call a WS method
> from
> > PYTHON.
> > > > > > > > > Can someone let me know how can I install SUDS? Is there
> any
> > > > > setup.py
> > > > > > > > > file available?
> > > > > > > > >
> > > > > > > > >
> > _______________________________________________
> > > > > > > > > fedora-suds-list mailing list
> > > > > > > > > fedora-suds-list(a)redhat.com
> > > > > > > > >
> > > > > > >
> > > > >
> > https://www.redhat.com/mailman/listinfo/fedora-suds-list
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> >
> >
> > _______________________________________________
> > fedora-suds-list mailing list
> > fedora-suds-list(a)redhat.com
> > https://www.redhat.com/mailman/listinfo/fedora-suds-list
> >
>
Sorry everyone for forgetting the "reply to all"
Rizwan,
A little googling would have giving you
http://pypi.python.org/pypi/setuptools
This list is really not the place for these questions because installing
suds is just standard python. Please read up more next time.
Thanks,
Nathan
On Tue, Jul 29, 2008 at 10:32 AM, Rizwan Raza <rizwan.raza(a)gmail.com> wrote:
> I ran python setup.py build and get the following error
>
> No module named setuptools
>
> On 7/29/08, Rizwan Raza <rizwan.raza(a)gmail.com> wrote:
> > I got it. Thanks
> >
> > On 7/29/08, Nathan Van Gheem <vangheem(a)gmail.com> wrote:
> > > If you used svn then you should have it. You're looking at the
> directory
> > > structure one down from where you should be. If you just go to the
> address
> > > http://svn.fedorahosted.org/svn/suds/trunk/ you'll see the
> > > setup.py in there.
> > >
> > >
> > > -Nathan
> > >
> > >
> > > On Tue, Jul 29, 2008 at 10:23 AM, Rizwan Raza <rizwan.raza(a)gmail.com>
> wrote:
> > > > Ok I downloaded the repository using SVN
> > > > cd suds but did not see any setup.py file there. Attached is the
> > > > folder listing for suds folder
> > > >
> > > > Then I tried the second approach. Got the tar ball. Tried to
> > > > decompress it on Windows XP got the error attached
> > > >
> > > > Any help would be greatly appreciated.
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 7/28/08, Nathan Van Gheem <vangheem(a)gmail.com> wrote:
> > > > > Forgot to mention you can actually just download the source from
> > > > >
> > >
> https://fedorahosted.org/suds/attachment/wiki/WikiStart/suds-0.2.4.tar.gz
> > > > > have a lot at the main project page for a list of all the files
> > > > > https://fedorahosted.org/suds
> > > > >
> > > > > -Nathan
> > > > >
> > > > >
> > > > > On Mon, Jul 28, 2008 at 6:06 PM, Nathan Van Gheem <
> vangheem(a)gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > Yes, you can checkout the trunk from the svn or you can use
> > > easy_install
> > > > > to download and install the package for you(although the latest
> 0.2.4
> > > > > release isn't in pypi yet). Once you check it out just use the
> setup.py
> > > in
> > > > > there to install or you can just run from the source....
> > > > > >
> > > > > > First, make sure subversion is installed. I've used tortoise svn
> > > > > http://tortoisesvn.tigris.org/ for windows before. It is very
> easy to
> > > use.
> > > > > > The command sequence will be like so(if you just use the basic
> svn
> > > > > install)
> > > > > >
> > > > > > svn co http://svn.fedorahosted.org/svn/suds/trunk
> > > suds
> > > > > > cd suds
> > > > > > python setup.py build
> > > > > > python setup.py install
> > > > > > That should work... Anyways, good luck.
> > > > > >
> > > > > > To use suds just check out the README in the root folder.
> > > > > >
> > > > > > -Nathan
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > On Mon, Jul 28, 2008 at 5:58 PM, Rizwan Raza <
> rizwan.raza(a)gmail.com>
> > > > > wrote:
> > > > > >
> > > > > > > I am new to PYTHON and SUDS, I need to call a WS method from
> PYTHON.
> > > > > > > Can someone let me know how can I install SUDS? Is there any
> > > setup.py
> > > > > > > file available?
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > fedora-suds-list mailing list
> > > > > > > fedora-suds-list(a)redhat.com
> > > > > > >
> > > > >
> > > https://www.redhat.com/mailman/listinfo/fedora-suds-list
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > >
> > >
> >
>
I am new to PYTHON and SUDS, I need to call a WS method from PYTHON.
Can someone let me know how can I install SUDS? Is there any setup.py
file available?
All,
I've received a request to license suds as LGPL instead of GPL as it is
licensed currently. Pending no objections from the community, I intend
to do this within the week. If you have an objection, please post it on
the list.
Regards,
Jeff
All,
One of the optimizations included in 0.2.3 as introduced a serious
whereby namespaces listed when printing the cleint (or serviceproxy)
aren't actually mapped to a URI unless the client is printed. This has
been fixed on trunk (r205) and will be release in 0.2.4 shortly.
Sorry for any inconvenience.
Regards,
Jeff