Usage

The WSDL plugin will use the path environmental variable to choose the WSDL generator - MONO or Microsoft. Within the path field, specify the location of your WSDL file. If you need to specifically choose the vendor yourself, and not rely on the path, add the netHome field. The path is the only required field. You can optionally add the netHome, language, namespace, server and proxy.

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.npanday.plugins</groupId>
                <artifactId>maven-wsdl-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>wsdl</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <netHome>${MONO_HOME}</netHome>
                    <language>CS</language>
                    <namespace>org.apache.maven.test</namespace>
                    <paths>
                        <path>HelloService.wsdl</path>
                    </paths>
                    <server>
                        <id>nmaven-site</id>
                        <hashPassword>true</hashPassword>
                        <hashAlg>MD5</hashAlg>
                    </server>
                    <proxy>
                        <id>my-proxy</id>
                    </proxy>
                </configuration>
            </plugin>
        </plugins>
    </build>

Handling Servers and Proxies

The WSDL generation utility allows you to pull the WSDL from a URL. In some case, these URLs may be located behind a proxy and/or require some form of authentication. It is generally not good pratice to embed the username/passwords in the configuration files that you may be distributing or putting under version control. Use the maven settings.xml file to keep this information locally (typically located under $USER_HOME/.m2). The server.id and proxy.id map the username/password to the configuration of the WSDL plugin.

There is an experimental feature to hash the password (does not work in all cases due to encoding issues).

<settings>
    <servers>
        <server>
            <id>nmaven-site</id>
            <username>name</username>
            <password>pass</password>
        </server>
    </servers>
    <proxies>
        <proxy>
            <id>my-proxy</id>
            <username>name1</username>
            <password>password1</password>
            <host>localhost</host>
        </proxy>
    </proxies>
</settings>