'mvn compile with generating classes from WSDL returns Facets count: 502, current limit: 256

I've got a wsdl from the client (I cannot change or modify it) I'm trying to generate classes from this WSDL into my java project with the usage of followinf mvn plugin:

<plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>jaxb2-maven-plugin</artifactId>
                        <version>2.5.0</version>
                        <executions>
                            <execution>
                                <id>xjc</id>
                                <goals>
                                    <goal>xjc</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <sourceType>wsdl</sourceType>
                            <outputDirectory>target/generated-sources/jaxb</outputDirectory>
                            <packageName>com.your.package.jaxb</packageName>
                            <sources>
                                <source>${project.basedir}/src/main/resources/META-INF/wsdl/</source>
                            </sources>
                            <clearOutputDir>false</clearOutputDir>
                            <noPackageLevelAnnotations>true</noPackageLevelAnnotations>
                        </configuration>
                    </plugin>

Unfortunately every mvn compile or clean install command returns me the error

org.xml.sax.SAXParseException: Simple type "ExtendedErrorCode" was not mapped to Enum due to EnumMemberSizeCap limit. Facets count: 502, current limit: 256. You can use customization attribute "typesafeEnumMaxMembers" to extend the limit.

How can I set this attribute using wsdl files? I've found plenty of solutions for xsd and none for wsdl :(



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source