From: Joshua B. <JRB...@lb...> - 2004-07-30 17:55:24
|
Well I just followed the "import" sequence: 1) BaseURL: http://sunwsrp.dyndns.org/portal/wsrp/wsdl/default 2) <import namespace="urn:oasis:names:tc:wsrp:v1:bind" location="http://sunwsrp.dyndns.org:80/portal/wsrp/specifications/version1/wsrp_v1_bindings.wsdl"/> 3) <import namespace="urn:oasis:names:tc:wsrp:v1:intf" location="wsrp_v1_interfaces.wsdl"/> So the problem is that relative URLs are currently determined by looking at the initial BaseURL. The #3 "location" is probably relative to the #2 location, but the implementation is resolving everything relative to the #1 BaseURL. I think this has been an issue for other people on the list, and I think it should be changed. -josh Nicolas Gouzy wrote: >Hi, > >Why have I got the following error with this tiny program ? > ><program> >import httplib >httplib.HTTPConnection.debuglevel = 1 > >from SOAPpy import WSDL > >wsdlUrl = 'http://sunwsrp.dyndns.org/portal/wsrp/wsdl/default' >server = WSDL.Proxy(wsdlUrl) ></program> > ><error> >H:\Mes documents\pythonTests>c:\Python23\python.exe wsdlTest.py >connect: (g-proxy1, 3128) >send: 'GET http://sunwsrp.dyndns.org/portal/wsrp/wsdl/default >HTTP/1.0\r\nHost: >sunwsrp.dyndns.org\r\nUser-agent: Python-urllib/1.15\r\n\r\n' >reply: 'HTTP/1.0 200 OK\r\n' >header: Date: Thu, 29 Jul 2004 08:35:00 GMT >header: Content-Length: 1330 >header: Content-Type: text/xml >header: Server: Sun-ONE-Application-Server/7.0.0_03c >header: Via: 1.1 niceway (NetCache NetApp/5.5R3), 1.1 g-proxy1 (NetCache >NetApp/ >5.5R3) >Traceback (most recent call last): > File "wsdlTest.py", line 7, in ? > server = WSDL.Proxy(wsdlUrl) > File "c:\Python23\Lib\site-packages\SOAPpy\WSDL.py", line 62, in __init__ > self.wsdl = reader.loadFromStream(stream, wsdlsource) > File "c:\Python23\Lib\site-packages\SOAPpy\wstools\WSDLTools.py", line >32, in >loadFromStream > wsdl.load(document) > File "c:\Python23\Lib\site-packages\SOAPpy\wstools\WSDLTools.py", line >163, in > load > self._import(document, element) > File "c:\Python23\Lib\site-packages\SOAPpy\wstools\WSDLTools.py", line >249, in > _import > importdoc = DOM.loadFromURL(location) > File "c:\Python23\Lib\site-packages\SOAPpy\wstools\Utility.py", line >552, in l >oadFromURL > file = urlopen(url) > File "c:\Python23\Lib\site-packages\SOAPpy\wstools\Utility.py", line 95, >in ur >lopen > conn.endheaders() > File "C:\Python23\lib\httplib.py", line 712, in endheaders > self._send_output() > File "C:\Python23\lib\httplib.py", line 597, in _send_output > self.send(msg) > File "C:\Python23\lib\httplib.py", line 564, in send > self.connect() > File "c:\Python23\Lib\site-packages\SOAPpy\wstools\Utility.py", line 47, >in co >nnect > self.sock.connect((self.host, self.port)) > File "c:\Python23\Lib\site-packages\SOAPpy\wstools\TimeoutSocket.py", >line 74, > in connect > raise TimeoutError('socket connect() timeout.') >SOAPpy.wstools.TimeoutSocket.TimeoutError: socket connect() timeout. ></error> > >Regards, > > > |