mantisConnect Encoding

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
ceguyot
Posts: 7
Joined: 17 May 2010, 10:45

mantisConnect Encoding

Post 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
atrol
Site Admin
Posts: 8374
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: mantisConnect Encoding

Post 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.
Please use Search before posting and read the Manual
ceguyot
Posts: 7
Joined: 17 May 2010, 10:45

Re: mantisConnect Encoding

Post 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.
tetsunami
Posts: 26
Joined: 21 Apr 2010, 14:45

Re: mantisConnect Encoding

Post 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:
ceguyot
Posts: 7
Joined: 17 May 2010, 10:45

Re: mantisConnect Encoding

Post 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!
tetsunami
Posts: 26
Joined: 21 Apr 2010, 14:45

Re: mantisConnect Encoding

Post by tetsunami »

excel im gonna try it

ill tell later
Post Reply