Page 1 of 1

Problem OpenEMM WebService & PHP - SetSubscriberBinding

Posted: Tue Oct 14, 2008 1:55 pm
by flambeur
Hi!!

I've got a problem with OpenEMM webservices with the SetSubscriberBinding method only.

I can call $client->addSubscriber() but when i call
$client->setSubscriberBinding()

I've got this error message in php:
SoapFault
No such operation 'setSubscriberBinding'

I really don't have a clue how to solve this problem...
Help would be really much appreciated!
Thanx

edit: forgot to tell:
open emm version is 5.5.1

Posted: Tue Oct 14, 2008 1:57 pm
by flambeur
Here is a copy of my wsdl file

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<definitions targetNamespace="urn:agnitas-webservice" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="urn:agnitas-webservice" xmlns:intf="urn:agnitas-webservice" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
 <wsdl:types>
  <schema targetNamespace="urn:agnitas-webservice" xmlns="http://www.w3.org/2001/XMLSchema">
   <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
   <complexType name="StringArrayType">
    <sequence>
     <element maxOccurs="unbounded" minOccurs="0" name="x" type="xsd:string"/>
    </sequence>
   </complexType>
   <complexType name="SubscriberData">
    <sequence>
     <element name="paramNames" type="impl:StringArrayType"/>
     <element name="paramValues" type="impl:StringArrayType"/>
     <element name="customerID" type="xsd:int"/>
    </sequence>
   </complexType>
  </schema>
 </wsdl:types>

   <message name="deleteContentResponse">

      <part name="deleteContentReturn" type="xsd:int"/>

   </message>

   <message name="addSubscriberRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:boolean"/>

      <part name="in3" type="soapenc:string"/>

      <part name="in4" type="xsd:boolean"/>

      <part name="in5" type="impl:StringArrayType"/>

      <part name="in6" type="impl:StringArrayType"/>

   </message>

   <message name="deleteContentRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:int"/>

   </message>

   <message name="addSubscriberResponse">

      <part name="addSubscriberReturn" type="xsd:int"/>

   </message>

   <message name="newEmailMailingResponse">

      <part name="newEmailMailingReturn" type="xsd:int"/>

   </message>

   <message name="deleteSubscriberResponse">

      <part name="deleteSubscriberReturn" type="xsd:int"/>

   </message>

   <message name="getSubscriberResponse">

      <part name="getSubscriberReturn" type="impl:SubscriberData"/>

   </message>

   <message name="setSubscriberBindingResponse">

      <part name="setSubscriberBindingReturn" type="xsd:int"/>

   </message>

   <message name="getSubscriberBindingRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:int"/>

      <part name="in3" type="xsd:int"/>

      <part name="in4" type="xsd:int"/>

   </message>

   <message name="insertContentResponse">

      <part name="insertContentReturn" type="xsd:int"/>

   </message>

   <message name="newEmailMailingRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="soapenc:string"/>

      <part name="in3" type="soapenc:string"/>

      <part name="in4" type="xsd:int"/>

      <part name="in5" type="impl:StringArrayType"/>

      <part name="in6" type="xsd:int"/>

      <part name="in7" type="xsd:int"/>

      <part name="in8" type="soapenc:string"/>

      <part name="in9" type="soapenc:string"/>

      <part name="in10" type="soapenc:string"/>

      <part name="in11" type="xsd:int"/>

      <part name="in12" type="xsd:int"/>

   </message>

   <message name="updateSubscriberRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:int"/>

      <part name="in3" type="impl:StringArrayType"/>

      <part name="in4" type="impl:StringArrayType"/>

   </message>

   <message name="deleteSubscriberRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:int"/>

   </message>

   <message name="getSubscriberBindingResponse">

      <part name="getSubscriberBindingReturn" type="soapenc:string"/>

   </message>

   <message name="sendMailingResponse">

      <part name="sendMailingReturn" type="xsd:int"/>

   </message>

   <message name="insertContentRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:int"/>

      <part name="in3" type="soapenc:string"/>

      <part name="in4" type="soapenc:string"/>

      <part name="in5" type="xsd:int"/>

      <part name="in6" type="xsd:int"/>

   </message>

   <message name="findSubscriberResponse">

      <part name="findSubscriberReturn" type="xsd:int"/>

   </message>

   <message name="findSubscriberRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="soapenc:string"/>

      <part name="in3" type="soapenc:string"/>

   </message>

   <message name="updateEmailMailingRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:int"/>

      <part name="in3" type="soapenc:string"/>

      <part name="in4" type="soapenc:string"/>

      <part name="in5" type="xsd:int"/>

      <part name="in6" type="impl:StringArrayType"/>

      <part name="in7" type="xsd:int"/>

      <part name="in8" type="soapenc:string"/>

      <part name="in9" type="soapenc:string"/>

      <part name="in10" type="soapenc:string"/>

      <part name="in11" type="soapenc:string"/>

      <part name="in12" type="xsd:int"/>

      <part name="in13" type="xsd:int"/>

   </message>

   <message name="setSubscriberBindingRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:int"/>

      <part name="in3" type="xsd:int"/>

      <part name="in4" type="xsd:int"/>

      <part name="in5" type="xsd:int"/>

      <part name="in6" type="soapenc:string"/>

      <part name="in7" type="soapenc:string"/>

      <part name="in8" type="xsd:int"/>

   </message>

   <message name="updateSubscriberResponse">

      <part name="updateSubscriberReturn" type="xsd:boolean"/>

   </message>

   <message name="newEmailMailingWithReplyResponse">

      <part name="newEmailMailingWithReplyReturn" type="xsd:int"/>

   </message>

   <message name="sendMailingRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:int"/>

      <part name="in3" type="soapenc:string"/>

      <part name="in4" type="xsd:int"/>

      <part name="in5" type="xsd:int"/>

      <part name="in6" type="xsd:int"/>

   </message>

   <message name="getSubscriberRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="xsd:int"/>

   </message>

   <message name="newEmailMailingWithReplyRequest">

      <part name="in0" type="soapenc:string"/>

      <part name="in1" type="soapenc:string"/>

      <part name="in2" type="soapenc:string"/>

      <part name="in3" type="soapenc:string"/>

      <part name="in4" type="xsd:int"/>

      <part name="in5" type="impl:StringArrayType"/>

      <part name="in6" type="xsd:int"/>

      <part name="in7" type="xsd:int"/>

      <part name="in8" type="soapenc:string"/>

      <part name="in9" type="soapenc:string"/>

      <part name="in10" type="soapenc:string"/>

      <part name="in11" type="soapenc:string"/>

      <part name="in12" type="xsd:int"/>

      <part name="in13" type="xsd:int"/>

   </message>

   <message name="updateEmailMailingResponse">

      <part name="updateEmailMailingReturn" type="xsd:boolean"/>

   </message>

   <portType name="EmmWebService_Port">

      <operation name="newEmailMailing" parameterOrder="in0 in1 in2 in3 in4 in5 in6 in7 in8 in9 in10 in11 in12">

         <input message="impl:newEmailMailingRequest" name="newEmailMailingRequest"/>

         <output message="impl:newEmailMailingResponse" name="newEmailMailingResponse"/>

      </operation>

      <operation name="newEmailMailingWithReply" parameterOrder="in0 in1 in2 in3 in4 in5 in6 in7 in8 in9 in10 in11 in12 in13">

         <input message="impl:newEmailMailingWithReplyRequest" name="newEmailMailingWithReplyRequest"/>

         <output message="impl:newEmailMailingWithReplyResponse" name="newEmailMailingWithReplyResponse"/>

      </operation>

      <operation name="updateEmailMailing" parameterOrder="in0 in1 in2 in3 in4 in5 in6 in7 in8 in9 in10 in11 in12 in13">

         <input message="impl:updateEmailMailingRequest" name="updateEmailMailingRequest"/>

         <output message="impl:updateEmailMailingResponse" name="updateEmailMailingResponse"/>

      </operation>

      <operation name="insertContent" parameterOrder="in0 in1 in2 in3 in4 in5 in6">

         <input message="impl:insertContentRequest" name="insertContentRequest"/>

         <output message="impl:insertContentResponse" name="insertContentResponse"/>

      </operation>

      <operation name="deleteContent" parameterOrder="in0 in1 in2">

         <input message="impl:deleteContentRequest" name="deleteContentRequest"/>

         <output message="impl:deleteContentResponse" name="deleteContentResponse"/>

      </operation>

      <operation name="sendMailing" parameterOrder="in0 in1 in2 in3 in4 in5 in6">

         <input message="impl:sendMailingRequest" name="sendMailingRequest"/>

         <output message="impl:sendMailingResponse" name="sendMailingResponse"/>

      </operation>

      <operation name="addSubscriber" parameterOrder="in0 in1 in2 in3 in4 in5 in6">

         <input message="impl:addSubscriberRequest" name="addSubscriberRequest"/>

         <output message="impl:addSubscriberResponse" name="addSubscriberResponse"/>

      </operation>

      <operation name="getSubscriber" parameterOrder="in0 in1 in2">

         <input message="impl:getSubscriberRequest" name="getSubscriberRequest"/>

         <output message="impl:getSubscriberResponse" name="getSubscriberResponse"/>

      </operation>

      <operation name="findSubscriber" parameterOrder="in0 in1 in2 in3">

         <input message="impl:findSubscriberRequest" name="findSubscriberRequest"/>

         <output message="impl:findSubscriberResponse" name="findSubscriberResponse"/>

      </operation>

      <operation name="setSubscriberBinding" parameterOrder="in0 in1 in2 in3 in4 in5 in6 in7 in8">

         <input message="impl:setSubscriberBindingRequest" name="setSubscriberBindingRequest"/>

         <output message="impl:setSubscriberBindingResponse" name="setSubscriberBindingResponse"/>

      </operation>

      <operation name="deleteSubscriber" parameterOrder="in0 in1 in2">

         <input message="impl:deleteSubscriberRequest" name="deleteSubscriberRequest"/>

         <output message="impl:deleteSubscriberResponse" name="deleteSubscriberResponse"/>

      </operation>

      <operation name="getSubscriberBinding" parameterOrder="in0 in1 in2 in3 in4">

         <input message="impl:getSubscriberBindingRequest" name="getSubscriberBindingRequest"/>

         <output message="impl:getSubscriberBindingResponse" name="getSubscriberBindingResponse"/>

      </operation>

      <operation name="updateSubscriber" parameterOrder="in0 in1 in2 in3 in4">

         <input message="impl:updateSubscriberRequest" name="updateSubscriberRequest"/>

         <output message="impl:updateSubscriberResponse" name="updateSubscriberResponse"/>

      </operation>

   </portType>

   <binding name="emm_webserviceSoapBinding" type="impl:EmmWebService_Port">

      <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>

      <operation name="newEmailMailing">

         <wsdlsoap:operation soapAction=""/>

         <input name="newEmailMailingRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="newEmailMailingResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="newEmailMailingWithReply">

         <wsdlsoap:operation soapAction=""/>

         <input name="newEmailMailingWithReplyRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="newEmailMailingWithReplyResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="updateEmailMailing">

         <wsdlsoap:operation soapAction=""/>

         <input name="updateEmailMailingRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="updateEmailMailingResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="insertContent">

         <wsdlsoap:operation soapAction=""/>

         <input name="insertContentRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="insertContentResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="deleteContent">

         <wsdlsoap:operation soapAction=""/>

         <input name="deleteContentRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="deleteContentResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="sendMailing">

         <wsdlsoap:operation soapAction=""/>

         <input name="sendMailingRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="sendMailingResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="addSubscriber">

         <wsdlsoap:operation soapAction=""/>

         <input name="addSubscriberRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="addSubscriberResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="getSubscriber">

         <wsdlsoap:operation soapAction=""/>

         <input name="getSubscriberRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="getSubscriberResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="findSubscriber">

         <wsdlsoap:operation soapAction=""/>

         <input name="findSubscriberRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="findSubscriberResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="setSubscriberBinding">

         <wsdlsoap:operation soapAction=""/>

         <input name="setSubscriberBindingRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="setSubscriberBindingResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="deleteSubscriber">

         <wsdlsoap:operation soapAction=""/>

         <input name="deleteSubscriberRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="deleteSubscriberResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="getSubscriberBinding">

         <wsdlsoap:operation soapAction=""/>

         <input name="getSubscriberBindingRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="getSubscriberBindingResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

      <operation name="updateSubscriber">

         <wsdlsoap:operation soapAction=""/>

         <input name="updateSubscriberRequest">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </input>

         <output name="updateSubscriberResponse">

            <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="urn:agnitas-webservice" use="encoded"/>

         </output>

      </operation>

   </binding>

   <service name="EmmWebService_PortService">

      <port binding="impl:emm_webserviceSoapBinding" name="emm_webservice">

         <wsdlsoap:address location="http://ks360064.kimsufi.com:8080/emm_webservice"/>

      </port>

   </service>

</definitions>

Posted: Tue Oct 14, 2008 3:02 pm
by flambeur
Ok... bug found and SQUASHED!!!!!

There is a bug in the OpenEMM php Class...

The param array isn't filled with all the params, so it provoke a bug...
Change it by this one:

Code: Select all

public function setSubscriberBinding($subscriber_id, $mailinglist_id, $status = 1, $binding_type = 'W', $remark = '', $exit_mailing_id = 0, $mediatype = 0) {
		$params = array (
			'in0' => $this->loginCredential['login'],
			'in1' => $this->loginCredential['password'],
			'in2' => $subscriber_id,
			'in3' => $mailinglist_id,
			'in4' => $mediatype,
			'in5' => $status,
			'in6' => $binding_type,
			'in7' => $remark,
			'in8' => $exit_mailing_id
		);
		$updated_subscriber_id = $this->soapClient->__soapCall('setSubscriberBinding', $params); // returns the customer_id/subscriber_id of updated/added subscriber
		return $updated_subscriber_id === $subscriber_id; // the ids have to match to indicate an correct, valid update
	}
and it will be ok.