Way to add mobile sync schema
Christian Rößner
c at roessner-network-solutions.com
Sun Sep 30 11:47:20 CEST 2012
Hi,
> 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
today I started putting this code into automx. There are some things, where I need some time to think about it, to make configuration not too much complicated. For example the "Culture" parameter. I think there is no need for an extra section in automx, as the response depends on being subschema "outlook" or "mobile". So even if defining parameters at the same place, automx will pick the ones that are needed for a valid response. But as said, let me think about this a little bit more :)
Best wishes
-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