I am trying to create a SOAP resource for our companies bug tracking. Its a bit of an old piece of software MantisBT.
for example, our mantis api is locally hosted as "mantis"
so getting to the soap api would be something like:
I am hoping to start off with something simple such as the last api call on the list
I am getting Bad Request as an error.
I am using this as my base URL
and this for my query specific header
Any help would be appreciated.
Hey @dlbhilbig! Still no progress to share with you here, but out of curiosity, is there a reason you're using the SOAP API instead of their REST API?
It seems like their docs are saying this SOAP API is deprecated in favor of their REST API (not sure if that requires upgrading on your end).
We are using an older version of mantis, and the restapi seems to be rather underdeveloped for our version.
No plans to upgrade as far as my boss is concerned.
Ok so I've made some progress.
I tried doing the most basic version call.
So as per the SOAP API guide, i set my resource endpoint properly.
There was a wsdl file, but... either i dont need to use it, or i don't know how, either way im ignoring it mostly except as documentation.
so, just using mantisconnect.php as my end point.
set the charset and the Content-Type properly as well.
I did not have to use the SoapAction header so, thats now gone.
Saved the resource as is.
Now for the query itself
The main part was getting this gross xml code into the RAW body.
<soapenv:Envelope xmlns:xsl="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:man="http://futureware.biz/mantisconnect">
I found this while perusing their forums and stumbled on this
They had a nice formatted text that i borrowed from.
Bonus it also shows me how to do some other queries that require a username or password.
Downside - Soap is gross and i never want to do it again.
Upside - I can do it once, do it correctly, and then never have to look at it again.