On Tuesday, May 30, 2017 at 8:50:42 AM UTC-7, Alberto Arzuaga wrote:
>
> este es mi código:
>
> from suds import client
> url = "
> http://commonservices.min1.dtc/SearchPersonService/SearchPersonWCFService.svc?wsdl
>  
> <http://www.google.com/url?q=http%3A%2F%2Fcommonservices.min1.dtc%2FSearchPersonService%2FSearchPersonWCFService.svc%3Fwsdl&sa=D&sntz=1&usg=AFQjCNF4mk2ohMrAsTsLZyCUgDGDdEQg4A>
> "
> cliente = client.Client(url)
> print (cliente)
>
>
>
>
> y me sale esto:
>
> Suds ( https://github.com/cackharot/suds-py3 
> <https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fcackharot%2Fsuds-py3&sa=D&sntz=1&usg=AFQjCNEqILksXS4x8yXEI5Pg_WvBO376tQ>
>  
> )  version: 1.3.3.0 IN  build: 20170311
>
> Service ( SearchPersonWCFService ) tns="http://CommonServices 
> <http://www.google.com/url?q=http%3A%2F%2FCommonServices&sa=D&sntz=1&usg=AFQjCNEp5rowiLKLOG6xuoMfeq73CMDJAg>
> "
>    Prefixes (9)
>       ns0 = "http://CommonServices 
> <http://www.google.com/url?q=http%3A%2F%2FCommonServices&sa=D&sntz=1&usg=AFQjCNEp5rowiLKLOG6xuoMfeq73CMDJAg>
> "
>       ns1 = "
> http://schemas.datacontract.org/2004/07/CommonEntities.AddressManager 
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.datacontract.org%2F2004%2F07%2FCommonEntities.AddressManager&sa=D&sntz=1&usg=AFQjCNFuIkgKIDsSWaQpBDgMsMyms9lOjA>
> "
>       ns2 = "
> http://schemas.datacontract.org/2004/07/CommonEntities.DocumentsFile 
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.datacontract.org%2F2004%2F07%2FCommonEntities.DocumentsFile&sa=D&sntz=1&usg=AFQjCNHS6jPTW64bUFOz2T8GN3UniJmCDg>
> "
>       ns3 = "http://schemas.datacontract.org/2004/07/CommonEntities.Image 
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.datacontract.org%2F2004%2F07%2FCommonEntities.Image&sa=D&sntz=1&usg=AFQjCNEuWh1F8Cfk5v7GAHe6x5QOZ9z3sg>
> "
>       ns4 = "http://schemas.datacontract.org/2004/07/CommonEntities.Info 
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.datacontract.org%2F2004%2F07%2FCommonEntities.Info&sa=D&sntz=1&usg=AFQjCNEZl1WmU2IL7BfcKgRrEGG2vC1dYQ>
> "
>       ns5 = "
> http://schemas.datacontract.org/2004/07/CommonEntities.PersonFile 
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.datacontract.org%2F2004%2F07%2FCommonEntities.PersonFile&sa=D&sntz=1&usg=AFQjCNFr-yJiATtsH7KeCdDcfc463avSEw>
> "
>       ns6 = "
> http://schemas.datacontract.org/2004/07/CommonServices.SearchPersonService.Entities
>  
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.datacontract.org%2F2004%2F07%2FCommonServices.SearchPersonService.Entities&sa=D&sntz=1&usg=AFQjCNGGD6kyRQZDdFskXmQ-0NgpGcJFVg>
> "
>       ns7 = "http://schemas.microsoft.com/2003/10/Serialization/ 
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.microsoft.com%2F2003%2F10%2FSerialization%2F&sa=D&sntz=1&usg=AFQjCNEHWQZgh_qwcrpQPb0fCRvkidMPaA>
> "
>       ns8 = "http://schemas.microsoft.com/Message 
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.microsoft.com%2FMessage&sa=D&sntz=1&usg=AFQjCNHhBx3XrerNYdoM47DQWXKxFFLOEw>
> " 
>
[...]
>
lo que significa que es correcta la URL del servicio.  Ahi me los 
> identifica. Entonces pruebo ejecutar un método de esos:
>
> from suds import client
> url = "
> http://commonservices.min1.dtc/SearchPersonService/SearchPersonWCFService.svc?wsdl
>  
> <http://www.google.com/url?q=http%3A%2F%2Fcommonservices.min1.dtc%2FSearchPersonService%2FSearchPersonWCFService.svc%3Fwsdl&sa=D&sntz=1&usg=AFQjCNF4mk2ohMrAsTsLZyCUgDGDdEQg4A>
> "
> cliente = client.Client(url).service.
> SearchNationalPersonByIdentityNumber('91041940969')
> print (cliente)
>
> y BOOOM!!!!, me da este error:
>
>
> "C:\Program Files\Python35\python.exe" D:/MenoresP27/index.py
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="
> http://schemas.xmlsoap.org/soap/envelope/ 
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F&sa=D&sntz=1&usg=AFQjCNGNF5DdaQ9wHKRy5fjl5UBgSE9-HA>"
>  
> xmlns:ns0="http://schemas.xmlsoap.org/soap/envelope/ 
> <http://www.google.com/url?q=http%3A%2F%2Fschemas.xmlsoap.org%2Fsoap%2Fenvelope%2F&sa=D&sntz=1&usg=AFQjCNGNF5DdaQ9wHKRy5fjl5UBgSE9-HA>"
>  
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance 
> <http://www.google.com/url?q=http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance&sa=D&sntz=1&usg=AFQjCNFERp6A_kcvqihMCKJ7EHX8O14vIA>"
>  
> xmlns:ns1="http://CommonServices 
> <http://www.google.com/url?q=http%3A%2F%2FCommonServices&sa=D&sntz=1&usg=AFQjCNEp5rowiLKLOG6xuoMfeq73CMDJAg>
> ">
>    <SOAP-ENV:Header/>
>    <ns0:Body>
>       <ns1:SearchNationalPersonByIdentityNumber>
>          <ns1:identityNumber>91041940969</ns1:identityNumber>
>       </ns1:SearchNationalPersonByIdentityNumber>
>    </ns0:Body>
> </SOAP-ENV:Envelope>
> Traceback (most recent call last):
>   File "C:\Program 
> Files\Python35\lib\site-packages\suds\transport\http.py", line 78, in send
>     fp = self.u2open(u2request)
>   File "C:\Program 
> Files\Python35\lib\site-packages\suds\transport\http.py", line 119, in 
> u2open
>     return url.open(u2request, timeout=tm)
>   File "C:\Program Files\Python35\lib\urllib\request.py", line 472, in open
>     response = meth(req, response)
>   File "C:\Program Files\Python35\lib\urllib\request.py", line 582, in 
> http_response
>     'http', request, response, code, msg, hdrs)
>   File "C:\Program Files\Python35\lib\urllib\request.py", line 510, in 
> error
>     return self._call_chain(*args)
>   File "C:\Program Files\Python35\lib\urllib\request.py", line 444, in 
> _call_chain
>     result = func(*args)
>   File "C:\Program Files\Python35\lib\urllib\request.py", line 590, in 
> http_error_default
>     raise HTTPError(req.full_url, code, msg, hdrs, fp)
> urllib.error.HTTPError: HTTP Error 404: Not Found
>
>
It looks a lot like one of the URLs didn't work.  I'm not familiar with 
"http://CommonServices";
(and I used pysimplesoap, which is what led me to web2py)
so I can't comment on what URL failed.
Perhaps use the command-line version of curl or wget to investigate the 
URLs.

/dps

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to