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

Generated field name for list is plural #77

Open
davisjose19 opened this issue Jan 17, 2025 · 0 comments
Open

Generated field name for list is plural #77

davisjose19 opened this issue Jan 17, 2025 · 0 comments

Comments

@davisjose19
Copy link

I'm generating POJOs for the below xml :

    <NS1:Header>
        <NS1:source>WCS</NS1:source>
        <NS1:txnID>-3b1c8d90:19345def737:-6609</NS1:txnID>
        <NS1:TxnTimestamp>2024-11-19T21:59:03.722Z</NS1:TxnTimestamp>
        <NS1:messageType>ORDER_CONFIRMATION</NS1:messageType>
        <NS1:actionType>
            <NS1:ExtendedData name="sendSMS">N</NS1:ExtendedData>
            <NS1:ExtendedData name="sendEmail">Y</NS1:ExtendedData>
        </NS1:actionType>
    </NS1:Header>

Here for the POJOs that are generated in The ActionType class I am getting a field -

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "extendedDatas"
})
@XmlRootElement(name = "actionType")
public class ActionType {

    @XmlElement(name = "ExtendedData")
    protected List<ExtendedData> extendedDatas;

The propOrder is having extendedDatas but that is not how my xsd or the xml is having it.
This is causing failures when I try to parse the xml.

Is there any configuration where this is controlled?

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

1 participant