Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #40702 > unrolled thread

Re: Python SUDS issue

Started byVGNU Linux <vgnulinux@gmail.com>
First post2013-03-07 10:07 +0530
Last post2013-03-07 10:07 +0530
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Python SUDS issue VGNU Linux <vgnulinux@gmail.com> - 2013-03-07 10:07 +0530

#40702 — Re: Python SUDS issue

FromVGNU Linux <vgnulinux@gmail.com>
Date2013-03-07 10:07 +0530
SubjectRe: Python SUDS issue
Message-ID<mailman.2977.1362631399.2939.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

Hi Guys,
Not aware what "import" here is and what it will do.
But going through some google search result page found that there is
something called doctor in suds.
so tried changing code and it did fix the issue.
suds.TypeNotFound: Type not found: '(GetAccountBalanceFaultResponse,
http://www.payback.net/lmsglobal/xsd/v1/types, )'

Here is what i changed.
from suds.client import Client
from suds.xsd.doctor import Import, ImportDoctor
from suds.sax.element import Element

wsdlurl = 'https://46.51.221.138/PBExternalServices/v1/soap?wsdl'
schemaurl = 'http://www.payback.net/lmsglobal/xsd/v1/types'
schemaimport = Import(schemaurl)
schemadoctor = ImportDoctor(schemaimport)
client = Client(url=wsdlurl,doctor=schemadoctor)
print client

Printing client now lists all the methods and types associated with the
service.
But again stuck as on executing a method
response = client.service.GetAccountBalance(authtype)
replies with the error.
ValueError: unknown url type: {endpoint address}

Totally confused as what is wrong going on here.

Appreciate your help.
Regards,
VGNU


On Tue, Mar 5, 2013 at 12:46 PM, dieter <dieter@handshake.de> wrote:

> VGNU Linux <vgnulinux@gmail.com> writes:
>
> > ...
> > Here is my code:
> > from suds.client import Client
> > wsdlurl = 'https://46.51.221.138/PBExternalServices/v1/soap?wsdl'
> > client = Client(wsdlurl)
> > print client
> >
> > And following is the error that occurs on trying to print client.
> > Traceback (most recent call last):
> > ...
> > dereference
> >     midx, deps = x.dependencies()
> >   File "C:\Python25\Lib\site-packages\suds\xsd\sxbasic.py", line 469, in
> > dependencies
> >     raise TypeNotFound(self.ref)
> > suds.TypeNotFound: Type not found: '(GetAccountBalanceFaultResponse,
> > http://www.payback.net/lmsglobal/xsd/v1/types, )'
>
> Looks like a bug in the "WSDL" description of the web service.
> It seems to reference a type "GetAccountBalanceFaultResponse"
> associated with the namespace "
> http://www.payback.net/lmsglobal/xsd/v1/types",
> but "suds" cannot find the type.
>
> Maybe an "import" is missing in the "WSDL" description.
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web