Page 1 of 1

mantisConnect Encoding

Posted: 31 May 2010, 08:59
by ceguyot
Hi all,

I use Mantisconnect to create issues in Mantis from TestLink. Everything works fine but character "< >" and "&" are automatic deleted. TestLink and Mantis are on a debian server and I use PHP 5.2.9.

thanks

Re: mantisConnect Encoding

Posted: 31 May 2010, 09:15
by atrol
Maybe this is caused by the following known bug
http://www.mantisbt.org/bugs/view.php?id=10322

I had no deeper look at this, but there are some bugs fixed in next version related to SOAP API and also the underlying NuSOAP library has been updated, see
http://www.mantisbt.org/bugs/changelog_ ... ion_id=110

So testing a nightly 1.2.x build could be worth a try.

Re: mantisConnect Encoding

Posted: 31 May 2010, 09:57
by ceguyot
Thank for your answer

I think is the same bug, I have also noticed that mantis delete "&" only on the debian server when I run the same version on my PC (windows XP) he doesn't delete it.

I will look at the nightly build now.

Re: mantisConnect Encoding

Posted: 09 Jun 2010, 16:20
by tetsunami
can you explain how to use the mantisconnect from the basics ?? plzz i just downloaded the mantis java api but i dont know if i need to add jar to a web app or what
plzz some help :cry:

Re: mantisConnect Encoding

Posted: 11 Jun 2010, 08:00
by ceguyot
Hi

I use the php version, first I have to create Soap Client Class :

Code: Select all

<?php

abstract class mc_soapClient
{
	
	/**
	 * Instance soapClient
	 *
	 * @static 
	 * @var stdClass
	 */
	private static $_instance;
 
	/**
	 * Url du wsdl de mantis
	 *
	 */
	const WSDL = WEBSERVICE_MANTIS;

	private function __construct() { }
 
	private function __clone() { }
 
	/**
	 * Renvoie l'instance d'un client soap
	 *
	 * @param array $auth
	 * @return stdClass
	 */
	public static function getInstance()
	{
		if(!isset(self::$_instance)) {
			self::$_instance = new SoapClient(self::WSDL);
		}
		return self::$_instance;
	}
}
?>


And then I contact the mantis Api like that :
$client_soap = mc_soapClient::getInstance(); //Soap client creation
$p_issue = create_issue($db,$execution_id,$project_selected); // a function I have created to create a p_issue
$id_bug = $client_soap->__soapCall('mc_issue_add', array(USERNAME_MANTIS,PASSWORD_MANTIS, $p_issue));
Good luck!

Re: mantisConnect Encoding

Posted: 11 Jun 2010, 17:15
by tetsunami
excel im gonna try it

ill tell later