title: Accessing a web service
body: <p>I have been trying to write a client to access a web service for work. I have successfully written clients using SUDS and ZSI with Python. I have used NetBeans 6.9 to assist in writing a few Java clients. The successful clients have all been accessing freely available web services I have found on the internet.</p>
  
  <p>The client I need to connect to for work is not proving to be so friendly. It does require authentication:</p>
  
  <p><a href="http://www.cmicdataservices.com/datacenter/service.asmx" rel="nofollow">http://www.cmicdataservices.com/datacenter/service.asmx</a></p>
  
  <p>If I grab the WSDL descriptions of this web service I see there are six methods.</p>
  
  <pre><code>Methods (6):
      CheckIfAuthorized()
      DataProcessed()
      GetCurrentDataVer1()
      GetID()
      LogDSCStatus(xs:string _clientname, xs:string _status, xs:string _errormsg)
      ResetNewDataReferences()
  </code></pre>
  
  <p>There are 70 types returned as well. One of them being an Authentication type.</p>
  
  <p>In my Python and Java clients I have been able to create these Authentication objects but have not been able to do anything further.</p>
  
  <p>From the WSDL there is no indication to me that there is any way to create these authentication objects with what is available. The supplier of the web service does offer a client built using Adobe Air and I can test with that to ensure that I can authenticate to the webservice and consume it. </p>
  
  <p>This is the first time I have had to interface with a web service and I am not sure if there is anything I am missing here. Can anyone tell me if there is something obvious that I am missing here as to how to authenticate with this service?</p>
  
  <p>Here is the the Python client I wrote plus it's output. You can see a nice printout of the WSDL info if you uncomment the print client line.</p>
  
  <pre><code>#!/usr/bin/python
  
  from suds.client import Client
  
  url='http://www.cmicdataservices.com/datacenter/service.asmx?wsdl'
  client = Client(url)
  
  
  #print client
  print client.service.CheckIfAuthorized()
  </code></pre>
  
  <p>The output:</p>
  
  <pre><code>Traceback (most recent call last):
    File "CMICTest.py", line 23, in &lt;module&gt;
      print client.service.CheckIfAuthorized()
    File "/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg  /suds/client.py",      line 542, in __call__
   return client.invoke(args, kwargs)
    File "/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/client.py",  line 602, in invoke
    result = self.send(soapenv)
    File "/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/client.py",  line 649, in send
    result = self.failed(binding, e)
    File "/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/client.py",  line 702, in failed
    r, p = binding.get_fault(reply)
   File "/usr/local/lib/python2.6/dist-packages/suds-0.4-py2.6.egg/suds/bindings /binding.py", line 265, in get_fault
  raise WebFault(p, faultroot)
  suds.WebFault: Server raised fault: 'Server was unable to process request. ---&gt; Object reference not set to an instance of an object.'
  </code></pre>