1

I'm trying to generate request/response classes using jaxb2-maven-plugin but I'm really struggling with it. I use code below to try and generate the classes but for some reason only thing that is generated is episode file. I tried with downloaded wsdl file and also with url but I can't make any of it work.

<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>
                        <schemaDirectory>src/main/resources</schemaDirectory>
                        <generatePackage>com.example.wsdl</generatePackage>
                        <schemaIncludes>
                          <include>*.wsdl</include>
                        </schemaIncludes>
                        <generateDirectory>src/main/java</generateDirectory>
                    </configuration>
            </plugin>
Petar
  • 273
  • 1
  • 4
  • 16

1 Answers1

0

This one works for me :

<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>com.example.consumingwebservice.wsdl</generatePackage>
                    <schemas>
                        <schema>
                            <url>YOUR.URL</url>
                        </schema>
                    </schemas>
                </configuration>
        </plugin>
  • That was also one of the options that I tried but still no luck. My opinion is that the problem is with the wsdl file, the way it is constructed. – Petar Jul 13 '21 at 09:01
  • Does it give you any errors when you build the project? – CharlieWhisky Jul 13 '21 at 09:24
  • No, no errors or warnings, build is successful but as stated above, only the episode file is generated. – Petar Jul 13 '21 at 12:47