Search code examples
javamavensoapcode-generationapache-axis

setting -Eosv property in axis2-wsdl2code-maven-plugin


I am using axis2-wsdl2code-maven-pluginin order to generate java sources from wsdl.

The plugin section in my pom.xml looks like:

<plugin>
            <groupId>org.apache.axis2</groupId>
            <artifactId>axis2-wsdl2code-maven-plugin</artifactId>
            <version>1.6.2</version>
            <executions>
                <execution>
                    <id>first wsdl</id>
                    <goals>
                        <goal>wsdl2code</goal>
                    </goals>
                    <configuration>
                        <packageName>my.package</packageName>
                        <databindingName>xmlbeans</databindingName>
                        <wsdlFile>src/main/resources/ws1.wsdl</wsdlFile>
                        <generateServerSideInterface>true</generateServerSideInterface>
                    </configuration>
                </execution>
                <execution>
                    <id>second wsdl</id>
                    <goals>
                        <goal>wsdl2code</goal>
                    </goals>
                    <configuration>
                        <packageName>my.package</packageName>
                        <databindingName>xmlbeans</databindingName>
                        <wsdlFile>src/main/resources/ws2.svc.wsdl</wsdlFile>
                        <generateServerSideInterface>true</generateServerSideInterface>
                    </configuration>
                </execution>

            </executions>
        </plugin>

I would like to make the schema validation as less strict as possible. From some googling I saw that on command line you can set -Eosv as a parameter to axis code generator.

Is it possible in the maven plugin? Are there some more attributes I could use to make validation less strict?

Thanks!


Solution

  • After looking for similar question, I found that you can add:

    <options>
        <osv>true</osv>
    </options>
    

    I am not sure it has actually worked because it did not solve my problem (exception on client for unrecognized element), but if there is anyone out there who is struggling, please give it a try and add your feedback.

    Found this here: How to set -Euwc param with axis2-wsdl2code-maven-plugin?