Files and Libraries

C# Client Library

Created March 7, 2024

The C# client-side library defines the classes that can be (de)serialized to/from XML. This is useful for accessing the HTTP resources that are published by this application.

C# Resource Example
//read a resource from a REST url
Uri uri = new Uri(...);

XmlSerializer s = new XmlSerializer(
  typeof( byte[] )
);

  //Create the request object
WebRequest req = WebRequest.Create(uri);
WebResponse resp = req.GetResponse();
Stream stream = resp.GetResponseStream();
TextReader r = new StreamReader( stream );

byte[] result = (byte[]) s.Deserialize( r );

//handle the result as needed...
    

Files
name size description
uprightapi-csharp-xml-client.zip 21.21K The C# source code for the C# client library.

Java XML Client Library

Created March 7, 2024

The Java client-side library is used to access the Web service API for this application using Java.

The Java client-side library is used to provide the set of Java objects that can be serialized to/from XML using JAXB. This is useful for accessing the resources that are published by this application.

Resources Example (Raw JAXB)
java.net.URL url = new java.net.URL(baseURL + "/territories");
JAXBContext context = JAXBContext.newInstance( byte[].class );
java.net.URLConnection connection = url.openConnection();
connection.connect();

Unmarshaller unmarshaller = context.createUnmarshaller();
MTTerritory result = (MTTerritory) unmarshaller.unmarshal( connection.getInputStream() );
//handle the result as needed...
    
Resources Example (Jersey client)
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient();

MTTerritory result = client.target(baseUrl + "/territories")
  .get(MTTerritory.class);

//handle the result as needed...
    

Files
name size description
uprightapi-xml-client.jar 118.89K The binaries for the Java XML client library.
uprightapi-xml-client-xml-sources.jar 93.51K The sources for the Java XML client library.

ns0.xsd

Created March 7, 2024

Files
name size description
ns0.xsd 119.21K  

PHP XML Client Library

Created March 7, 2024

The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML. This is useful for accessing the resources that are published by this application, but only those that produce a XML representation of their resources.

This library leverages the XMLReader and XMLWriter tools that were included in PHP versions 5.1.0+.

PHP XML Example
//read the resource in XML form:
$xml = ...;

$reader = new \XMLReader();

if (!$reader->open($xml)) {
  throw new \Exception('Unable to open ' . $xml);
}
$result = new Object($reader);

//open a writer for the xml
$out = ...;
$writer = new \XMLWriter();
$writer->openUri($out);
$writer->startDocument();
$writer->setIndent(4);
$result->toXml($writer);
$writer->flush();
    

Files
name size description
uprightapi-php-xml-client-php.zip 182.86K

The PHP client-side library defines the PHP classes that can be (de)serialized to/from XML. This is useful for accessing the resources that are published by this application, but only those that produce a XML representation of their resources.

This library leverages the XMLReader and XMLWriter tools that were included in PHP versions 5.1.0+.

PHP XML Example
//read the resource in XML form:
$xml = ...;

$reader = new \XMLReader();

if (!$reader->open($xml)) {
  throw new \Exception('Unable to open ' . $xml);
}
$result = new Object($reader);

//open a writer for the xml
$out = ...;
$writer = new \XMLWriter();
$writer->openUri($out);
$writer->startDocument();
$writer->setIndent(4);
$result->toXml($writer);
$writer->flush();