<HTML ><HEAD ><TITLE > Business layer requests </TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.64 "><LINK REL="HOME" TITLE=" eGroupWare XML-RPC/SOAP Methodology " HREF="phpgw_server.html"><LINK REL="PREVIOUS" TITLE=" eGroupWare XML-RPC/SOAP Methodology " HREF="phpgw_server.html"><LINK REL="NEXT" TITLE=" More to come... " HREF="phpgw_server-2.html"></HEAD ><BODY CLASS="SECT1" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >eGroupWare XML-RPC/SOAP Methodology</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="phpgw_server.html" >Prev</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" ></TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="phpgw_server-2.html" >Next</A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="AEN33" >Business layer requests</A ></H1 ><P > Once a successful login return packet has been received and sessionid/kp3 have been extracted, every subsequent packet sent to the egroupware server must be preceded by an Authorization header. Here is a sample header: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" >POST /egroupware/xmlrpc.php HTTP/1.0 User-Agent: PHP XMLRPC 1.0 Host: my.local.host Authorization: Basic ZDgxNDIyZDRkYjg5NDEyNGNiMzZlMDhhZTdlYzAxZmY6NTU3YzkyYjBmNGE4ZDVlOTUzMzI2YmU2OTQyNjM3YjQ= Content-Type: text/xml Content-Length: 875 </PRE ></TD ></TR ></TABLE ><P > The longish string is a base64 encoding of the $sessionid . ':' . $kp3. For now this is our only supported authentication method. Additional methods would probably also affect the methodCalls. This is certainly open to discussion. Following is a typical request for some contact data: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><?xml version="1.0"?> <methodCall> <methodName>addressbook.boaddressbook.read_entries</methodName> <params> <param> <value><struct> <member><name>start</name> <value><string>1</string></value> </member> <member><name>limit</name> <value><string>5</string></value> </member> <member><name>fields</name> <value><struct> <member><name>n_given</name> <value><string>n_given</string></value> </member> <member><name>n_family</name> <value><string>n_family</string></value> </member> </struct></value> </member> <member><name>query</name> <value><string></string></value> </member> <member><name>filter</name> <value><string></string></value> </member> <member><name>sort</name> <value><string></string></value> </member> <member><name>order</name> <value><string></string></value> </member> </struct></value> </param> </params> </methodCall> </PRE ></TD ></TR ></TABLE ><P > Successful response: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><?xml version="1.0"?> <methodResponse> <params> <param> <value><struct> <member><name>0</name> <value><struct> <member><name>id</name> <value><string>1</string></value> </member> <member><name>lid</name> <value><string></string></value> </member> <member><name>tid</name> <value><string>n</string></value> </member> <member><name>owner</name> <value><string>500</string></value> </member> <member><name>access</name> <value><string>private</string></value> </member> <member><name>cat_id</name> <value><string>1</string></value> </member> <member><name>n_given</name> <value><string>Alan</string></value> </member> </struct></value> </member> <member><name>1</name> <value><struct> <member><name>id</name> <value><string>2</string></value> </member> <member><name>lid</name> <value><string></string></value> </member> <member><name>tid</name> <value><string>n</string></value> </member> <member><name>owner</name> <value><string>500</string></value> </member> <member><name>access</name> <value><string>private</string></value> </member> <member><name>cat_id</name> <value><string>1</string></value> </member> <member><name>n_given</name> <value><string>Andy</string></value> </member> </struct></value> </member> ... </PRE ></TD ></TR ></TABLE ><P > Unauthorized access attempt returns: </P ><TABLE BORDER="0" BGCOLOR="#E0E0E0" WIDTH="100%" ><TR ><TD ><PRE CLASS="PROGRAMLISTING" ><methodResponse> <params> <param> <value><string>UNAUTHORIZED</string></value> </param> </params> </methodResponse> </PRE ></TD ></TR ></TABLE ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="phpgw_server.html" >Prev</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="phpgw_server.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="phpgw_server-2.html" >Next</A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >phpGroupWare XML-RPC/SOAP Methodology</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" > </TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >More to come...</TD ></TR ></TABLE ></DIV ></BODY ></HTML >