From 427b49fd3a9ceb275114a73fb44a301d17513c57 Mon Sep 17 00:00:00 2001
From: Nicolas ROCHE <nroche@entrouvert.com>
Date: Sun, 27 Oct 2019 22:35:17 +0100
Subject: [PATCH 2/3] sms: add test for Orange SMS gateway connector (#36921)

---
 tests/data/orange.wsdl                        | 697 ++++++++++++++++++
 .../data/orange_sendAdvancedMessage_query.xml |  31 +
 tests/test_sms.py                             |  83 +++
 3 files changed, 811 insertions(+)
 create mode 100644 tests/data/orange.wsdl
 create mode 100644 tests/data/orange_sendAdvancedMessage_query.xml

diff --git a/tests/data/orange.wsdl b/tests/data/orange.wsdl
new file mode 100644
index 00000000..0e6a2de0
--- /dev/null
+++ b/tests/data/orange.wsdl
@@ -0,0 +1,697 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions targetNamespace="MultiDiffusionWS" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="MultiDiffusionWS" xmlns:intf="MultiDiffusionWS" 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 elementFormDefault="qualified" targetNamespace="MultiDiffusionWS" xmlns="http://www.w3.org/2001/XMLSchema">
+      <element name="sendMessage">
+        <complexType>
+          <sequence>
+            <element name="wsMessage" type="impl:WSMessage"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSMessage">
+        <sequence>
+          <element name="content" nillable="true" type="xsd:string"/>
+          <element name="custId" nillable="true" type="xsd:string"/>
+          <element name="from" nillable="true" type="xsd:string"/>
+          <element name="fullContenu" type="xsd:boolean"/>
+          <element name="orgName" nillable="true" type="xsd:string"/>
+          <element name="resumeContent" nillable="true" type="xsd:string"/>
+          <element name="sendProfiles" nillable="true" type="xsd:string"/>
+          <element name="strategy" nillable="true" type="xsd:string"/>
+          <element name="subject" nillable="true" type="xsd:string"/>
+          <element name="to" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <element name="sendMessageResponse">
+        <complexType>
+          <sequence>
+            <element name="sendMessageReturn" type="impl:WSSendReport"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSSendReport">
+        <sequence>
+          <element name="msgId" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <element name="stopMessage">
+        <complexType>
+          <sequence>
+            <element name="custId" type="xsd:string"/>
+            <element name="idMessage" type="xsd:int"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="stopMessageResponse">
+        <complexType>
+          <sequence>
+            <element name="stopMessageReturn" type="impl:WSSendReport"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="getListDescriptors">
+        <complexType>
+          <sequence>
+            <element name="custId" type="xsd:string"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="getListDescriptorsResponse">
+        <complexType>
+          <sequence>
+            <element name="getListDescriptorsReturn" type="impl:WSListDescriptors"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSListDescriptor">
+        <sequence>
+          <element name="listDescription" nillable="true" type="xsd:string"/>
+          <element name="listId" nillable="true" type="xsd:string"/>
+          <element name="listName" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <complexType name="WSListDescriptors">
+        <sequence>
+          <element maxOccurs="unbounded" name="listDescriptors" nillable="true" type="impl:WSListDescriptor"/>
+        </sequence>
+      </complexType>
+      <element name="sendAdvancedMessage">
+        <complexType>
+          <sequence>
+            <element name="wsAdvancedMessage" type="impl:WSAdvancedMessage"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSAdvancedMessage">
+        <sequence>
+          <element name="content" nillable="true" type="xsd:string"/>
+          <element name="custId" nillable="true" type="xsd:string"/>
+          <element name="faxReplyTo" nillable="true" type="xsd:string"/>
+          <element name="from" nillable="true" type="xsd:string"/>
+          <element name="fullContenu" type="xsd:boolean"/>
+          <element name="mailReplyTo" nillable="true" type="xsd:string"/>
+          <element name="orgName" nillable="true" type="xsd:string"/>
+          <element name="resumeContent" nillable="true" type="xsd:string"/>
+          <element name="sendProfiles" nillable="true" type="xsd:string"/>
+          <element name="smsReplyTo" nillable="true" type="xsd:string"/>
+          <element name="startCall" nillable="true" type="xsd:dateTime"/>
+          <element name="strategy" nillable="true" type="xsd:string"/>
+          <element name="subject" nillable="true" type="xsd:string"/>
+          <element name="telReplyTo" nillable="true" type="xsd:string"/>
+          <element name="to" nillable="true" type="xsd:string"/>
+          <element name="validFaxReplyTo" type="xsd:boolean"/>
+          <element name="validFormatMailReplyTo" type="xsd:boolean"/>
+          <element name="validMaxStartCall" type="xsd:boolean"/>
+          <element name="validMinStartCall" type="xsd:boolean"/>
+          <element name="validSmsReplyTo" type="xsd:boolean"/>
+          <element name="validTelReplyTo" type="xsd:boolean"/>
+          <element name="validityPeriod" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <element name="sendAdvancedMessageResponse">
+        <complexType>
+          <sequence>
+            <element name="sendAdvancedMessageReturn" type="impl:WSSendReport"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="listResults">
+        <complexType>
+          <sequence>
+            <element name="wsFilter" type="impl:WSListFilter"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSListFilter">
+        <sequence>
+          <element name="custId" nillable="true" type="xsd:string"/>
+          <element name="dateBegin" nillable="true" type="xsd:dateTime"/>
+          <element name="dateEnd" nillable="true" type="xsd:dateTime"/>
+          <element name="from" nillable="true" type="xsd:string"/>
+          <element maxOccurs="unbounded" name="msgIds" nillable="true" type="xsd:string"/>
+          <element name="status" nillable="true" type="xsd:string"/>
+          <element name="to" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <element name="listResultsResponse">
+        <complexType>
+          <sequence>
+            <element name="listResultsReturn" type="impl:WSResultsReport"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSResultReport">
+        <sequence>
+          <element name="attachedFileName" nillable="true" type="xsd:string"/>
+          <element name="audioFileName" nillable="true" type="xsd:string"/>
+          <element name="content" nillable="true" type="xsd:string"/>
+          <element name="custId" nillable="true" type="xsd:string"/>
+          <element name="date" nillable="true" type="xsd:dateTime"/>
+          <element name="from" nillable="true" type="xsd:string"/>
+          <element name="msgId" nillable="true" type="xsd:string"/>
+          <element name="nbProfiles" nillable="true" type="xsd:string"/>
+          <element name="orgName" nillable="true" type="xsd:string"/>
+          <element name="resumeContent" nillable="true" type="xsd:string"/>
+          <element name="status" nillable="true" type="xsd:string"/>
+          <element name="strategy" nillable="true" type="xsd:string"/>
+          <element name="subject" nillable="true" type="xsd:string"/>
+          <element name="to" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <complexType name="WSResultsReport">
+        <sequence>
+          <element maxOccurs="unbounded" name="reports" nillable="true" type="impl:WSResultReport"/>
+        </sequence>
+      </complexType>
+      <element name="listFullResults">
+        <complexType>
+          <sequence>
+            <element name="wsFilter" type="impl:WSListFilter"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="listFullResultsResponse">
+        <complexType>
+          <sequence>
+            <element name="listFullResultsReturn" type="impl:WSFullResultsReport"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSFullResultReport">
+        <sequence>
+          <element name="attachedFileName" nillable="true" type="xsd:string"/>
+          <element name="audioFileName" nillable="true" type="xsd:string"/>
+          <element name="content" nillable="true" type="xsd:string"/>
+          <element name="custId" nillable="true" type="xsd:string"/>
+          <element name="date" nillable="true" type="xsd:dateTime"/>
+          <element name="from" nillable="true" type="xsd:string"/>
+          <element name="fullResultProfiles" nillable="true" type="xsd:string"/>
+          <element name="msgId" nillable="true" type="xsd:string"/>
+          <element name="nbProfiles" nillable="true" type="xsd:string"/>
+          <element name="orgName" nillable="true" type="xsd:string"/>
+          <element name="resumeContent" nillable="true" type="xsd:string"/>
+          <element name="status" nillable="true" type="xsd:string"/>
+          <element name="strategy" nillable="true" type="xsd:string"/>
+          <element name="subject" nillable="true" type="xsd:string"/>
+          <element name="to" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <complexType name="WSFullResultsReport">
+        <sequence>
+          <element maxOccurs="unbounded" name="fullReports" nillable="true" type="impl:WSFullResultReport"/>
+        </sequence>
+      </complexType>
+      <element name="getAccountInformation">
+        <complexType>
+          <sequence>
+            <element name="custId" type="xsd:string"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="getAccountInformationResponse">
+        <complexType>
+          <sequence>
+            <element name="getAccountInformationReturn" type="impl:WSAccount"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSAccount">
+        <sequence>
+          <element name="archiveTime" nillable="true" type="xsd:string"/>
+          <element name="custId" nillable="true" type="xsd:string"/>
+          <element name="status" nillable="true" type="xsd:string"/>
+          <element maxOccurs="unbounded" name="strategies" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <element name="addListDescriptor">
+        <complexType>
+          <sequence>
+            <element name="custId" type="xsd:string"/>
+            <element name="list" type="impl:WSListDescriptor"/>
+            <element name="sendProfiles" type="xsd:string"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="addListDescriptorResponse">
+        <complexType>
+          <sequence>
+            <element name="addListDescriptorReturn" type="xsd:string"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="modifyListDescriptor">
+        <complexType>
+          <sequence>
+            <element name="custId" type="xsd:string"/>
+            <element name="list" type="impl:WSListDescriptor"/>
+            <element name="sendProfiles" type="xsd:string"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="modifyListDescriptorResponse">
+        <complexType/>
+      </element>
+      <element name="removeListDescriptor">
+        <complexType>
+          <sequence>
+            <element name="custId" type="xsd:string"/>
+            <element name="listId" type="xsd:string"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="removeListDescriptorResponse">
+        <complexType/>
+      </element>
+      <element name="about">
+        <complexType/>
+      </element>
+      <element name="aboutResponse">
+        <complexType>
+          <sequence>
+            <element name="aboutReturn" type="xsd:string"/>
+          </sequence>
+        </complexType>
+      </element>
+      <element name="listMOs">
+        <complexType>
+          <sequence>
+            <element name="filterMOs" type="impl:WSFilterMO"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSFilterMO">
+        <sequence>
+          <element name="beginDate" nillable="true" type="xsd:dateTime"/>
+          <element name="endDate" nillable="true" type="xsd:dateTime"/>
+          <element name="primaryKeyword" nillable="true" type="xsd:string"/>
+          <element name="secondaryKeyword" nillable="true" type="xsd:string"/>
+          <element name="shortNumber" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <element name="listMOsResponse">
+        <complexType>
+          <sequence>
+            <element name="listMOsReturn" type="impl:WSResultsMO"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSResultMO">
+        <sequence>
+          <element name="alias" nillable="true" type="xsd:string"/>
+          <element name="campaignName" nillable="true" type="xsd:string"/>
+          <element name="message" nillable="true" type="xsd:string"/>
+          <element name="primaryKeyword" nillable="true" type="xsd:string"/>
+          <element name="receiveDate" nillable="true" type="xsd:dateTime"/>
+          <element name="secondaryKeyword" nillable="true" type="xsd:string"/>
+          <element name="shortNumber" nillable="true" type="xsd:string"/>
+        </sequence>
+      </complexType>
+      <complexType name="ArrayOfWSResultMO">
+        <sequence>
+          <element maxOccurs="unbounded" minOccurs="0" name="item" type="impl:WSResultMO"/>
+        </sequence>
+      </complexType>
+      <complexType name="WSResultMOArray">
+        <sequence>
+          <element name="WSResultMO" nillable="true" type="impl:ArrayOfWSResultMO"/>
+        </sequence>
+      </complexType>
+      <complexType name="WSResultsMO">
+        <sequence>
+          <element name="WSResultsMO" nillable="true" type="impl:WSResultMOArray"/>
+        </sequence>
+      </complexType>
+      <element name="listMO24s">
+        <complexType>
+          <sequence>
+            <element name="filterMOs" type="impl:WSFilterMO24"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSFilterMO24">
+        <sequence>
+          <element name="beginDate" nillable="true" type="xsd:dateTime"/>
+          <element name="endDate" nillable="true" type="xsd:dateTime"/>
+        </sequence>
+      </complexType>
+      <element name="listMO24sResponse">
+        <complexType>
+          <sequence>
+            <element name="listMO24sReturn" type="impl:WSResultsMO24"/>
+          </sequence>
+        </complexType>
+      </element>
+      <complexType name="WSResultMT24">
+        <sequence>
+          <element name="messageMt" nillable="true" type="xsd:string"/>
+          <element name="sendDateMt" nillable="true" type="xsd:dateTime"/>
+        </sequence>
+      </complexType>
+      <complexType name="ArrayOfWSResultMT24">
+        <sequence>
+          <element maxOccurs="unbounded" minOccurs="0" name="item" type="impl:WSResultMT24"/>
+        </sequence>
+      </complexType>
+      <complexType name="WSResultsMT24Array">
+        <sequence>
+          <element name="wsResultMt24" nillable="true" type="impl:ArrayOfWSResultMT24"/>
+        </sequence>
+      </complexType>
+      <complexType name="WSResultMO24">
+        <sequence>
+          <element name="messageMo" nillable="true" type="xsd:string"/>
+          <element name="number" nillable="true" type="xsd:string"/>
+          <element name="receiveDateMo" nillable="true" type="xsd:dateTime"/>
+          <element name="wsResultsMt24" nillable="true" type="impl:WSResultsMT24Array"/>
+        </sequence>
+      </complexType>
+      <complexType name="ArrayOfWSResultMO24">
+        <sequence>
+          <element maxOccurs="unbounded" minOccurs="0" name="item" type="impl:WSResultMO24"/>
+        </sequence>
+      </complexType>
+      <complexType name="WSResultsMO24Array">
+        <sequence>
+          <element name="WSResultMO" nillable="true" type="impl:ArrayOfWSResultMO24"/>
+        </sequence>
+      </complexType>
+      <complexType name="WSResultsMO24">
+        <sequence>
+          <element name="WSResultsMO" nillable="true" type="impl:WSResultsMO24Array"/>
+        </sequence>
+      </complexType>
+    </schema>
+  </wsdl:types>
+    <wsdl:message name="modifyListDescriptorRequest">
+        <wsdl:part element="impl:modifyListDescriptor" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="sendMessageResponse">
+        <wsdl:part element="impl:sendMessageResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="aboutRequest">
+        <wsdl:part element="impl:about" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getListDescriptorsResponse">
+        <wsdl:part element="impl:getListDescriptorsResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="sendAdvancedMessageResponse">
+        <wsdl:part element="impl:sendAdvancedMessageResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="sendAdvancedMessageRequest">
+        <wsdl:part element="impl:sendAdvancedMessage" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="aboutResponse">
+        <wsdl:part element="impl:aboutResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="stopMessageRequest">
+        <wsdl:part element="impl:stopMessage" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="listFullResultsResponse">
+        <wsdl:part element="impl:listFullResultsResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="modifyListDescriptorResponse">
+        <wsdl:part element="impl:modifyListDescriptorResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="addListDescriptorRequest">
+        <wsdl:part element="impl:addListDescriptor" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="addListDescriptorResponse">
+        <wsdl:part element="impl:addListDescriptorResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="listMOsRequest">
+        <wsdl:part element="impl:listMOs" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getListDescriptorsRequest">
+        <wsdl:part element="impl:getListDescriptors" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="listMOsResponse">
+        <wsdl:part element="impl:listMOsResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="removeListDescriptorRequest">
+        <wsdl:part element="impl:removeListDescriptor" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="listFullResultsRequest">
+        <wsdl:part element="impl:listFullResults" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="stopMessageResponse">
+        <wsdl:part element="impl:stopMessageResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="listMO24sResponse">
+        <wsdl:part element="impl:listMO24sResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getAccountInformationResponse">
+        <wsdl:part element="impl:getAccountInformationResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="getAccountInformationRequest">
+        <wsdl:part element="impl:getAccountInformation" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="listResultsResponse">
+        <wsdl:part element="impl:listResultsResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="removeListDescriptorResponse">
+        <wsdl:part element="impl:removeListDescriptorResponse" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="sendMessageRequest">
+        <wsdl:part element="impl:sendMessage" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="listResultsRequest">
+        <wsdl:part element="impl:listResults" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:message name="listMO24sRequest">
+        <wsdl:part element="impl:listMO24s" name="parameters">
+        </wsdl:part>
+    </wsdl:message>
+    <wsdl:portType name="MultiDiffusionWS">
+        <wsdl:operation name="sendMessage">
+            <wsdl:input message="impl:sendMessageRequest" name="sendMessageRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:sendMessageResponse" name="sendMessageResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="stopMessage">
+            <wsdl:input message="impl:stopMessageRequest" name="stopMessageRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:stopMessageResponse" name="stopMessageResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getListDescriptors">
+            <wsdl:input message="impl:getListDescriptorsRequest" name="getListDescriptorsRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:getListDescriptorsResponse" name="getListDescriptorsResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="sendAdvancedMessage">
+            <wsdl:input message="impl:sendAdvancedMessageRequest" name="sendAdvancedMessageRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:sendAdvancedMessageResponse" name="sendAdvancedMessageResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="listResults">
+            <wsdl:input message="impl:listResultsRequest" name="listResultsRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:listResultsResponse" name="listResultsResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="listFullResults">
+            <wsdl:input message="impl:listFullResultsRequest" name="listFullResultsRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:listFullResultsResponse" name="listFullResultsResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getAccountInformation">
+            <wsdl:input message="impl:getAccountInformationRequest" name="getAccountInformationRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:getAccountInformationResponse" name="getAccountInformationResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="addListDescriptor">
+            <wsdl:input message="impl:addListDescriptorRequest" name="addListDescriptorRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:addListDescriptorResponse" name="addListDescriptorResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="modifyListDescriptor">
+            <wsdl:input message="impl:modifyListDescriptorRequest" name="modifyListDescriptorRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:modifyListDescriptorResponse" name="modifyListDescriptorResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="removeListDescriptor">
+            <wsdl:input message="impl:removeListDescriptorRequest" name="removeListDescriptorRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:removeListDescriptorResponse" name="removeListDescriptorResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="about">
+            <wsdl:input message="impl:aboutRequest" name="aboutRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:aboutResponse" name="aboutResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="listMOs">
+            <wsdl:input message="impl:listMOsRequest" name="listMOsRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:listMOsResponse" name="listMOsResponse">
+          </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="listMO24s">
+            <wsdl:input message="impl:listMO24sRequest" name="listMO24sRequest">
+          </wsdl:input>
+            <wsdl:output message="impl:listMO24sResponse" name="listMO24sResponse">
+          </wsdl:output>
+        </wsdl:operation>
+    </wsdl:portType>
+    <wsdl:binding name="MultiDiffusionWSSoapBinding" type="impl:MultiDiffusionWS">
+        <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="sendMessage">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="sendMessageRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="sendMessageResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="stopMessage">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="stopMessageRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="stopMessageResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getListDescriptors">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="getListDescriptorsRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="getListDescriptorsResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="sendAdvancedMessage">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="sendAdvancedMessageRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="sendAdvancedMessageResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="listResults">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="listResultsRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="listResultsResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="listFullResults">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="listFullResultsRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="listFullResultsResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="getAccountInformation">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="getAccountInformationRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="getAccountInformationResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="addListDescriptor">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="addListDescriptorRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="addListDescriptorResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="modifyListDescriptor">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="modifyListDescriptorRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="modifyListDescriptorResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="removeListDescriptor">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="removeListDescriptorRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="removeListDescriptorResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="about">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="aboutRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="aboutResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="listMOs">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="listMOsRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="listMOsResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="listMO24s">
+            <wsdlsoap:operation soapAction=""/>
+            <wsdl:input name="listMO24sRequest">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="listMO24sResponse">
+                <wsdlsoap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:service name="MultiDiffusionWSService">
+        <wsdl:port binding="impl:MultiDiffusionWSSoapBinding" name="MultiDiffusionWS">
+            <wsdlsoap:address location="https://www.api-contact-everyone.fr.orange-business.com/ContactEveryone/services/MultiDiffusionWS"/>
+        </wsdl:port>
+    </wsdl:service>
+</wsdl:definitions>
diff --git a/tests/data/orange_sendAdvancedMessage_query.xml b/tests/data/orange_sendAdvancedMessage_query.xml
new file mode 100644
index 00000000..d1ef93c3
--- /dev/null
+++ b/tests/data/orange_sendAdvancedMessage_query.xml
@@ -0,0 +1,31 @@
+<SOAP-ENV:Envelope xmlns:ns0="MultiDiffusionWS" xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+  <SOAP-ENV:Header/>
+  <ns1:Body>
+    <ns0:sendAdvancedMessage>
+      <ns0:wsAdvancedMessage>
+        <ns0:content>hello</ns0:content>
+        <ns0:custId xsi:nil="true"/>
+        <ns0:faxReplyTo xsi:nil="true"/>
+        <ns0:from xsi:nil="true"/>
+        <ns0:fullContenu>true</ns0:fullContenu>
+        <ns0:mailReplyTo xsi:nil="true"/>
+        <ns0:orgName xsi:nil="true"/>
+        <ns0:resumeContent>hello</ns0:resumeContent>
+        <ns0:sendProfiles>&lt;PROFILE_LIST&gt;&lt;PROFILE&gt;&lt;DEST_NAME&gt;name_0033688888888&lt;/DEST_NAME&gt;&lt;DEST_FORENAME&gt;forename_0033688888888&lt;/DEST_FORENAME&gt;&lt;DEST_ID&gt;ID_0033688888888&lt;/DEST_ID&gt;&lt;TERMINAL_GROUP&gt;&lt;TERMINAL&gt;&lt;TERMINAL_NAME&gt;mobile1&lt;/TERMINAL_NAME&gt;&lt;TERMINAL_ADDR&gt;0033688888888&lt;/TERMINAL_ADDR&gt;&lt;MEDIA_TYPE_GROUP&gt;&lt;MEDIA_TYPE&gt;sms&lt;/MEDIA_TYPE&gt;&lt;/MEDIA_TYPE_GROUP&gt;&lt;/TERMINAL&gt;&lt;/TERMINAL_GROUP&gt;&lt;/PROFILE&gt;&lt;PROFILE&gt;&lt;DEST_NAME&gt;name_0033677777777&lt;/DEST_NAME&gt;&lt;DEST_FORENAME&gt;forename_0033677777777&lt;/DEST_FORENAME&gt;&lt;DEST_ID&gt;ID_0033677777777&lt;/DEST_ID&gt;&lt;TERMINAL_GROUP&gt;&lt;TERMINAL&gt;&lt;TERMINAL_NAME&gt;mobile1&lt;/TERMINAL_NAME&gt;&lt;TERMINAL_ADDR&gt;0033677777777&lt;/TERMINAL_ADDR&gt;&lt;MEDIA_TYPE_GROUP&gt;&lt;MEDIA_TYPE&gt;sms&lt;/MEDIA_TYPE&gt;&lt;/MEDIA_TYPE_GROUP&gt;&lt;/TERMINAL&gt;&lt;/TERMINAL_GROUP&gt;&lt;/PROFILE&gt;&lt;/PROFILE_LIST&gt;</ns0:sendProfiles>
+        <ns0:smsReplyTo>+33699999999</ns0:smsReplyTo>
+        <ns0:startCall xsi:nil="true"/>
+        <ns0:strategy>sms</ns0:strategy>
+        <ns0:subject>hello</ns0:subject>
+        <ns0:telReplyTo xsi:nil="true"/>
+        <ns0:to xsi:nil="true"/>
+        <ns0:validFaxReplyTo/>
+        <ns0:validFormatMailReplyTo/>
+        <ns0:validMaxStartCall/>
+        <ns0:validMinStartCall/>
+        <ns0:validSmsReplyTo/>
+        <ns0:validTelReplyTo/>
+        <ns0:validityPeriod xsi:nil="true"/>
+      </ns0:wsAdvancedMessage>
+    </ns0:sendAdvancedMessage>
+  </ns1:Body>
+</SOAP-ENV:Envelope>
diff --git a/tests/test_sms.py b/tests/test_sms.py
index 64802bfe..6f0e619c 100644
--- a/tests/test_sms.py
+++ b/tests/test_sms.py
@@ -1,7 +1,15 @@
+import lxml.etree as etree
+import os
 import pytest
+import mock
+from requests import Response
 
 from django.contrib.contenttypes.models import ContentType
+from django.core.files import File
+from django.core.urlresolvers import reverse
 
+from passerelle.apps.orange.models import OrangeSMSGateway
+from passerelle.apps.orange.soap import ContactEveryoneSoap
 from passerelle.base.models import ApiUser, AccessRight
 from passerelle.sms import SMSGatewayMixin
 
@@ -43,6 +51,22 @@ def connector(request, db):
     return c
 
 
+@pytest.fixture
+def orange_conn():
+    api = ApiUser.objects.create(username='api', keytype='API', key='xxxx')
+    key_file = os.path.join(os.path.dirname(__file__), '../passerelle/apps/orange/orange.pem')
+    conn = OrangeSMSGateway.objects.create(
+        title='test',
+        slug='test',
+        keystore=File(open(key_file, 'r'), 'private-key.pem')
+    )
+    obj_type = ContentType.objects.get_for_model(OrangeSMSGateway)
+    AccessRight.objects.create(
+        codename='can_send_messages', apiuser=api,
+        resource_type=obj_type, resource_pk=conn.pk)
+    return conn
+
+
 def test_connectors(app, connector):
     path = '/%s/%s/send/' % (connector.get_connector_slug(), connector.slug)
     result = app.post_json(path, params={})
@@ -71,3 +95,62 @@ def test_manage_views(admin_user, app, connector):
     resp = app.get(url)
     assert 'Endpoints' in resp.body
     assert 'accessright/add' in resp.body
+
+
+@mock.patch('passerelle.soap.requests.get')
+@mock.patch('passerelle.soap.requests.post')
+def test_orange_connector(mocked_post, mocked_get, app, orange_conn):
+
+    def orange_mocked_get(url, params=None, **kwargs):
+        assert url == ContactEveryoneSoap.WSDL_URL
+        target_file = os.path.join(os.path.dirname(__file__), 'data', 'orange.wsdl')
+        response = Response()
+        response._content=file(target_file).read()
+        response.status_code = 200
+        return response
+
+    def orange_mocked_post(url, params=None, **kwargs):
+        xml_sent_expeted = os.path.join(
+            os.path.dirname(__file__), 'data', 'orange_sendAdvancedMessage_query.xml')
+        xml1 = etree.parse(xml_sent_expeted)
+        xml2 = etree.fromstring(kwargs['data'])
+        if (url not in ContactEveryoneSoap.WSDL_URL
+            or etree.tostring(xml1, pretty_print=True)
+            != etree.tostring(xml2, pretty_print=True)):
+            # expected value may be updated here
+            #open('/tmp/orange.xml', 'w').write(etree.tostring(xml2, pretty_print=True))
+            raise Exception('test fails into orange_mocked_post function')
+
+        response = Response()
+        response.status_code = 200
+        response._content = """<?xml version="1.0" encoding="UTF-8"?>
+    <SOAP-ENV:Envelope
+      xmlns:ns0="MultiDiffusionWS"
+      xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"
+      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
+     <SOAP-ENV:Header/>
+     <ns1:Body>
+      <ns0:sendAdvancedMessageResponse>
+       <ns0:sendAdvancedMessageReturn>
+        <ns0:msgId>msg-123</ns0:msgId>
+       </ns0:sendAdvancedMessageReturn>
+      </ns0:sendAdvancedMessageResponse>
+     </ns1:Body>
+    </SOAP-ENV:Envelope>
+    """
+        return response
+
+    url = reverse('generic-endpoint', kwargs={
+        'connector': 'orange', 'endpoint': 'send', 'slug': orange_conn.slug})
+    resp = app.post_json(url, params={}, status=403)
+    url += '?apikey=%s' % 'xxxx'
+    payload = {
+        'message': 'hello',
+        'from': '+33699999999',
+        'to': ['+33688888888', '+33677777777'],
+    }
+    mocked_get.side_effect=orange_mocked_get
+    mocked_post.side_effect=orange_mocked_post
+    resp = app.post_json(url, params=payload)
+    assert resp.json['err'] == 0
+    assert resp.json['data']['msg_ids'] == ['msg-123']
-- 
2.23.0

