org.codeforamerica.open311.facade
Class InvalidXMLWrapper

java.lang.Object
  extended by org.codeforamerica.open311.facade.APIWrapper
      extended by org.codeforamerica.open311.facade.InvalidXMLWrapper

public class InvalidXMLWrapper
extends APIWrapper

Some endpoints return invalid characters in its XML response. Instances of this class will parse those responses and clear the invalid characters.

Author:
Santiago MunĂ­n

Method Summary
protected  String networkGet(URL url)
          GET operation.
protected  String networkPost(URL url, Map<String,String> parameters)
          POST operation.
 
Methods inherited from class org.codeforamerica.open311.facade.APIWrapper
getCache, getEndpointUrl, getServiceDefinition, getServiceList, getServiceRequest, getServiceRequestIdFromToken, getServiceRequests, getWrapperInfo, postServiceRequest, setFormat, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

networkGet

protected String networkGet(URL url)
                     throws APIWrapperException
GET operation. Calls sanitizeOutput(String) right after receiving the response.

Overrides:
networkGet in class APIWrapper
Parameters:
url - Target.
Returns:
Server response.
Throws:
APIWrapperException - If there was any problem with the request.

networkPost

protected String networkPost(URL url,
                             Map<String,String> parameters)
                      throws APIWrapperException
POST operation. Calls sanitizeOutput(String) right after receiving the response.

Overrides:
networkPost in class APIWrapper
Parameters:
url - Target.
parameters - Parameters of the request.
Returns:
Server response.
Throws:
APIWrapperException - If there was any problem with the request.


Copyright © 2013 Code for America. All Rights Reserved.