Skip to content

Instantly share code, notes, and snippets.

View dkhenry's full-sized avatar

Daniel Kozlowski dkhenry

View GitHub Profile
@dkhenry
dkhenry / deferred_data.php
Created June 27, 2012 15:06
SevOne deferred data example
<?php
/**
Program to upload data to SevOne using the Deferred Data API
@author DK ([email protected])
@version 0.1
@since 27-June-2012
*/
//! The Appliance IP
@dkhenry
dkhenry / gist:2702947
Created May 15, 2012 16:10
Example of PHP traits
trait DatabaseToObject {
public static function fromResultSet( $results) {
$retval = array();
if(!$results) {
return $retval;
}
while( $row = $results->fetchObject() ) {
$retval[] = static::construct($row);
}
return $retval;
@dkhenry
dkhenry / gist:1229508
Created September 20, 2011 16:01
scalaxb full output
[processReaders: ListBuffer(api2.wsdl, encoding.xsd)]
[wsdl11.Driver#toImportable: file:/home/dkozlowski/svn-src/ScalaSoap/api2.wsdl]
[wsdl11.Driver#toImportable: file:/home/dkozlowski/svn-src/ScalaSoap/encoding.xsd]
[wsdl11.Driver: XDefinitionsType(None,List(),Some(XTypesType(None,List(DataRecord({http://www.w3.org/2001/XMLSchema}schema,<schema targetNamespace="http://www.sevone.com/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsd1="http://www.sevone.com/" xmlns:impl="http://www.sevone.com/" xmlns:tns="http://www.sevone.com/" xmlns="http://schemas.xmlsoap.org/wsdl/">
<xsd:import schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://schemas.xmlsoap.org/soap/encoding/"></xsd:import>
<complexType name="SO_Unit">
<sequence>
<element type="xsd:integer" name="id
@dkhenry
dkhenry / api2.wsdl
Created September 20, 2011 15:04
WSDL Excerpt that causes Exception
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" name="SevOneApi" targetNamespace="http://www.sevone.com/" xmlns:tns="http://www.sevone.com/" xmlns:impl="http://www.sevone.com/" xmlns:xsd1="http://www.sevone.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.sevone.com/">
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" />
<complexType name="SO_Unit">
<sequence>
<element name="id" type="xsd:integer"/>
<element name="name" type="xsd:string"/>
<element name="abbreviation" type="xsd:string"/>