Way to add mobile sync schema

Christian Rößner c at roessner-network-solutions.com
Sun Sep 16 10:31:52 CEST 2012


Hi,

thanks a lot! Currently I am on vacation. But I will test this and include it as soon as possible.

If I understand that code correctly, it is the glue between Phone and something like sogosync, z-Piush, am I right?

Thanks
Christian

Am 16.09.2012 um 04:48 schrieb Achim J. Latz:

> OK, I got as far as generating a valid reply that can be used by my iOS 5 phone. Now if somebody could make the content of the fields dynamic, probably in __service, with a new configuration section in automx.conf?
> 
> The code with a hard-coded response looks like this:
> 
> if self.__subschema == "mobile":
>    NS_Response = ("http://schemas.microsoft.com/exchange/"
>       "autodiscover/mobilesync/responseschema/2006")
> 
> else:
>    # Maybe we need more information here?
>    NS_Response = ("http://schemas.microsoft.com/exchange/"
>       "autodiscover/outlook/responseschema/2006a")
> 
> root = etree.Element("Autodiscover", xmlns=NS_AutoDiscover)
> response = etree.SubElement(root, "Response", xmlns=NS_Response)
> 
> if self.__subschema == "mobile":
>        culture = etree.SubElement(response, "Culture")
>        culture.text = "en:en"
>        user = etree.SubElement(response, "User")
>        displayname = etree.SubElement(user, "DisplayName")
>        displayname.text = "Full User Name" #or emailaddress
>        emailaddress = etree.SubElement(user, "EmailAddress")
>        emailaddress.text = "user at domain.tld"
> 	#elem[service + "_auth_identity"]
>        action = etree.SubElement(response, "Action")
>        settings = etree.SubElement(action, "Settings")
>        server = etree.SubElement(settings, "Server")
>        servertype = etree.SubElement(server, "Type")
>        servertype.text = "MobileSync"
>        serverurl = etree.SubElement(server, "Url")
>        serverurl.text = "https://server.domain.tld/Microsoft-Server-ActiveSync"
>        servername = etree.SubElement(server, "Name")
>        servername.text = "https://server.domain.tld/Microsoft-Server-ActiveSync"
>        self.__xml = root
>        return


-Christian Rößner

---
Bachelor of Science Informatik
Erlenwiese 14, 36304 Alsfeld
T: +49 6631 78823400, F: +49 6631 78823409, M: +49 176 93118939
USt-IdNr.: DE225643613, http://www.roessner-network-solutions.com



More information about the automx-users mailing list