GithubHelp home page GithubHelp logo

wsdl-rs's Introduction

WSDL Rust XML bindings

This library simply wraps a WSDL XML file with an idiomatic Rust interface.

The underlying XML library is roxmltree, on top of which this library declares Rust newtypes to expose a native interface for reading WSDL files.

Usage

# use anyhow::Result;
use wsdl::Wsdl;

fn example() -> Result<()> {
    let input = std::fs::read_to_string("/path/to/my/service.wsdl")?;
    let document = roxmltree::Document::parse(&input)?;

    let wsdl = WsDefinitions::from_document(&document)?;
    for service in wsdl.services()? {
        println!("Service: {}", service.name()?);
    }

    for binding in wsdl.bindings()? {
        println!(
            "Binding: {} -> {}",
            binding.name()?,
            binding.port_type()?.name()?
        );
    }

    Ok(())
}

See the traversal script for a complete (and usable) example. Run it with:

cargo run --example traverse ./path/to/my/service.wsdl

Error reporting

Errors generated by this library can be traced directly to the originating XML node. The originating node ID is embedded in the first parameter of [WsError].

Non-goals

  • Parse the XSD-defined WSDL types. The XML specification is nebulous, and it would be best left to a separate crate that can also generate Rust bindings.

wsdl-rs's People

Contributors

drchat avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.