Closed LeonidKrutovsky closed 4 years ago
In WSDL files have sections 'types' [0..*] in which the 'xsd:schema' items are located.
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" targetNamespace="http://www.onvif.org/ver10/device/wsdl"> <wsdl:types> <xs:schema targetNamespace="http://www.onvif.org/ver10/device/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" elementFormDefault="qualified" version="18.12"> <xs:import namespace="http://www.onvif.org/ver10/schema" schemaLocation="../../../ver10/schema/onvif.xsd"/> <xs:element name="GetServices"> .... </wsdl:types>
We have a ready-made xsd-parser with function
pub fn parse_schema<'input>(schema: &Node<'_, 'input>) -> RsFile<'input>
And we have rust code generator for xsd with
pub fn generate_rs_file(&self, schema: &RsFile<'input>) -> String
In WSDL parser we have 'Definitions' struct with method
pub fn types(&self) -> &[Types]
and 'Types' struct with method
pub fn schemas(&self) -> Vec<Node<'_, '_>>'
You need to think of an aggregating level for two parsers and two generators with a convenient API for the end user.
In WSDL files have sections 'types' [0..*] in which the 'xsd:schema' items are located.
We have a ready-made xsd-parser with function
And we have rust code generator for xsd with
In WSDL parser we have 'Definitions' struct with method
and 'Types' struct with method
You need to think of an aggregating level for two parsers and two generators with a convenient API for the end user.