<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://us.mpwgateway.net/MPWServices/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://us.mpwgateway.net/MPWServices/">
<types>
<xsd:schema targetNamespace="http://us.mpwgateway.net/MPWServices/"
>
 <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" />
 <xsd:import namespace="http://schemas.xmlsoap.org/wsdl/" />
 <xsd:complexType name="ArrayOfAnyType">
  <xsd:complexContent>
   <xsd:restriction base="SOAP-ENC:Array">
  <xsd:sequence>
   <xsd:element name="item" type="xsd:anyType" maxOccurs="unbounded" minOccurs="0" nillable="true"/>
  </xsd:sequence>
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:anyType[]"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 <xsd:complexType name="ArrayOfString">
  <xsd:complexContent>
   <xsd:restriction base="SOAP-ENC:Array">
  <xsd:sequence>
   <xsd:element name="item" type="xsd:string" maxOccurs="unbounded" minOccurs="0" nillable="true"/>
  </xsd:sequence>
    <xsd:attribute ref="SOAP-ENC:arrayType" wsdl:arrayType="xsd:string[]"/>
   </xsd:restriction>
  </xsd:complexContent>
 </xsd:complexType>
 <xsd:complexType name="Hashtable">
  <xsd:sequence>
   <xsd:element name="Keys" type="tns:ArrayOfString"/>
   <xsd:element name="Values" type="tns:ArrayOfString"/>
  </xsd:sequence>
 </xsd:complexType>
</xsd:schema>
</types>
<message name="getCustomerRequest">
  <part name="licence" type="xsd:string" />
  <part name="serverVars" type="tns:Hashtable" />
  <part name="schemaName" type="xsd:string" />
  <part name="comment" type="xsd:string" />
  <part name="test" type="xsd:boolean" /></message>
<message name="getCustomerResponse">
  <part name="return" type="tns:Hashtable" /></message>
<message name="getManufacturersRequest">
  <part name="licence" type="xsd:string" /></message>
<message name="getManufacturersResponse">
  <part name="return" type="tns:ArrayOfString" /></message>
<message name="getProfileRequest">
  <part name="licence" type="xsd:string" />
  <part name="manufacturer" type="xsd:string" />
  <part name="model" type="xsd:string" />
  <part name="schemaName" type="xsd:string" /></message>
<message name="getProfileResponse">
  <part name="return" type="tns:Hashtable" /></message>
<message name="getUserAgentsRequest">
  <part name="licence" type="xsd:string" />
  <part name="manufacturer" type="xsd:string" />
  <part name="model" type="xsd:string" /></message>
<message name="getUserAgentsResponse">
  <part name="return" type="tns:ArrayOfString" /></message>
<message name="getProfileFromUARequest">
  <part name="licence" type="xsd:string" />
  <part name="HTTPUserAgent" type="xsd:string" />
  <part name="HTTPAccept" type="xsd:string" /></message>
<message name="getProfileFromUAResponse">
  <part name="return" type="tns:Hashtable" /></message>
<message name="getProfileFromUAOnlyRequest">
  <part name="licence" type="xsd:string" />
  <part name="HTTPUserAgent" type="xsd:string" /></message>
<message name="getProfileFromUAOnlyResponse">
  <part name="return" type="tns:Hashtable" /></message>
<message name="getProfileFromHeadersRequest">
  <part name="licence" type="xsd:string" />
  <part name="serverVars" type="tns:Hashtable" /></message>
<message name="getProfileFromHeadersResponse">
  <part name="return" type="tns:Hashtable" /></message>
<message name="getModelsRequest">
  <part name="licence" type="xsd:string" />
  <part name="manufacturer" type="xsd:string" /></message>
<message name="getModelsResponse">
  <part name="return" type="tns:ArrayOfString" /></message>
<message name="getRandomTestHeaderRequest">
  <part name="licence" type="xsd:string" /></message>
<message name="getRandomTestHeaderResponse">
  <part name="return" type="tns:Hashtable" /></message>
<message name="getCookiesRequest">
  <part name="licence" type="xsd:string" />
  <part name="customer" type="xsd:string" /></message>
<message name="getCookiesResponse">
  <part name="return" type="tns:Hashtable" /></message>
<message name="setCookiesRequest">
  <part name="licence" type="xsd:string" />
  <part name="customer" type="xsd:string" />
  <part name="cookies" type="tns:Hashtable" /></message>
<message name="setCookiesResponse">
  <part name="return" type="xsd:boolean" /></message>
<message name="deleteCookieRequest">
  <part name="licence" type="xsd:string" />
  <part name="customer" type="xsd:string" />
  <part name="key" type="xsd:string" /></message>
<message name="deleteCookieResponse">
  <part name="return" type="xsd:boolean" /></message>
<message name="deleteCookiesRequest">
  <part name="licence" type="xsd:string" />
  <part name="customer" type="xsd:string" /></message>
<message name="deleteCookiesResponse">
  <part name="return" type="xsd:boolean" /></message>
