Home
  What's News
    InfoJet Service
  Overview
  Features
  Screenshots
  API Document
  How to Integrate
  Form Code
  Sys Requirements
  Configuration
  FAQ
    InfoJet EditPart
    InfoJet QuickFill
    Evaluate
  Download
  Java
    Buy
  Pricing
  How to Buy
    Support
  Contact Us
InfoJet Service API Document
You only need to master two classes of InfoJet Service API.
InfoJetSoft.Service.InfoJetService Class
Please use the following methods to manage InfoPath form templates in InfoJet Service.
public static string Register(HttpContext context, byte[] xsnContent)
Register an InfoPath form template contained in the parameter xsnContext into InfoJet Service. It will return the PublishUrl extracted from the template, if it returns null, the registration is failed. You need to use the PublishUrl in the following methods such as ContainsXSN(), Remove(), BuildFormByTemplate() and BuildFormByXML().
public static boolean Register(HttpContext context, string publishUrl,                                                                byte[] xsnContent, string webContext)
You could use the parameter publishUrl to identity a new publish url of the form template, then the xml document generated by InfoJet Service will contains the new publish url in its Process Instruction mso-infoPathSolution, rather then the default publish url in the form template.
The last parameter webContext is a context path that reference external web files (such as js/infojet.js) in the form editing page. If the form editing page could reference js/infojet.js directly, please set it to "". In the previous method Register(HttpContext context, byte[] xsnContent), webContext is "" defaultly.
The method returns true or false to identity whether the registration succeed.
public static string[] List()
To list all form templates registered in InfoJet Service,and return their publish url list.
public static boolean ContainsXSN(string publishUrl)
To verify whether a form template has been registered in InfoJet Service or not according to its publish url.
public static void Remove(string publishUrl)
To remove the form template from InfoJet Service according to its publish url.
The following methods are used to edit InfoPath forms in the web browser.
public static InfoJetForm BuildFormByTemplate(HttpContext context,
                                                                     string publishUrl)
To build the web form of the template xml document in the form template identitied by the parameter publishUrl.
public static InfoJetForm BuildFormByXML(HttpContext context,
                                                                     string publishUrl, string xml)
To build the web form of an existing xml contained in the parameter xml, the form template identitied by the parameter publishUrl.
public static InfoJetForm BuildFormByMerger(HttpContext context,
                                                                     string publishUrl, string[] xmls)
To build the web form of the xml document merged by multiple existing xmls contained in the parameter xmls, the form template identitied by the parameter publishUrl.
public static InfoJetForm ReloadForm(HttpContext context)
Rebuild the web form of the xml document submitted by users.
public static InfoJetForm UpdateForm(HttpContext context)
Create the dynamic content on the form editing page, it is used in xdoc.aspx only.
public static void ClearFormCache(HttpContext context)
While the form editing page is closed, call this method to clear the http session data and the temp files used by the form. Please reference FAQ:
How to clear the form data cached in HTTP sessoin by InfoJet Service?.
public static void ClearUserCache(HttpContext context)
While user logoff, call this method to clear the http session data and the temp files used by the current user.
public static string ServiceAction
To identity the page xdoc.aspx, generally you needn't to change it.
For more information about xdoc.aspx, please reference How to Integrate.
InfoJetSoft.Service.InfoJetForm Class
The object InfoJetForm encapsulates the xml document, xhtml web form and validation information returned by InfoJet Service.
public string Xml
The xml document of InfoPath form.
public string Xhtml
The xhtml web form of InfoPath form.
public bool Valid
It shows whether the xml document have passed Data validation and XML Schema validation.
public bool Error
If the value of the Error attribute is true, the Xml and Xhtml attribute is not valid.
public string Message
The Message attribute contains the description of the error.
public InfoJetSoft.Service.Entity.Form InnerForm
The inner object holds all of information while rendering InfoPath web forms.
InfoJetSoft.Service.InfoJetContext Class
Class InfoJetService has some override methods, such as BuildFormByTemplate(), BuildFormByXML() and BuildFormByMerger(), these methods can take another parameter of type InfoJetContext, it could control some behaviors while rendering InfoPath web forms.
public string ViewName
The name of the view to show. If you don't want to show the default view firstly, you could use it to identity another view.
public bool IsReadonly
If it is true, all of views in the form will be readonly.
The following is a usage demo for the parameter InfoJetContext:
InfoJetForm newForm = null;
InfoJetContext jetContext = new InfoJetContext();
jetContext.ViewName = "View 2";
newForm = InfoJetService.BuildFormByTemplate(httpContext,jetContext,PublishUrl);

Copyright © 2005 - 2008 InfoJetSoft all rights reserved