Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty xs:element elements result in missing types #11

Open
jhartzell42 opened this issue Apr 6, 2022 · 2 comments
Open

Empty xs:element elements result in missing types #11

jhartzell42 opened this issue Apr 6, 2022 · 2 comments

Comments

@jhartzell42
Copy link

This works fine:

            <xs:element name="queryStateRequest">
                <xs:complexType>
                    <xs:attribute name="stateName" type="xs:string"/>
                </xs:complexType>
            </xs:element>

But this results in no type being outputted:

            <xs:element name="stateUpdateNotificationResponse"/>

Which results in errors:

error[E0412]: cannot find type `StateUpdateNotificationResponse` in module `types`
   --> src/soap.rs:85:32
    |
85  |         pub parameters: types::StateUpdateNotificationResponse,
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: a struct with a similar name exists: `StateUpdateNotification`
...
241 |     pub struct StateUpdateNotification {
    |     ---------------------------------- similarly named struct `StateUpdateNotification` defined here
@mibes404
Copy link
Owner

mibes404 commented Apr 9, 2022

I suspect this is due to the "type" attribute missing on the <xs:element /> rather than the element being empty. There are a few examples in the sample resources that seem to render fine. For example from hello.wsdl:

<xs:element name="SayHello" type="tns:SayHello"/>

Let me see if I can dig up a similar case to test this.

@mibes404
Copy link
Owner

mibes404 commented Apr 9, 2022

There is a new yaserde_08 branch which includes support for these "untyped" elements. These elements are now given a type: AnyType. Which (for now) is typed as: pub type AnyType = Option<String>; due to a lack of a better alternative. As far as I can see, yaserde does not have a Value type or something equivalent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants