On Tuesday, April 19, 2016 at 5:28:17 AM UTC-7, Pbop wrote:
>
> I am trying to learn how to use the pysimplesoap client to consume a 
> service outside of Web2Py. 
>
> Example in book works great, and I have not some useful threads in the 
> community about authentication which is phase 2, but I am just trying to 
> start simple. Unfortunately, my proof of concept to use the soap client to 
> readily available services on the WWW is bombing. I am sure it is something 
> simple... Any help is appreciated.  
>
> [...] 
>
>   File "C:/web2py_src/web2py/applications/webservices/controllers/sample.py" 
> <http://127.0.0.1:8000/admin/default/edit/webservices/controllers/sample.py>, 
> line 94, in test_5
>     response = client_soap.GetGeoIP(IPAddress='24.194.5.187')
>   File "C:\web2py_src\web2py\gluon\contrib\pysimplesoap\client.py", line 165, 
> in <lambda>
>     return lambda self=self, *args, **kwargs: self.call(attr, *args, **kwargs)
>   File "C:\web2py_src\web2py\gluon\contrib\pysimplesoap\client.py", line 242, 
> in call
>     jetty=self.__soap_server in ('jetty',))
>   File "C:\web2py_src\web2py\gluon\contrib\pysimplesoap\simplexml.py", line 
> 56, in __init__
>     self.__document = xml.dom.minidom.parseString(text)
>   File "C:\Python27\lib\xml\dom\minidom.py", line 1928, in parseString
>     return expatbuilder.parseString(string)
>   File "C:\Python27\lib\xml\dom\expatbuilder.py", line 940, in parseString
>     return builder.parseString(string)
>   File "C:\Python27\lib\xml\dom\expatbuilder.py", line 223, in parseString
>     parser.Parse(string, True)
> ExpatError: mismatched tag: line 24, column 2
>
>

This sounds, at first glance, like a badly formed response from the remote 
target.  Any chance you can get a wireshark or tcpdump trace of the 
response? (Ah, Windows ... not tcpdump, then; netsh is the native trace)   

Plan B would be to hack the lower-level code to try to find out what 
exactly it is complaining about.  Wordpad doesn't show line numbers for me, 
but it looks like the error message is coming from whatever parser has been 
instantiated, and that goes back to  [somewhere]\pyexpat.py, at which point 
I've lost the trail.

An easy thing to do would be to try another service, and see if you still 
get the same error.

/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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to