-
-
Notifications
You must be signed in to change notification settings - Fork 79
-
I'm trying to add some customization for a really huge SOAP wsdl.
I've been looking at the xsdata-attr plugin and have been able to figure out quite a bit from there.
Now I want to parse the WSDL for comments on the <complexType name="Row"> that specify the fields that can be populated depending on which operation is called. I want to use those comments to get the available fields and then create a new dataclass named with 'operation_name_row.py` with and only the available fields.
I was looking through the codegen/handlers but I'm not sure how to utilize them in a custom subclass of DataclassGenerator. Am I on the right path or should I be trying to do something outside of the generator?
For an example this comment
<!-- method:list_refreshtoken can return the following fields refreshTokenID userID refreshToken createDate -->
would give me a file of list_refreshtoken.py with contents
from dataclasses import field, dataclass from typing import Optional __NAMESPACE__ = "http://microfocus.com/nas/2020/08" @dataclass class ListRefreshtokenRow: refresh_token_id: Optional[int] = field( default=None, metadata={ "name": "refreshTokenID", "type": "Element", "namespace": "http://microfocus.com/nas/2020/08", "nillable": True, } ) user_id: Optional[int] = field( default=None, metadata={ "name": "userID", "type": "Element", "namespace": "http://microfocus.com/nas/2020/08", "nillable": True, } ) refresh_token: Optional[str] = field( default=None, metadata={ "name": "refreshToken", "type": "Element", "namespace": "http://microfocus.com/nas/2020/08", "nillable": True, } ) create_date: Optional[str] = field( default=None, metadata={ "name": "createDate", "type": "Element", "namespace": "http://microfocus.com/nas/2020/08", "nillable": True, } )
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 2 replies
-
wow it took me 4 months to discover that there were discussions in the repo, this is resolved right @brunnels ?
Beta Was this translation helpful? Give feedback.
All reactions
-
I have issues open on the still pending things
Beta Was this translation helpful? Give feedback.
All reactions
-
As far as I know this issue is resolved
Beta Was this translation helpful? Give feedback.