public class NMIDiscovery
extends java.lang.Object
| Constructor and Description |
|---|
NMIDiscovery()
Construct an instance of this class.
|
| Modifier and Type | Method and Description |
|---|---|
void |
doNmiDiscovery(java.lang.String dataFilename,
java.lang.String requestContentType)
Make a request to the NMI Discovery web service by POSTing an aseXML file from the inbox.
|
java.lang.String |
doNmiDiscoveryAddress(java.lang.String jurisdictionCode,
java.lang.String transactionId,
java.lang.String buildingOrPropertyName,
java.lang.String locationDescriptor,
java.lang.String lotNumber,
java.lang.String flatOrUnitType,
java.lang.String flatOrUnitNumber,
java.lang.String floorOrLevelType,
java.lang.String floorOrLevelNumber,
java.lang.String houseNumber,
java.lang.String houseNumberSuffix,
java.lang.String streetName,
java.lang.String streetSuffix,
java.lang.String streetType,
java.lang.String suburbOrPlaceOrLocality,
java.lang.String postcode,
java.lang.String stateOrTerritory)
Make a GET request to the NMI Discovery web service to search for NMIs by address.
|
java.lang.String |
doNmiDiscoveryDpid(java.lang.String jurisdictionCode,
java.lang.String transactionId,
java.lang.String deliveryPointIdentifier)
Make a GET request to the NMI Discovery web service to search for NMIs by delivery point identifier.
|
java.lang.String |
doNmiDiscoveryMeterSerial(java.lang.String jurisdictionCode,
java.lang.String transactionId,
java.lang.String meterSerialNumber)
Make a GET request to the NMI Discovery web service to search for NMIs by meter serial number.
|
java.lang.String |
getResponse()
This method provides the web service response as a string.
|
java.lang.String |
getResponseCharset()
Reports the character set from the Content-Type header.
|
int |
getResponseCode()
Report the HTTP response code.
|
java.lang.String |
getResponseFilename()
Reports the filename from the Content-Disposition header.
|
java.lang.String |
getResponseReason()
Report the HTTP response reason.
|
java.lang.String |
getResponseType()
Reports the mime-type from the Content-Type header.
|
void |
writeResponse()
Write the web service response to a file.
|
public NMIDiscovery()
throws ApplicationException
ApplicationException - if the instance cannot be initialised.public void doNmiDiscovery(java.lang.String dataFilename,
java.lang.String requestContentType)
throws ApplicationException
dataFilename - is the file to post from the inbox.requestContentType - defines the file type as XML or ZIP.ApplicationException - when something goes wrong.public java.lang.String doNmiDiscoveryDpid(java.lang.String jurisdictionCode,
java.lang.String transactionId,
java.lang.String deliveryPointIdentifier)
throws ApplicationException
jurisdictionCode - nominates a jurisdiction to search.transactionId - identifies requestor's transaction.deliveryPointIdentifier - is the postal delivery point to search for.ApplicationException - when something goes wrong.public java.lang.String doNmiDiscoveryMeterSerial(java.lang.String jurisdictionCode,
java.lang.String transactionId,
java.lang.String meterSerialNumber)
throws ApplicationException
jurisdictionCode - nominates a jurisdiction to search.transactionId - identifies requestor's transaction.meterSerialNumber - is the meter serial number to search for.ApplicationException - when something goes wrong.public java.lang.String doNmiDiscoveryAddress(java.lang.String jurisdictionCode,
java.lang.String transactionId,
java.lang.String buildingOrPropertyName,
java.lang.String locationDescriptor,
java.lang.String lotNumber,
java.lang.String flatOrUnitType,
java.lang.String flatOrUnitNumber,
java.lang.String floorOrLevelType,
java.lang.String floorOrLevelNumber,
java.lang.String houseNumber,
java.lang.String houseNumberSuffix,
java.lang.String streetName,
java.lang.String streetSuffix,
java.lang.String streetType,
java.lang.String suburbOrPlaceOrLocality,
java.lang.String postcode,
java.lang.String stateOrTerritory)
throws ApplicationException
jurisdictionCode - nominates a jurisdiction to search.transactionId - identifies requestor's transaction.buildingOrPropertyName - locationDescriptor - lotNumber - flatOrUnitType - flatOrUnitNumber - floorOrLevelType - floorOrLevelNumber - houseNumber - houseNumberSuffix - streetName - streetSuffix - streetType - suburbOrPlaceOrLocality - postcode - stateOrTerritory - ApplicationException - when something goes wrong.public int getResponseCode()
public java.lang.String getResponseReason()
public java.lang.String getResponseType()
public java.lang.String getResponseCharset()
public java.lang.String getResponseFilename()
public void writeResponse()
throws ApplicationException
ApplicationException - if an error occurs while writing the file.public java.lang.String getResponse()
throws ApplicationException
ApplicationException - if the response type was zip and the response could not be unzipped.