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 "http://192.168.2.79:8080/emm_webservice"
-n "urn:agnitas-webservice" -w ALL
org.agnitas.webservice.EmmWebService_Port
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 http://192.168.2.79:8080/ws.wsdl.
Also, it appears that running http://192.168.2.79:8080/emm_webservice displays the following results, though the link is a 404:
- Code: Select all
<h2>And now... Some Services</h2>
<ul>
<li>urn:agnitas-webservice <a href="http://192.168.2.79:8080/services/urn:agnitas-webservice?wsdl"><i>(wsdl)</i></a></li>
<ul>
<li>sendMailing
<li>newEmailMailing
<li>insertContent
<li>deleteContent
<li>addSubscriber
<li>getSubscriber
<li>findSubscriber
<li>deleteSubscriber
<li>setSubscriberBinding
<li>newEmailMailingWithReply
<li>updateEmailMailing
<li>getSubscriberBinding
<li>updateSubscriber
</ul>
</ul>
When I attempt to run this from php with the following code, I get the error below:
- Code: Select all
<?
include('OpenEMM.php');
$openemm = new OpenEMM('http://192.168.2.79:8080/ws.wsdl', 'marketing', 'success');
var_dump($openemm->getSubscriber(17));
?>
- 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 http://192.168.2.79:8080/emm_webservice ... Subscriber I get:
- Code: Select all
<soapenv:Envelope>
−
<soapenv:Body>
−
<soapenv:Fault>
<faultcode>ns1:Server.NoService</faultcode>
−
<faultstring>
The AXIS engine could not find a target service to invoke! targetService is null
</faultstring>
−
<detail>
<ns2:hostname>scktdb2.socket.net</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
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.
