HTTP500 result from SOAP request in python
<p>this question might be fairly specific for one service but I don't understand why I am getting a HTTP500 response from the SOAP service. I am seeing the service I want to access and I see which parameters are required. Still I am getting HTTP500. Is there something wrong with the service or my code?</p>

<pre><code>#!/usr/bin/env python
# Import WSDL package
from SOAPpy import WSDL

# Create service interface
wsdlUrl = 'http://bioinf.cs.ucl.ac.uk/psipred_api/wsdl'

# Download the WSDL file
server = WSDL.Proxy(wsdlUrl)

# Get the information about which services are provided by this host
print server.methods.keys()

# After selecting the service of interest let's find out which arguments are necessary
callInfo = server.methods['PsipredSubmit']
for para in callInfo.inparams:
   print para.name, para.type

# Now let's discover what we will get back
for para in callInfo.outparams:
   print para.name, para.type

sequence = "MLELLPTAVEGVSQAQITGRPEWIWLALGTALMGLGTLYFLVKGMGVSDPDAKKFYAITTLVPAIAFTMYLSMLLGYGLTMVPFGGEQNPIYWARYADWLFTTPLLLLDLALLVDADQGTILALVGADGIMIGTGLVGALTKVYSYRFVWWAISTAAMLYILYVLFFGFTSKAESMRPEVASTFKVLRNVTVVLWSAYPVVWLIGSEGAGIVPLNIETLLFMVLDVSAKVGFGLILLRSRAIFGEAEAPEPSAGDGAAATSD"
email = "psipred@cs.ucl.ac.uk"
subject = "test"

result = server.PsipredSubmit(sequence, email, subject, "True", "False", "False", "all")

print result
</code></pre>

<p>Your code looks fine and I just tried to access the server via <code>suds</code> and it works.</p>

<pre><code>from suds.client import Client
client = Client('http://bioinf.cs.ucl.ac.uk/psipred_api/wsdl')
print('PsipredSubmit' in client.wsdl.services[0].ports[0].methods)
&gt;&gt;&gt; True
</code></pre>

<p>Are you usually using a proxy?</p>

<p>Perhaps the server was temporarily down?</p>

<hr>

<pre><code>sequence = "MLELLPTAVEGVSQAQITGRPEWIWLALGTALMGLGTLYFLVKGMGVSDPDAKKFYAITTLVPAIAFTMYLSMLLGYGLTMVPFGGEQNPIYWARYADWLFTTPLLLLDLALLVDADQGTILALVGADGIMIGTGLVGALTKVYSYRFVWWAISTAAMLYILYVLFFGFTSKAESMRPEVASTFKVLRNVTVVLWSAYPVVWLIGSEGAGIVPLNIETLLFMVLDVSAKVGFGLILLRSRAIFGEAEAPEPSAGDGAAATSD"
email = "psipred@cs.ucl.ac.uk"
subject = "test"
client.service.PsipredSubmit(sequence, email, subject, "True", "False", "False", "all")
&gt;&gt;&gt; (reply){
&gt;&gt;&gt;    message = "job submission succesful"
&gt;&gt;&gt;        job_id = "2e9f0864-826a-11e6-9da3-00163e110593"
&gt;&gt;&gt;    state = 1
&gt;&gt;&gt;      }
</code></pre>

<p>Submitting a job with <code>suds</code> works, perhaps you just caught the server at a bad time or there is something wrong with your <code>SOAP</code> library?</p>

python soap bioinformatics