Webservices and Axis Target Service problem...

Use this forum for questions regarding installation, upgrading and configuration of OpenEMM

Moderator: moderator

Webservices and Axis Target Service problem...

Postby aheman » Thu Mar 11, 2010 9:37 pm

I am having some problems getting webservices to work using the php class from http://enarion.net/programming/php/openemm/. I have two seperate servers here, one with the OpenEMM program and database, and another with a php webserver that I'm attempting to use to access it.

Following the documentation in the Webservices PDF, I created a web services username and password and then ran the command

Code: Select all
./EmmCreateWSDL.sh -o ws.wsdl -l ""
-n "urn:agnitas-webservice" -w ALL

Without the line breaks of course.

I then copied the created ws.wsdl file over to /home/openemm/webapps/core/ws.wsdl

From there, I can access the file and view the xml at

Also, it appears that running displays the following results, though the link is a 404:

Code: Select all
<h2>And now... Some Services</h2>
<li>urn:agnitas-webservice <a href=""><i>(wsdl)</i></a></li>


When I attempt to run this from php with the following code, I get the error below:

Code: Select all
$openemm = new OpenEMM('', 'marketing', 'success');

Code: Select all
Fatal error: Uncaught SoapFault exception: [ns1:Server.NoService] The AXIS engine could not find a target service to invoke! targetService is null

The code in the php class that was called was simply:

Code: Select all
   public function getSubscriber($subscriber_id) {
      $params = array (
         'in0' => $this->loginCredential['login'],
         'in1' => $this->loginCredential['password'],
         'in2' => $subscriber_id
      $soapResult = $this->soapClient->__soapCall('getSubscriber', $params);
      // TODO check + validate result
      return $this->__generateArrayFromSOAPResult($soapResult->paramNames->x, $soapResult->paramValues->x);

When I direct a browser window to ... Subscriber I get:

Code: Select all
The AXIS engine could not find a target service to invoke!  targetService is null

I've read through a number of threads and a lot of googling has turned up some ideas, but not much I've been able to do. I was wondering if there are any specific problems with attempting to run this from another server, or if it's possible that I'm missing something glaringly obvious like needing to set up Axis in java or potentially modify any source code.

Thanks in advance if anyone can offer any help.
Posts: 7
Joined: Thu Mar 11, 2010 9:24 pm

Postby aheman » Mon Mar 15, 2010 9:33 pm

After working for some time (and upgrading to 6.0.1) I'm now able to use all of the webservices in the API for 5.5.1 but nothing new that was added in 6.0.0 (the add/delete mailing list options).

Also when I attempt to run the commands from linux using the .sh script, I'm getting java errors for an index out of bounds exception on line 13. Any ideas?
Posts: 7
Joined: Thu Mar 11, 2010 9:24 pm

Postby aheman » Tue Mar 16, 2010 4:01 pm

Looking at the source, the problem appears to be as simple as an array that's not large enough. On line 41 of EmmWebServiceBindingStub.java an array is declared of size 13, and on line 266 something gets declared as 14.

Now trying to recompile this with the fix...
Posts: 7
Joined: Thu Mar 11, 2010 9:24 pm

Postby maschoff » Tue May 04, 2010 8:24 am

Is "index out of bounds exception" gone now?
OpenEMM Maintainer
Site Admin
Posts: 2127
Joined: Thu Aug 03, 2006 10:20 am
Location: Munich, Germany

Return to Installation & Upgrades

Who is online

Users browsing this forum: Google [Bot] and 0 guests