GithubHelp home page GithubHelp logo

savon's People

Contributors

geal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

savon's Issues

Repo version vs crates.io

Hello,

Great work here, the published version on crates.io is 0.2 but this repo is still at 0.1. Are there local changes that haven't been pushed to the repo yet ?

thanks

Parsing fails with empty elements

I have a wsdl with a lot of elements of the type:

      <s:element name="TimeEntry_GetAll">
        <s:complexType />
      </s:element>

This fails with the error value: Empty'.
I can work around this by changing them (all 444 of them) to:

        <s:complexType>
          <s:all minOccurs="0"/>
        </s:complexType>

But that's not very handy.

Changing to <s:simpleType/> gives the same result.

I know: PRs with tests accepted ๐Ÿ˜„

Compiler error when using a Rust reserved word as field name in SOAP

Using a rust reserved word as the name of a field in the SOAP messages causes errors from the compiler.

I added a line to the example wsdl in the README.md:

      <element name="TradePrice">
         <complexType>
           <all>
             <element name="price" type="float"/>
             <element name="type" type="string"/>
           </all>
         </complexType>
      </element>

Ie the line with name="type".

This causes the compiler to emit the error:

error: expected identifier, found keyword `type`
 --> /home/henrik/wrk/savon/target/debug/build/savon-test-c84c531790e00333/out/example.rs:1:909

The relevant part of the generated code is:
pub struct TradePrice { pub price : f64 , pub type : String , }

And the helpful compiler continues with:

                                             ^^^^ expected identifier, found keyword
help: you can escape reserved keywords to use them as identifiers

The same occurs with other rust reserved words, struct, mod, pub,....

Parsing restriction elements fails

I have a wdsl file with a lot of <s:restiction ..> nodes that currently fails to parse. Example below.

This fails at wdsl.rs:193 at unimplemented!("not a complex type");

     <s:simpleType name="SearchMode">
        <s:restriction base="s:string">
          <s:enumeration value="AllWords"/>
          <s:enumeration value="AnyWords"/>
        </s:restriction>
      </s:simpleType>

wdsl from: https://api.tradera.com/v3/publicservice.asmx?WSDL

I'm not that familiar with wdsl, but with some hints I could make an attempt to implement support for this.

Annotations/Documentation elements prevent parsing.

Example

<xs:complexType name="SomeTypeHere">
    <xs:annotation>
        <xs:documentation>
            Some Documentation Here
        </xs:documentation>
        <xs:appinfo>
            <Summary>
                Some Summary Here
            </Summary>
        </xs:appinfo>
    </xs:annotation>
    <xs:complexContent>
        <xxx />
    </xs:complexContent>
</xs:complexType>

Popular in eBay's WSDL/XSD as seen here.

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.