Monday, September 17, 2012


Accessing Expresso remotely: 

Check out our free developer version at http://www.sxml.com.au:8080/Expresso/login.jsp

The power of client code 

Expresso client code allows you to remotely interact with the Expresso Parser through your own application in either java or javascript. The amount of supported access languages will be extended in future to include C++, ruby and node.js among other languages.

Accessing expresso remotely 

Expresso client code is used to access the service. It is available for both XML parsing connections and web service modules and presently in java and javascript with JSON.

The client code generation page

 The expresso client code generation page is accessible by clicking on the 'client code' header.



When on the generation page select a language and select either XML connections or web services. Click generate. Client code is generated on the screen.




The client code is already populated with your username, company and the last connection or web service which you accessed as well as any web service parameters you supplied.

All you have to do is paste this code into your own project, add your access password (your normal Expresso account password) and start using the client code.

Java access through HTTPS

The java client code works as follows.
  1. The parameters needed for the request are created and given values.
  2. a HTTPS request is created using the URL of the Expresso Remote Parser.
  3. The HTTPS request is sent and the results are arranged in a three dimensional array.
  4. The outer array is for each rule which has been parsed. 
  5. The middle array contains each set of return set
  6. Each inner array contains each of the return types within the return set

Javascript access through JSON

The javascript client code works as follows.
  1. Within script tags a JSON request over HTTPS is created.
  2. The various required parameters are added to the JSON request
  3. The JSON request is sent and the result is available for processing

Updating client code graphically

You can modify your client code parameters using our graphical tool. When you generate client code simply click 'modify client code graphically' and you are brought to a page where you can update any parameter and the resulting client code is produced. 




Forms Wizard and dynamic parameter forms

Expresso allows you to create a HTML form and backing java servlet code. You can then publish this HTML code to your website where users can supply parameters values for XML parsing rules and have they stored XML file parsed with those parameters.
For example you might wish to create an XML parsing rule which is TAG = SHOP and tag value = "X" where X is a value entered by a user. With Forms you can easily do this. You can create  a form linked to a rule where the user enters a value for part of the rule.

To create a dynamic parameter form

  • Click on Forms header to get to the forms section. Choose the particular XML connection which you wish to create a form

  •  The rules associated with this XML connection are listed. You now go through each rule deciding whether to create form elements for that rule or not.
  • For each rule, you can choose a form element for any rule part.
  • Choose a field name for the form element.

 
  1. When you have chosen all the form elements the client code is created.
  2. You can paste this client code into your own project and start using it straight away.




 



Check out our free developer version at http://www.sxml.com.au:8080/Expresso/login.jsp


 

 

No comments:

Post a Comment