<portType name="MPWPortType">
  <operation name="getCustomer">
    <documentation>
	 &lt;br&gt; This takes an array of HTTP Headers, such as those in $_SERVER, which can be passed
	 &lt;br&gt; straight in, or you could use the getRandomTestHeader method to get a set from our
	 &lt;br&gt; database of 70,000 sample header strings from real devices.
	 &lt;br&gt;
	 &lt;br&gt; The array you get back consists of an associative array of keys and values representing
	 &lt;br&gt; the properties of the device and the customer. This array will vary in size depending on how
	 &lt;br&gt; much information is available, or how much can be derived in real-time by the system. There
	 &lt;br&gt; are also currently numerous performance-testing and diagnostic fields which should give you an idea
	 &lt;br&gt; of the amount of seconds the server spent on each profile. Normally you'd disregard those.
	 &lt;br&gt; 
	 &lt;br&gt; You can also retrieve a previous customer you've seen from the database by passing their customer
	 &lt;br&gt; number (OK, it's an MD5) into the getCustomer function. This allows you to keep your own local
	 &lt;br&gt; database of customer MD5s, or store the MD5 in a cookie as an alternative to using a PHP session ID
	 &lt;br&gt; 
	 &lt;br&gt; Since this customer number can be stored and used to store cookies (and even objects) against a customer (independently
	 &lt;br&gt; of whether their actual device supports them), the customer number is handy. You could also use it for
	 &lt;br&gt; retrieving for the purposes of reporting later.
	 &lt;br&gt; 
	 &lt;br&gt; The comment field is to allow you to associate the page view with a real-world comment.
	 &lt;br&gt; This will be handy later when our reporting interface is available, since you'll be able to track
	 &lt;br&gt; customers' page views: the comments will allow you to insert sensible comments or events, such as
	 &lt;br&gt; &quot;looked at Axel F&quot;, &quot;about to buy xxxxxx&quot;, &quot;successfully paid for xxxx&quot;, etc. For this to work,
	 &lt;br&gt; the &quot;SCRIPT_URI&quot; header has to be present to indicate which page is calling DetectRight.
	 &lt;br&gt; 
	 &lt;br&gt; You can call getCustomer multiple times on the same page if you want to insert multiple comments.
	 &lt;br&gt; The &quot;test&quot; option allows you to have returned a profile based on one of our test headers.</documentation>
    <input message="tns:getCustomerRequest"/>
    <output message="tns:getCustomerResponse"/>
  </operation>
  <operation name="getManufacturers">
    <documentation>
	 &lt;br&gt; Gets a sorted list of manufacturers we have seen phones for in the massive DetectRight
	 &lt;br&gt; data warehouse. Very useful for constructing option lists to allow customers to
	 &lt;br&gt; choose the manufacturer of their phone. Plans are afoot to even further standardise the list
	 &lt;br&gt; to compensate for manufacturers not being entirely sure what their name is.</documentation>
    <input message="tns:getManufacturersRequest"/>
    <output message="tns:getManufacturersResponse"/>
  </operation>
  <operation name="getProfile">
    <documentation>
	 &lt;br&gt; Gets a device profile for a given manufacturer and model number (e.g. &quot;Nokia&quot;,&quot;3510&quot;).
	 &lt;br&gt; The DetectRight system contains multiple profiles for any given combination of model name and
	 &lt;br&gt; manufacturer. The system picks the latest seen profile for a given manufacturer/model,
	 &lt;br&gt; since this is least likely to be an experimental profile (DetectRight sees many preview phones
	 &lt;br&gt; which have incorrect or incomplete headers or UAProfs).
	 &lt;br&gt; 
	 &lt;br&gt; Schemaname is for full DetectRight Clients, who can save on data throughput by specifying a named 
	 &lt;br&gt; set of profile fields of interest to filter the profile by. For instance, a DetectRight Client could
	 &lt;br&gt; create a &quot;Java&quot; profile which only includes chosen Java-related fields. If this field is left blank,
	 &lt;br&gt; then you get all fields. 
	 &lt;br&gt; 
	 &lt;br&gt; This would be a good time to note that there are few profile fields in an DetectRight profile that are guaranteed
	 &lt;br&gt; to be in the profile on all occasions. The fact that a profile field is missing from a returned profile is 
	 &lt;br&gt; a valid item of information: that we don't know what that data is. We are philosphically against returning
	 &lt;br&gt; false generic data to pad out a schema. We go to every length to extract all the information we possibly can
	 &lt;br&gt; for a device, though.
	 </documentation>
    <input message="tns:getProfileRequest"/>
    <output message="tns:getProfileResponse"/>
  </operation>
  <operation name="getUserAgents">
    <input message="tns:getUserAgentsRequest"/>
    <output message="tns:getUserAgentsResponse"/>
  </operation>
  <operation name="getProfileFromUA">
    <documentation>
	 &lt;br&gt; Gets a device profile from a given User Agent. Use of the accept string in this function has been obviated.
	 </documentation>
    <input message="tns:getProfileFromUARequest"/>
    <output message="tns:getProfileFromUAResponse"/>
  </operation>
  <operation name="getProfileFromUAOnly">
    <documentation>
	 &lt;br&gt; Gets a device profile from a given User Agent: includes adaptive processing. This function is deprecated.
	 </documentation>
    <input message="tns:getProfileFromUAOnlyRequest"/>
    <output message="tns:getProfileFromUAOnlyResponse"/>
  </operation>
  <operation name="getProfileFromHeaders">
    <documentation>
	 &lt;br&gt; Gets a device profile from an associative array containing
	 &lt;br&gt; values for the keys HTTP_USER_AGENT.
	 </documentation>
    <input message="tns:getProfileFromHeadersRequest"/>
    <output message="tns:getProfileFromHeadersResponse"/>
  </operation>
  <operation name="getModels">
    <documentation>
	 &lt;br&gt; Gets a sorted list of models given a manufacturer.
	 </documentation>
    <input message="tns:getModelsRequest"/>
    <output message="tns:getModelsResponse"/>
  </operation>
  <operation name="getRandomTestHeader">
    <documentation>
	 &lt;br&gt; This function raids our database for one of our test phone http header arrays.
	 &lt;br&gt; We've got about 70,000, which are useful for testing the variety of devices out there.
	 &lt;br&gt; If you're testing this client software, then you might want to get an associative array 
	 &lt;br&gt; to pass to getCustomer from this function. 
	 </documentation>
    <input message="tns:getRandomTestHeaderRequest"/>
    <output message="tns:getRandomTestHeaderResponse"/>
  </operation>
  <operation name="getCookies">
    <documentation>
	 &lt;br&gt; Returns an array of cookies which are also put into the DetectRight object.
	 &lt;br&gt; Unlike in the PHP Client code, cookie values here can only be strings. Obviously
	 &lt;br&gt; that can be serialized can be used as a cookie by you, with the proviso that the total
	 &lt;br&gt; size of a gzipped, base64 encoded cookie can't be greater than 16K. This size limit
	 &lt;br&gt; is subject to review, of course.
	 &lt;br&gt;
	 &lt;br&gt; Note that despite the name, these cookies are not stored in the browser, though there's nothing stopping
	 &lt;br&gt; you extending this code to do just that.
	 &lt;br&gt; 
	 &lt;br&gt; To use getcookies sensibly, you must have seen the customer. You will not be allowed to retrieve the cookies
	 &lt;br&gt; against customers that aren't tied to your licence number.
	 </documentation>
    <input message="tns:getCookiesRequest"/>
    <output message="tns:getCookiesResponse"/>
  </operation>
  <operation name="setCookies">
    <documentation>
	 &lt;br&gt; Sets the cookies for a customer. This has two steps: synchronise the local cookie collection
	 &lt;br&gt; and transmit the new cookies to the database. When the cookies get to the DetectRight Service,
	 &lt;br&gt; they're merged with the current cookies. You can't delete cookies by setting them to empty.
	 </documentation>
    <input message="tns:setCookiesRequest"/>
    <output message="tns:setCookiesResponse"/>
  </operation>
  <operation name="deleteCookie">
    <documentation>
	 &lt;br&gt; Deletes a particular cookie, both locally and from the DetectRight Service. 
	 </documentation>
    <input message="tns:deleteCookieRequest"/>
    <output message="tns:deleteCookieResponse"/>
  </operation>
  <operation name="deleteCookies">
    <documentation>
	&lt;br&gt; Deletes all cookies for a customer.
	 </documentation>
    <input message="tns:deleteCookiesRequest"/>
    <output message="tns:deleteCookiesResponse"/>
  </operation>
</portType>
<binding name="MPWBinding" type="tns:MPWPortType">
  <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
  <operation name="getCustomer">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getCustomer" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="getManufacturers">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getManufacturers" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="getProfile">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getProfile" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="getUserAgents">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getUserAgents" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="getProfileFromUA">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getProfileFromUA" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="getProfileFromUAOnly">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getProfileFromUAOnly" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="getProfileFromHeaders">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getProfileFromHeaders" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="getModels">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getModels" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="getRandomTestHeader">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getRandomTestHeader" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="getCookies">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/getCookies" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="setCookies">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/setCookies" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="deleteCookie">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/deleteCookie" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
  <operation name="deleteCookies">
    <soap:operation soapAction="http://www.mpwservices.net/MPWServices/soap.php/deleteCookies" style="rpc"/>
    <input><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></input>
    <output><soap:body use="encoded" namespace="http://us.mpwgateway.net/MPWServices/" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/></output>
  </operation>
</binding>
<service name="MPW">
  <port name="MPWPort" binding="tns:MPWBinding">
    <soap:address location="http://www.mpwservices.net/MPWServices/soap.php"/>
  </port>
</service>
</definitions>