6

I would like to overload the toString methode from my wsdl.

In my pom.xml

  1. I add that in the dependencies :

    <dependency>
        <groupId>org.jvnet.jaxb2_commons</groupId>
        <artifactId>jaxb2-basics-runtime</artifactId>
        <version>1.11.1</version>
    </dependency>
    
  2. I added this plugin in the build/plugins

Blockquote

<plugin>
    <groupId>org.jvnet.jaxb2.maven2</groupId>
            <artifactId>maven-jaxb2-plugin</artifactId>
            <version>0.7.0</version>
            <executions>
                <execution>
                    <goals>
                        <goal>generate</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <schemaDirectory>${project.build.directory}/wsdl/META-INF/wsdl/</schemaDirectory>
                <schemaIncludes>
                    <include>FrameworkGedServiceMetier.wsdl</include>
                </schemaIncludes>
                <args>
                    <arg>-XtoString</arg>
                    <arg>-Xequals</arg>
                    <arg>-XhashCode</arg>
                    <arg>-Xcopyable</arg>
                </args>
                <plugins>
                    <plugin>
                        <groupId>org.jvnet.jaxb2_commons</groupId>
                        <artifactId>jaxb2-basics</artifactId>
                        <version>1.11.1</version>
                    </plugin>
                </plugins>
            </configuration>
        </plugin> 

I build maven is successful but I don't have my method toString in the class.

To inspirate me i use this documentation

1615903
  • 32,635
  • 12
  • 70
  • 99
Theo Dury
  • 141
  • 2
  • 9
  • The config is fine (you may want to update the `maven-jaxb2-plugin` though). The problem might be the WSDL compilation since with normal schemas it works fine. – lexicore Nov 04 '17 at 09:15
  • My answer to this question, ["here, shall help you. Although it is customized answer to run the WsImport using command line, but tells you the required jars the plugin need"](https://stackoverflow.com/questions/46550756/programmatically-use-wsimport-with-jaxb-plugins-without-maven-or-ant/46645680#46645680) – Optional Nov 04 '17 at 16:15
  • 1
    I have to manually trigger a 'generate-source' build step; it does not happen automatically during build for me. – lysium Jul 13 '18 at 08:38

1 Answers1

0

I think there is a problem with that version. Please try:

<version>0.12.0</version>

(It looks like 1.11.1 was published by mistake.)

vegemite4me
  • 6,621
  • 5
  • 53
  • 79