

   /* C# code sample for sending a fax message to a single destination */

   ChakaPortType client = new ChakaPortTypeClient();
   UserOptions useroptions = new UserOptions();
   useroptions.contactperson = "mailto:CONTACT@EXAMPLE.NET";
   startRequest startreq = new startRequest("USER@EXAMPLE.NET", "PASSWORD", useroptions);
   startResponse startresp = client.start(startreq);
   string auth = startresp.auth;

   DestinationList dlist = new DestinationList();
   dlist.item = new Destination[1] { new Destination() } ;
   dlist.item[0].address = "0270030070";
   dlist.item[0].cc1 = "pippo";
   dlist.item[0].cc2 = "pluto";

   DocumentChoiceElement[] docs = new DocumentChoiceElement[1] { new DocumentChoiceElement() } ;
   docs[0].Item = new Document() { 
           contenttype = null, 
           data = ASCIIEncoding.UTF8.GetBytes("foobar\n"),   // fax content
           uniquename = "foobar.txt" };                      // filename

   FAXMessage faxmsg = new FAXMessage();
   faxmsg.documents = docs;
   faxmsg.Item = dlist;
   Message msg = new Message();
   msg.options = null;
   msg.Item = faxmsg;
   msg.ItemElementName = ItemChoiceType.fax;
   msg.subject = "Test SOAP C#";
   sendMessageRequest sndmsgreq = new sendMessageRequest();
   sndmsgreq.auth = auth;
   sndmsgreq.message = msg;
   sndmsgreq.requestuid = "aklsdjhsakjdhakdjhaskjdh";
   sendMessageResponse sndsmgresp = client.sendMessage(sndmsgreq);




