Reputation: 57
I am trying to generate Java Classes from WSDL URL, but I am receiving an error 401. I would like to know if I can configure it to input the username/password.
Obs.: If I download the .wsdl file and use it directly it works, but I would like to make something more automatic.
Here my code:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- tag::wsdl[] -->
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.14.0</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaLanguage>WSDL</schemaLanguage>
<generatePackage>ca.applications.linte.client.generate</generatePackage>
<schemas>
<schema>
<url>http://localhost:8080/ws-consentement-sollicitation-web/ws/LNTEService.wsdl</url>
</schema>
</schemas>
</configuration>
</plugin>
<!-- end::wsdl[] -->
</plugins>
</build>
Upvotes: 0
Views: 696
Reputation: 550
This is not supported by jaxb. Please refer this answer: Generate a schema for WSDL with HTTP authentication and the maven-jaxb2-plugin. You could try using the hack mentioned in this.
Upvotes: 2