[Fedora-suds-list] getting an object type from WSDL

Ido Barkan ido at cloudshare.com
Wed Aug 15 15:12:04 UTC 2012


After chatting with with Jeff Ortel it seems like the best way to go is
indeed:

someObj = client.factory.create('typeName')
response = client.service.someMethod()
if isinstance(response.foo,  someObj .__class__):
    ...

Ido

On Wed, Aug 15, 2012 at 5:47 PM, Hsu, Ryan <Ryan.Hsu at emc.com> wrote:

>  Not sure if this is the best way, but I just use
> object.__class__.__name__****
>
> ** **
>
> *From:* suds-bounces at lists.fedoraproject.org [mailto:
> suds-bounces at lists.fedoraproject.org] *On Behalf Of *Ido Barkan
> *Sent:* Wednesday, August 15, 2012 4:54 AM
> *To:* suds at lists.fedoraproject.org
> *Subject:* [Fedora-suds-list] getting an object type from WSDL****
>
> ** **
>
> Is there a way to get a type form Client.factory?****
>
> I need to check in runtime that some returned value from the server
> isinstace() of that type.****
>
> ** **
>
> If I use factory.create() I always get an object.****
>
> if I call type(object) I get <type 'instance'>. ****
>
> ** **
>
> Thanks!
> ****
>
> Ido ****
>



-- 
Ido Barkan
SW engineer,  CloudShare

CloudShare, Ltd.
http://www.CloudShare.com
Replicate & Share Entire IT Environments, Online
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/suds/attachments/20120815/7984f26f/attachment.html>


More information about the suds mailing list