mibes404 / zeep

XSD/WSDL client code generator for Rust
MIT License
41 stars 18 forks source link

Issues with beAServiceV5.wsdl #6

Closed smw-wagnerma closed 3 years ago

smw-wagnerma commented 3 years ago

I tried the generator, but for the https://github.com/smarwag/bea_client/blob/master/src/wsdl/beAServiceV5.wsdl there are issuses: I made a test repo https://github.com/smarwag/bea_client.git

`error[E0412]: cannot find type BeAFaultSoapDTO in this scope
  --> src\bea_service.rs:42:17
   |
42 |     pub bea_fault: BeAFaultSoapDTO, 
   |                    ^^^^^^^^^^^^^^^ not found in this scope
   |
help: consider importing this struct
   |
31 | use crate::bea_service::types::BeAFaultSoapDTO;
   |

error[E0046]: not all trait items implemented, missing: activate_authentication, get_unactivated_security_tokens
    --> src\bea_service.rs:7578:2
     |
3365 |     async fn activate_authentication (&self, activate_authentication_request: ActivateAuthenticationRequest) -> Result<ActivateAuthenticationResponse,Option<SoapBeaFault>>;
     |     ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ `activate_authentication` from trait
3366 |     async fn get_unactivated_security_tokens (&self, get_unactivated_security_tokens_request: GetUnactivatedSecurityTokensRequest) -> Result<GetUnactivatedSecurityTokensResponse,Option<SoapBeaFault>>;
     |     ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- `get_unactivated_security_tokens` from trait
...
7578 |     impl ports::BeAServiceV5PortType for BeAServiceV5HttpBinding {
     |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ missing `activate_authentication`, `get_unactivated_security_tokens` in implementation

error[E0283]: type annotations needed
  --> src\bea_service.rs:42:2
   |
42 |     pub bea_fault: BeAFaultSoapDTO, 
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type
   |
   = note: cannot satisfy `_: Default`
   = note: required by `std::default::Default::default`
   = note: this error originates in a derive macro (in Nightly builds, run with -Z macro-backtrace for more info)`

for the pub bea_fault: BeAFaultSoapDTO,

the types is missing pub bea_fault: types::BeAFaultSoapDTO,

And code for two methods from the wsdl is missig.

mibes404 commented 3 years ago

That is an 'interesting' issue. At first glance there is no significant difference between these two methods and the others, which are rendered just fine.

mibes404 commented 3 years ago

It looks like the wsdl is incomplete for those two operations. If you search for, for example: setProcesscards, you will find an operation on line 1537.

                <wsdl:operation name="setProcesscards">
            <soap:operation
                soapAction="http://brak.bea/setProcesscards" />
            <wsdl:input>
                <soap:body use="literal" />
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal" />
            </wsdl:output>
            <wsdl:fault name="BeaFault">
                <soap:fault use="literal" name="BeaFault" />
            </wsdl:fault>
        </wsdl:operation>

However for the two mentioned methods: activateAuthentication and getUnactivatedSecurityTokens there is no equivalent operation.

mibes404 commented 3 years ago

With regards to BeAFaultSoapDTO that type is defined in dto1.xsd but that file is not being imported:

    <wsdl:types>
        <xsd:schema>
            <xsd:import namespace="http://brak.de/bea/application/dto/soap/types5" schemaLocation="types5.xsd"/>    
        </xsd:schema>
    </wsdl:types>
smw-wagnerma commented 3 years ago

Regarding the dto1.xsd, it is imported in the types5.xsd

    <xsd:import namespace="http://brak.de/bea/application/dto/soap/dto1" schemaLocation="dto1.xsd"/>
    <xsd:import namespace="http://brak.de/bea/application/dto/soap/dto2" schemaLocation="dto2.xsd"/>
    <xsd:import namespace="http://brak.de/bea/application/dto/soap/dto3" schemaLocation="dto3.xsd"/>
    <xsd:import namespace="http://brak.de/bea/application/dto/soap/dto4" schemaLocation="dto4.xsd"/>
    <xsd:import namespace="http://brak.de/bea/application/dto/soap/dto5" schemaLocation="dto5.xsd"/>