2

I have installed the JAXB2 maven plugin in my project. The .WSDL file which generated from my SOAP WebService is located in the project directory, But I want JAXB2 to directly use WSDL URL instead of using the .wsdl file.

Aliasghar Yaghoobzadeh
  • 1,881
  • 2
  • 12
  • 10

1 Answers1

5

For maven-jaxb2-plugin see:

https://github.com/highsource/maven-jaxb2-plugin/wiki/Specifying-What-To-Compile

For WSDL it will be something like:

<configuration>
    <schemaLanguage>WSDL</schemaLanguage>
    <schemas>
        <schema>
            <url>https://www.acme.com/my.WSDL</url>
        </schema>
    </schemas>
</configuration>

schemaLanguage is optional, defaults to autodetection.

Having said this, I normally do not recommend compiling online resources unless you want your builds to fail unpredictably due to networking or HTTPS problems.

Instead, make a local copy and use catalog files to rewrite URLs.

lexicore
  • 42,748
  • 17
  • 132
  • 221