Created November 20, 2020
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.
//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...
name | size | description |
---|---|---|
applications-partner-dotnet.zip | 30.46K | The C# source code for the C# client library. |
Created November 20, 2020
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.
java.net.URL url = new java.net.URL(baseURL + "/customer/{customerId}/agreement/{agreementId}/agreement-detail/{agreementDetailId}"); JAXBContext context = JAXBContext.newInstance( byte[].class, byte[].class ); java.net.URLConnection connection = url.openConnection(); connection.setDoOutput(true); connection.connect(); Unmarshaller unmarshaller = context.createUnmarshaller(); Marshaller marshaller = context.createMarshaller(); marshaller.marshal(updateAgreementDetailDTO, connection.getOutputStream()); AgreementDetailDTO result = (AgreementDetailDTO) unmarshaller.unmarshal( connection.getInputStream() ); //handle the result as needed...
javax.ws.rs.client.Client client = javax.ws.rs.client.ClientBuilder.newClient(); AgreementDetailDTO result = client.target(baseUrl + "/customer/{customerId}/agreement/{agreementId}/agreement-detail/{agreementDetailId}") .put(javax.ws.rs.client.Entity.entity(updateAgreementDetailDTO, "application/vnd.no.get.partner-v1+xml"), AgreementDetailDTO.class); //handle the result as needed...
name | size | description |
---|---|---|
applications-partner-xml-client.jar | 188.61K | The binaries for the Java XML client library. |
applications-partner-xml-client-xml-sources.jar | 148.43K | The sources for the Java XML client library. |
Created November 20, 2020
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+.
//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();
name | size | description |
---|---|---|
applications-partner-php.zip | 52.31K |