Giter Site home page Giter Site logo

zeep's Introduction

Zeep - XSD/WSDL client code generator for Rust

Generate yaserde annotated structs for Rust based on XSD/WSDL. For WSDL input, client code is generated as well.

The generated code depends on yaserde (0.8) and yaserde_derive for the XSD-generated types. The SOAP client needs tokio, log and reqwest in addition. The generated code does not have any dependencies on this library.

Check the examples and the Cargo.toml for a complete list of dependencies.

Installation

  1. Clone this repository
  2. Build: cargo build --release
  3. Copy the binary to a directory on your path, for example: cp ./target/release/zeep /usr/local/bin

Usage

USAGE:
    zeep [OPTIONS] --input <from_file> --path <path>

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -d, --dns <dns>            Default namespace (URL)
    -i, --input <from_file>    Input from XSD/WSDL file
    -n, --ns <ns>              Namespace prefix
    -p, --path <path>          Base path for the XSD file(s)
    -o, --output <to_file>     Output to file

Example usage:

Output to stdout:

zeep -p resources/aic -i agent_wsdl.xml

Output to file:

zeep -p resources/hello -i hello.wsdl -o examples/hello/hello.rs

Format the output

rustfmt --color=always --edition=2018 examples/hello/hello.rs

Define a default namespace:

No prefixes will be generated for elements matching the default namespace.

zeep -p resources/hello -i hello.wsdl -o examples/hello/hello.rs -d "http://learnwebservices.com/services/hello"

Define a different prefix:

Use a different prefix than "tns" for the types in the default namespace.

zeep -p resources/hello -i hello.wsdl -o examples/hello/hello.rs -n ns1

TODO

  • Remove the dependency on customized yaserde version, once the renaming of a vector of structs is fixed
  • Allow network imports
  • Enable cargo install

DISCLAIMER

Please note: all content in this repository is released for use "AS IS" without any warranties of any kind, including, but not limited to their installation, use, or performance. We disclaim any and all warranties, either express or implied, including but not limited to any warranty of noninfringement, merchantability, and/ or fitness for a particular purpose. We do not warrant that the technology will meet your requirements, that the operation thereof will be uninterrupted or error-free, or that any errors will be corrected.

Any use of these scripts and tools is at your own risk. There is no guarantee that they have been through thorough testing in a comparable environment and we are not responsible for any damage or data loss incurred with their use.

You are responsible for reviewing and testing any generated code you run thoroughly before use in any non-testing environment.

About Avaya

Avaya elevates communications to the next generation of engagement, connecting organizations to their customers, workforce, and communities with secure, intelligent experiences that matter.

Check us out on: https://www.avaya.com

zeep's People

Contributors

hmacias-avaya avatar mibes404 avatar

Watchers

 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.