All Projects → kolo → Xmlrpc

kolo / Xmlrpc

Licence: mit
Implementation of XMLRPC protocol in Go language.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Xmlrpc

Phrets
PHP client library for interacting with a RETS server to pull real estate listings, photos and other data made available from an MLS system
Stars: ✭ 416 (+212.78%)
Mutual labels:  client-library
Gomusicbrainz
a Go (Golang) MusicBrainz WS2 client library - work in progress
Stars: ✭ 42 (-68.42%)
Mutual labels:  client-library
Mariadbpp
C++ client library for MariaDB.
Stars: ✭ 76 (-42.86%)
Mutual labels:  client-library
Google Maps Services Go
Go client library for Google Maps API Web Services
Stars: ✭ 492 (+269.92%)
Mutual labels:  client-library
Standardfile
Yet Another Standardfile (standardnotes server) Implementation written in Golang
Stars: ✭ 34 (-74.44%)
Mutual labels:  client-library
Unleash Client Python
Unleash client for Python 💡💡💡
Stars: ✭ 44 (-66.92%)
Mutual labels:  client-library
Rosrust
Pure Rust implementation of a ROS client library
Stars: ✭ 355 (+166.92%)
Mutual labels:  client-library
Google Maps Services Java
Java client library for Google Maps API Web Services
Stars: ✭ 1,497 (+1025.56%)
Mutual labels:  client-library
Localstack Dotnet Client
A lightweight .NET client for LocalStack
Stars: ✭ 40 (-69.92%)
Mutual labels:  client-library
Libnsq
async C client library for NSQ
Stars: ✭ 75 (-43.61%)
Mutual labels:  client-library
Github Api
Java API for GitHub
Stars: ✭ 743 (+458.65%)
Mutual labels:  client-library
Ably Go
Go client library SDK for Ably realtime messaging service
Stars: ✭ 29 (-78.2%)
Mutual labels:  client-library
Goodreads Dotnet
📚 Goodreads .NET API Client Library
Stars: ✭ 45 (-66.17%)
Mutual labels:  client-library
Cs16 Client
Counter-Strike 1.6 rewritten client.dll. Without VGUI, ParticleMan and ecology friendy.
Stars: ✭ 449 (+237.59%)
Mutual labels:  client-library
Google Api Nodejs Client
Google's officially supported Node.js client library for accessing Google APIs. Support for authorization and authentication with OAuth 2.0, API Keys and JWT (Service Tokens) is included.
Stars: ✭ 9,722 (+7209.77%)
Mutual labels:  client-library
Pynsq
The official Python client library for NSQ
Stars: ✭ 393 (+195.49%)
Mutual labels:  client-library
Ldaptive
A simple, extensible Java API for interacting with LDAP servers
Stars: ✭ 43 (-67.67%)
Mutual labels:  client-library
Iyzipay Node
iyzipay api node.js client
Stars: ✭ 116 (-12.78%)
Mutual labels:  client-library
Ably Js
Javascript, Node, Typescript client library SDK for Ably realtime messaging service
Stars: ✭ 99 (-25.56%)
Mutual labels:  client-library
Octonode
github api v3 in nodejs
Stars: ✭ 1,126 (+746.62%)
Mutual labels:  client-library

GoDoc

Overview

xmlrpc is an implementation of client side part of XMLRPC protocol in Go language.

Status

This project is in minimal maintenance mode with no further development. Bug fixes are accepted, but it might take some time until they will be merged.

Installation

To install xmlrpc package run go get github.com/kolo/xmlrpc. To use it in application add "github.com/kolo/xmlrpc" string to import statement.

Usage

client, _ := xmlrpc.NewClient("https://bugzilla.mozilla.org/xmlrpc.cgi", nil)
result := struct{
  Version string `xmlrpc:"version"`
}{}
client.Call("Bugzilla.version", nil, &result)
fmt.Printf("Version: %s\n", result.Version) // Version: 4.2.7+

Second argument of NewClient function is an object that implements http.RoundTripper interface, it can be used to get more control over connection options. By default it initialized by http.DefaultTransport object.

Arguments encoding

xmlrpc package supports encoding of native Go data types to method arguments.

Data types encoding rules:

  • int, int8, int16, int32, int64 encoded to int;
  • float32, float64 encoded to double;
  • bool encoded to boolean;
  • string encoded to string;
  • time.Time encoded to datetime.iso8601;
  • xmlrpc.Base64 encoded to base64;
  • slice encoded to array;

Structs encoded to struct by following rules:

  • all public field become struct members;
  • field name become member name;
  • if field has xmlrpc tag, its value become member name.
  • for fields tagged with ",omitempty", empty values are omitted;

Server method can accept few arguments, to handle this case there is special approach to handle slice of empty interfaces ([]interface{}). Each value of such slice encoded as separate argument.

Result decoding

Result of remote function is decoded to native Go data type.

Data types decoding rules:

  • int, i4 decoded to int, int8, int16, int32, int64;
  • double decoded to float32, float64;
  • boolean decoded to bool;
  • string decoded to string;
  • array decoded to slice;
  • structs decoded following the rules described in previous section;
  • datetime.iso8601 decoded as time.Time data type;
  • base64 decoded to string.

Implementation details

xmlrpc package contains clientCodec type, that implements rpc.ClientCodec interface of net/rpc package.

xmlrpc package works over HTTP protocol, but some internal functions and data type were made public to make it easier to create another implementation of xmlrpc that works over another protocol. To encode request body there is EncodeMethodCall function. To decode server response Response data type can be used.

Contribution

See project status.

Authors

Dmitry Maksimov ([email protected])

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].