I installed rapidsms in local for send messages. The application tested with local server. Now i would like to store the incoming messages in another database via a php application. Means when a message received in rapidsms (Django-Python) app, i want to call a php application function and store message in php app database. For this which method is best?
As you describe your wishes (the description could be a bit more precise),
the web service would not be in Python but in PHP.
When your PHP application would provide a SOAP/WSDL webservice,
then you could use a Python webservice client, e.g. "suds",
to interface with such a webservice.
When your PHP application would provide a REST webservice,
other Python libraries ("urllib", "json", ...) could be used.
Details much depend on the kind of webservice provided by the PHP
application.
In typical case, I find the approach a bit convoluted. In those cases,
the Python application would directly store the messages in the
database - not send them to a second web service for storing.
But, there are cases where the approach may make sense - e.g.
when there is already such a second web service (which just needs to
be used).