PartnershipOpVerifer

public class PartnershipOpVerifer

The PartnershipOpVerifer is an helper class for verifying whether the partnership operation has been executed successfully. Since H2O does not have any build-in SOAP-based web service for managing the partnerships under remote behavior, The PartnershipOpVerifer acts as a validator for validating the HTML content returning from the H2O administration web page. The main method of this class is validate(InputStream) and the arugment is the input stream. The input stream SHOULD contains the HTML content after you executed add/delete/update partnership in either AS2/EBMS partnership administration page.

Author:Twinsen Tsang

Fields

OP_ADD_SUCCESS

public static final String OP_ADD_SUCCESS

OP_DELETE_SUCCESS

public static final String OP_DELETE_SUCCESS

OP_NO

public static final String OP_NO

OP_UPDATE_SUCCESS

public static final String OP_UPDATE_SUCCESS

logger

final Logger logger

Constructors

PartnershipOpVerifer

public PartnershipOpVerifer()

Default constructor.

Methods

validate

public void validate(InputStream ins)

Validate the HTML content received after executed partnership operation. The content is passed as a input stream ins. This operation is quite expensive because it first transform the whole HTML content received to a well-formed XHTML before parsing by the SAX Parser.

Parameters:
  • ins – The HTML content to validate the result of partnership operation
Throws:
  • SAXException
  1. When unable to down-load the HTML DTD from the web. Check your Internet connectivity
  2. When IO related problems occur
Throws:
  • ParserConfigurationException – When SAX parser mis-configures.