Hi, I have a webservice with axis2.My webservice server is in java.I want client to be written in python. Client with java is working fine. In python i am just trying to list the methods and it throws errors.
*Errors:*
Traceback (most recent call last): File "test.py", line 6, in <module> client = Client(url) File "build/bdist.linux-i686/egg/suds/client.py", line 109, in __init__ File "build/bdist.linux-i686/egg/suds/servicedefinition.py", line 52, in __init__ File "build/bdist.linux-i686/egg/suds/servicedefinition.py", line 132, in paramtypes File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 156, in resolve suds.TypeNotFound: Type not found: '(ServerRegistrationDao, http://dao.web.rpma.hx.com/xsd, )'
*My pyhton client is:* from suds.client import Client #from suds.xsd.sxbasic import Import #Import.bind('http://schemas.xmlsoap.org/soap/encoding/') url = ' http://192.168.155.140:8080/webservice/services/ServerRegistrationService?ws...' client = Client(url) print client
I have attached my wsdl . Please help me Thank you.
Hey Upendra,
The problem here is that schema (http://services.web.rpma.hx.com) references a complex type named: ServerRegistrationDao which is defined in schema (http://dao.web.rpma.hx.com/xsd) but fails to import the other namespace. Even though they are in the same WSDL, xs:import/ rules apply.
The doctor ( http://jortel.fedorapeople.org/suds/doc/suds.xsd.doctor-module.html ) classes in suds are designed to fix broken wsdl/schemas. In a perfect world, the authors of this schema would fix this but I wouldn't hold your breath.
See suggested fix below. It worked for me.
Regards,
Jeff
Upendra Moturi wrote:
Hi, I have a webservice with axis2.My webservice server is in java.I want client to be written in python. Client with java is working fine. In python i am just trying to list the methods and it throws errors.
_*Errors:*_
Traceback (most recent call last): File "test.py", line 6, in <module> client = Client(url) File "build/bdist.linux-i686/egg/suds/client.py", line 109, in __init__ File "build/bdist.linux-i686/egg/suds/servicedefinition.py", line 52, in __init__ File "build/bdist.linux-i686/egg/suds/servicedefinition.py", line 132, in paramtypes File "build/bdist.linux-i686/egg/suds/xsd/sxbasic.py", line 156, in resolve suds.TypeNotFound: Type not found: '(ServerRegistrationDao, http://dao.web.rpma.hx.com/xsd, )'
_*My pyhton client is:*_ from suds.client import Client #from suds.xsd.sxbasic import Import #Import.bind('http://schemas.xmlsoap.org/soap/encoding/') url = ' http://192.168.155.140:8080/webservice/services/ServerRegistrationService?ws...'
from suds.xsd.doctor import ImportDoctor, Import imp = Import('http://dao.web.rpma.hx.com/xsd') imp.filter.add('http://services.web.rpma.hx.com') d = ImportDoctor(imp) client = Client(url, schemadoctor=d) print client
- client = Client(url)
print client
I have attached my wsdl . Please help me Thank you.
-- Thanks and Regards, Upendra.M
fedora-suds-list mailing list fedora-suds-list@redhat.com https://www.redhat.com/mailman/listinfo/fedora-suds-list