SOAP help for bug tracker

Hello all.

I am trying to create a SOAP resource for our companies bug tracking. Its a bit of an old piece of software MantisBT.

https://www.mantisbt.org/bugs/api/soap/mantisconnect.php?wsdl

for example, our mantis api is locally hosted as "mantis"
so getting to the soap api would be something like: http://mantis.mycompany.net/api/soap/mantisconnect

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
image

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).

https://support.mantishub.com/hc/en-us/articles/203574999-MantisHub-SOAP-API

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">
  <soapenv:Header/>
  <soapenv:Body>
    <man:mc_version soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    </man:mc_version>
  </soapenv:Body>
</soapenv:Envelope>

I found this while perusing their forums and stumbled on this
https://www.mantisbt.org/forums/viewtopic.php?t=25594#p65521
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.

2 Likes