compile:
mvn clean compile assembly:single
start XML-RPC Server:
java -cp target/xmlrpc-test-server-1.0-jar-with-dependencies.jar net.thomd.JavaServer
monitor any traffic on loopback interface on port 8080:
ngrep -d lo0 port 8080
call method sumAndDifference(11,7)
:
python -c 'import xmlrpclib; print xmlrpclib.Server("http://localhost:8080/RPC2").sample.sumAndDifference(11,7)'
Hi i need a help
I have run this code i am getting an error, i dont know how to resolve this please help
python -c 'import xmlrpclib; print xmlrpclib.Server("http://localhost:8080/RPC2").sample.sumAndDifference(11,7)'
my error message
$ python -c 'import xmlrpclib; print xmlrpclib.Server("http://localhost:8080/RPC2").sample.sumAndDifference(11,7)' Traceback (most recent call last): File "<string>", line 1, in <module> File "/usr/lib/python2.7/xmlrpclib.py", line 1233, in __call__ return self.__send(self.__name, args) File "/usr/lib/python2.7/xmlrpclib.py", line 1591, in __request verbose=self.__verbose File "/usr/lib/python2.7/xmlrpclib.py", line 1273, in request return self.single_request(host, handler, request_body, verbose) File "/usr/lib/python2.7/xmlrpclib.py", line 1306, in single_request return self.parse_response(response) File "/usr/lib/python2.7/xmlrpclib.py", line 1482, in parse_response return u.close() File "/usr/lib/python2.7/xmlrpclib.py", line 794, in close raise Fault(**self._stack[0]) xmlrpclib.Fault: <Fault 0: 'java.lang.ClassNotFoundException: SAX driver not found: org.apache.xerces.parsers.SAXParser'>
But i am open in browser that url "http://localhost:8080/" i am geting this
Method GET not implemented (try POST)
in browser