Platform SDK: Exchange 2000 Server |
This example assumes a Web page with a button that triggers the DoDocRegister function. Once again, make sure to log in as a user authorized to write to the store before running the code.
function DoDocRegister() { m_httpsaverequest = new ActiveXObject("microsoft.xmlhttp"); bstrRequestXML = "<?xml version='1.0'?><a:propertyupdate xmlns:a='DAV:' xmlns:b='urn:schemas:mailheader:'>"; bstrRequestXML +="<a:set><a:prop>"; bstrRequestXML +="<b:content-class>urn:content-classes:formregistration</b:content-class>"; bstrRequestXML += "</a:prop></a:set></a:propertyupdate>"; m_httpsaverequest.open("PROPPATCH", docform.url, false); m_httpsaverequest.setRequestHeader("Content-type", "text/xml"); // send takes one parameter which is the requestBody to use // if status property is in 200 range, then everything's OK m_httpsaverequest.send(bstrRequestXML); //Response is XML DOM object that can be inspected bstrXML = m_httpsaverequest.responseXML; // idMsgViewer2.update(); // do whatever updates are necessary m_httpsaverequest = null; }
The following is an example of the useful fields in XML format needed to do a form registration. For an explanation of each of the fields, refer to Form Definition Properties.
XML
<prop> <b:content-class>urn:schemas-microsoft-com:office:forms#registration</b:content-class> <f:binding>client</f:binding> <f:formurl>/testapp/editsalesman.html</f:formurl> <f:cmd></f:cmd> <f:contentclass>urn:content-classes:myclass</f:contentclass> <f:executeurl>/exchweb/bin/exwform.dll</f:executeurl> <f:browser>*</f:browser> <f:contentstate>*</f:contentstate> <f:language>*</f:language> <f:majorver>=5</f:majorver> <f:minorver>*</f:minorver> <f:messagestate>*</f:messagestate> <f:platform>*</f:platform> <f:request>GET</f:request> </prop>