Python SUDS issue

VGNU Linux vgnulinux at gmail.com
Fri Mar 15 05:12:37 EDT 2013


Able to fix issue by including 'location' as parameter in client
constructor arguments.
client = Client(url=wsdlurl,doctor=schemadoctor, location='
https://46.51.221.138/PBExternalServices/v1/soap?wsdl')

Thanks for helping me out.
Regards,
VGNU


On Thu, Mar 7, 2013 at 10:07 AM, VGNU Linux <vgnulinux at gmail.com> wrote:

> 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 at handshake.de> wrote:
>
>> VGNU Linux <vgnulinux at 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
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130315/288d9545/attachment.html>


More information about the Python-list mailing list