![]() ![]() Our next generated class, CountryServiceImplService, extends .Service. Next, let's look at the generated artifacts that are the same for both the Java versions. Now, to generate the client code in the package .client.generated, we'll need the same Maven command as before: mvn clean jaxws:wsimport To execute the JAR file run: java -jar target/gs-maven-0.1.0.jar If youâve changed the value of from 'jar' to 'war', the result will be a WAR file within the target directory instead of a JAR file.To generate client code using wsimport, we can navigate to the project's root and run this command: JAVA_HOME/bin/wsimport -s src/main/java/ -keep -p .client.generated " It's important to bear in mind that the service endpoint should be available in order to successfully execute the plugin or command. For example, given the minimal pom.xml file from before, the JAR file will be named gs-maven-0.1.0.jar. It comes out of the box with the standard JDK 8 distribution and can be found under JAVA_HOME/bin directory. That's all! The above command will generate code in the specified package .client.generated inside the sourceDestDir we provided in the plugin configuration.Īnother way to achieve the same would be to use the wsimport utility. Second, let's execute this plugin: mvn clean jaxws:wsimport That's all we need to implement a client.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |