title: SOAP ( suds-jurko) : urllib.error.HTTPError: HTTP Error 400: Bad Request
body: <p>I'm trying to use this web service : <a href="http://bsestarmfdemo.bseindia.com/MFOrderEntry/MFOrder.svc" rel="nofollow">http://bsestarmfdemo.bseindia.com/MFOrderEntry/MFOrder.svc</a></p>
  
  <p>This is my python code to call the endpoint <code>getPassword</code> : </p>
  
  <pre><code>from suds.client import Client
  import logging
  
  logging.basicConfig(level=logging.DEBUG)
  logging.getLogger('suds.client').setLevel(logging.DEBUG)
  
  wsdl_url = 'http://bsestarmfdemo.bseindia.com/MFOrderEntry/MFOrder.svc?wsdl'
  
  client = Client(wsdl_url, headers= { 'Content-Type' : 'application/soap+xml; charset=utf-8' } )
  
  result = client.service.getPassword(UserId='XXXXXXX', Password='XXXXX', PassKey='passkey123')
  </code></pre>
  
  <p>This is throwing an error, this is the DEBUG output : </p>
  
  <pre><code>DEBUG:suds.client:HTTP failed - 400 - Bad Request:
  b'Bad Request'
  ERROR:suds.client:&lt;suds.sax.document.Document object at 0x1034ebc18&gt;
  Traceback (most recent call last):
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/site-packages/suds/transport/http.py", line 82, in send
      fp = self.u2open(u2request)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/site-packages/suds/transport/http.py", line 132, in u2open
      return url.open(u2request, timeout=tm)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/urllib/request.py", line 469, in open
      response = meth(req, response)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/urllib/request.py", line 579, in http_response
      'http', request, response, code, msg, hdrs)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/urllib/request.py", line 507, in error
      return self._call_chain(*args)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/urllib/request.py", line 441, in _call_chain
      result = func(*args)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/urllib/request.py", line 587, in http_error_default
      raise HTTPError(req.full_url, code, msg, hdrs, fp)
  urllib.error.HTTPError: HTTP Error 400: Bad Request
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/site-packages/suds/client.py", line 613, in send
      reply = self.options.transport.send(request)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/site-packages/suds/transport/https.py", line 66, in send
      return HttpTransport.send(self, request)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/site-packages/suds/transport/http.py", line 94, in send
      raise TransportError(e.msg, e.code, e.fp)
  suds.transport.TransportError: Bad Request
  
  During handling of the above exception, another exception occurred:
  
  Traceback (most recent call last):
    File "test.py", line 14, in &lt;module&gt;
      result = client.service.getPassword(UserId='XXXXX', Password='XXXXX', PassKey='passkey123')
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/site-packages/suds/client.py", line 521, in __call__
      return client.invoke(args, kwargs)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/site-packages/suds/client.py", line 581, in invoke
      result = self.send(soapenv)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/site-packages/suds/client.py", line 619, in send
      description=tostr(e), original_soapenv=original_soapenv)
    File "/Users/mohit/anaconda3/envs/py34/lib/python3.4/site-packages/suds/client.py", line 677, in process_reply
      raise Exception((status, description))
  Exception: (400, 'Bad Request')
  </code></pre>
  
  <p>How do I fix this ? Any clue appreciated, thanks!</p>