Page 1 of 1

(Maybe) Bug in WebService "newEmailMailingWithReplyRequ

Posted: Tue Sep 16, 2008 12:38 pm
by doubledutch
Hi,

We seem to have found a bug in newEmailMailingWithReplyRequest in 5.5.0 unless we are doing something wrong. We have configured a Template (ID=105) which we want to use to create Mailings from. We use this call ass follows (in PHP):

Code: Select all

		$shortname 		= 	"MyShortName";
		$description 	= 	"just testing"; 
		$mailinglist_id = 	3;
		$target_id['0']	=	0;	// Documenation appears incorrect.
		$mailing_type 	= 	0; 
		$template_id 	= 	105;
		$email_subject 	= 	"My New Subject";	
		$email_sender 	= 	"My@Email.com";
		$email_charset 	= 	"iso-8859-1";
		$email_linefeed = 	"\n\r";
		$email_format 	= 	1;

		$params = array (	'username' 		=>	(string)	$this->loginCredential['login'],
							'password' 		=>	(string)	$this->loginCredential['password'],
							'shortname'		=>	(string)	$shortname,
							'description'	=>	(string)	$description,
							'mailinglistID' => 	(int)		$mailinglist_id,
							'targetID' 		=> 				$target_id, 
							'mailingType' 	=> 	(int)		$mailing_type,
							'templateID'	=>	(int)		$template_id,
							'emailSubject'	=> 	(string)	$email_subject,
							'emailSender'	=>	(string)	$email_sender,
							'emailCharset'	=>	(string)	$email_charset,
							'emailLinefeed'	=>	(int)		$email_linefeed,
							'emailFormat'	=>	(int)		$email_format
						); 

		$mailing_id = $this->soapClient->__soapCall('newEmailMailing', $params);
We are unsure about the target ID definition but the result of the above call is that:

a) A new mailing is created (which is great!)
b) The content of Template 105 is initialized back to the default settings! (which is wrong we believe)

We must be doing something wrong. Can somoen suggest what we are doing wrong or is this a bug which is maybe fixed in 5.5.1?

Thanks in advance

Leon

Posted: Wed Sep 17, 2008 4:37 pm
by doubledutch
Having investigated this further; I'm even more confused now and would really appreciate someone's help if possible.

I just created a new template (ID 117) and having looked in the "component_tbl" 2 component records have been created for this template:

component_id 392 and 393 both of which are assigned to mailing_id 117. If I now execute the

newEmailMailingWithReply

function and look in the database again, component_id's 392 and 393 are still there BUT they now have mailing_id 118! So the components associated with my template seem to have gone.

Posted: Thu Sep 18, 2008 11:46 am
by maschoff
There seems to be a bug. If so, we will develop a bug fix and distribute it via SourceForge. Stay tuned!

Posted: Wed Nov 12, 2008 5:33 pm
by mhuber84
I've got a problem with the methods newEmailMailingWithReplyRequest and newEmailMailing, too. When I create a new mailing without a template everything works fine and the two standard-contentblocks are inserted, but when I insert a templateId the template's email-data (subject, sender, reply and so on) is updated and no new mailing is created.
This happens when I try to use the webservice with php and when I try to use the webservice with the EmmSoapClient.sh directly on the server.
Any suggestions?

Posted: Wed Nov 12, 2008 9:32 pm
by maschoff
This is a bug. We will provide a patch via the SourceForge bugtracker soon. Please stay tuned!

Posted: Thu Nov 13, 2008 8:40 am
by maschoff
What version of OpenEMM do you use? Could you please post how you call the method (signature and attributes)?

Posted: Thu Nov 13, 2008 9:48 am
by mhuber84
I'm using OpenEMM5.5.1. I tested the following lines in the VMware-version on Windows XP and on a Debian-server. Both times i got the same results.

I have created a mailinglist with the id 2 and a template with the id 5.
On the server I changed to the folder /home/openemm/webservices/ and typed in

Code: Select all

./EmmSoapClient.sh newEmailMailing xxxx xxxx testname testdesc 2 0 0 5 testsubject marco.huber@marit.ag iso-8859-1 \n\r 2
Then I get this output:

Code: Select all

Subject: testsubject
Sender: marco.huber@marit.ag
Charset: iso-8859-1
MAILING_ID: 0
I also have create a wsdl-file and tested it with php. I get no errors and the method returns 0. Only the template's entry in the mailing_mt_tbl is changed.