So it seems like the problem is that you are doing `import http` on line 24 of /home/akhil/Documents/NIVIN/NIVIN/svn/CrossFraudet/ branches/V2.1.0/crossfraudet/cdrimport/views/fraud_summary_view.py rather than `import httplib`. Python2 doesn't have a module in the standard library named `http`, only `httplib`.
As an aside, if you are connecting to a SOAP service, you might consider using requests.py or SUDS <http://stackoverflow.com/questions/18175489/python-soap-using-requests>. On Wed, Mar 18, 2015 at 11:35 AM, Nivin Paul <nivinec...@gmail.com> wrote: > ImportError at /cdrimport/settings/fraudsummary/disconnect/ > > No module named http > > Request Method: GET Request URL: > http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3 > Django > Version: 1.6.4 Exception Type: ImportError Exception Value: > > No module named http > > Exception Location: > /home/akhil/Documents/NIVIN/NIVIN/svn/CrossFraudet/branches/V2.1.0/crossfraudet/cdrimport/views/fraud_summary_view.py > in <module>, line 24 Python Executable: /usr/bin/python Python Version: > 2.7.6 Python Path: > > ['/home/akhil/Documents/NIVIN/NIVIN/svn/CrossFraudet/branches/V2.1.0/crossfraudet', > '/usr/local/lib/python2.7/dist-packages/gevent-1.0.1-py2.7-linux-x86_64.egg', > > '/usr/local/lib/python2.7/dist-packages/greenlet-0.4.2-py2.7-linux-x86_64.egg', > '/usr/lib/python2.7', > '/usr/lib/python2.7/plat-x86_64-linux-gnu', > '/usr/lib/python2.7/lib-tk', > '/usr/lib/python2.7/lib-old', > '/usr/lib/python2.7/lib-dynload', > '/usr/local/lib/python2.7/dist-packages', > '/usr/lib/python2.7/dist-packages', > '/usr/lib/python2.7/dist-packages/PILcompat', > '/usr/lib/python2.7/dist-packages/gtk-2.0', > '/usr/lib/pymodules/python2.7', > '/usr/lib/python2.7/dist-packages/ubuntu-sso-client', > '/usr/lib/python2.7/dist-packages/wx-2.8-gtk2-unicode'] > > Server time: Wed, 18 Mar 2015 16:32:22 +0000 > Traceback Switch to copy-and-paste view > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > > - /usr/local/lib/python2.7/dist-packages/django/core/handlers/base.py > in get_response > 1. > > resolver_match = resolver.resolve(request.path_info) > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - /usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py > in resolve > 1. > > for pattern in self.url_patterns: > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - /usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py > in url_patterns > 1. > > patterns = getattr(self.urlconf_module, "urlpatterns", > self.urlconf_module) > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - /usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py > in urlconf_module > 1. > > self._urlconf_module = import_module(self.urlconf_name) > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - /usr/local/lib/python2.7/dist-packages/django/utils/importlib.py in > import_module > 1. > > __import__(name) > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - > > /home/akhil/Documents/NIVIN/NIVIN/svn/CrossFraudet/branches/V2.1.0/crossfraudet/crossfraudet/urls.py > in <module> > 1. > > url( r'^cdrimport/', include( 'cdrimport.urls' ) ), > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - /usr/local/lib/python2.7/dist-packages/django/conf/urls/__init__.py > in include > 1. > > urlconf_module = import_module(urlconf_module) > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - /usr/local/lib/python2.7/dist-packages/django/utils/importlib.py in > import_module > 1. > > __import__(name) > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - > > /home/akhil/Documents/NIVIN/NIVIN/svn/CrossFraudet/branches/V2.1.0/crossfraudet/cdrimport/urls.py > in <module> > 1. > > import views > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - > > /home/akhil/Documents/NIVIN/NIVIN/svn/CrossFraudet/branches/V2.1.0/crossfraudet/cdrimport/views/__init__.py > in <module> > 1. > > from fraud_summary_view import FraudSummaryListView, > FraudDetectionListView, Fraudblock, Frauddisconnect > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > - > > /home/akhil/Documents/NIVIN/NIVIN/svn/CrossFraudet/branches/V2.1.0/crossfraudet/cdrimport/views/fraud_summary_view.py > in <module> > 1. > > import http > > ... > ▶ Local vars > > <http://192.168.12.59:8080/cdrimport/settings/fraudsummary/disconnect/?id=3#> > > > On Wednesday, March 18, 2015 at 9:54:40 PM UTC+5:30, Nivin Paul wrote: >> >> I need to call a web service that written using SOAP from a django >> application , to do that i used the following code but i got error as in >> the attached screenshot. Please help >> >> >> import httplib >> from xml.dom import minidom >> >> http.request("POST", "/path/to/my/webservice", body=xml, headers = { >> "Host": "myservername", >> "Content-Type": "text/xml; charset=UTF-8", >> "Content-Length": len(xml) >> }) >> >> print minidom.parseString(http.getresponse().read()) >> > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-users+unsubscr...@googlegroups.com. > To post to this group, send email to django-users@googlegroups.com. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/11a1de56-632e-4c53-bc3d-6f5b7d062ee2%40googlegroups.com > <https://groups.google.com/d/msgid/django-users/11a1de56-632e-4c53-bc3d-6f5b7d062ee2%40googlegroups.com?utm_medium=email&utm_source=footer> > . > > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2By5TLYYQdubhuTWALRoPyzhi8cbRR3HwLoPsR%2BKQU7%2Byv5QpA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.