0

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>

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.