Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #40702
| References | <CANWwTF-c+r0mS_qGYkKvHcff7NSGM0QoUJaJG1nxFsxwpA=xLw@mail.gmail.com> <87d2vejoz7.fsf@handshake.de> |
|---|---|
| Date | 2013-03-07 10:07 +0530 |
| Subject | Re: Python SUDS issue |
| From | VGNU Linux <vgnulinux@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2977.1362631399.2939.python-list@python.org> (permalink) |
[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
>
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: Python SUDS issue VGNU Linux <vgnulinux@gmail.com> - 2013-03-07 10:07 +0530
csiph-web