Create a schema for WSDL with HTTP authentication and maven-jaxb2-plugin

I want to use the jaxb2 plugin to create a WSDL accessible from a secure URL (basic authentication with user ID and password).

Where should I provide credentials to generate the schema? Without providing them, I get one 401 error while generating the circuit.

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
    <artifactId>maven-jaxb2-plugin</artifactId>
    <version>0.13.1</version>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
        </execution>
    </executions>
    <configuration>
        <schemaLanguage>WSDL</schemaLanguage>
        <generatePackage>hello.wsdl</generatePackage>
        <schemas>
            <schema>
                <url>http://www.webservicex.com/stockquote.asmx?WSDL</url>
            </schema>
        </schemas>
    </configuration>
</plugin>
+4
source share
1 answer

HTTP authentication for downloading schemes is not currently supported, and the request for adding for adding has been rejected , so it will not be implemented. This is due to the fact that it is always advisable to download WSDL and work with it locally, rather than loading it during each assembly:

  • WSDL, - ;
  • , , Maven, , WSDL .

, Apache CXF Codegen Plugin, .

+3

Source: https://habr.com/ru/post/1669262/


All Articles