netwo-io / savon Goto Github PK
View Code? Open in Web Editor NEWA SOAP client generator for Rust
A SOAP client generator for Rust
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
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 ๐
I'm trying to process the following WSDL: https://github.com/xibosignage/xibo-cms/blob/develop/lib/Xmds/service_v5.wsdl
The first problem is the <xsd:importNamespace>
tags in the types
. When commenting them out, parsing fails because all the part
tags have a type
instead of an element
attribute.
Sadly I don't know much about SOAP so I can't provide a useful patch.
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
,....
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.
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>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.