aspose file tools*
The moose likes Ant, Maven and Other Build Tools and the fly likes Axis2 plugin Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Axis2 plugin" Watch "Axis2 plugin" New topic
Author

Axis2 plugin

Kevin Eddy
Ranch Hand

Joined: Feb 24, 2010
Posts: 74
Hello developers,

I'm using the axis2-wsdl2code-maven-plugin to generate my stub/skeleton code from a wsdl.
The issue I'm having is that Maven doesn't seem to be picking up the parameters defined in the configuration. Below is my plugin configuration.

<build>
<plugins>
<plugin>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-wsdl2code-maven-plugin</artifactId>
<version>1.4.1</version>
<executions>
<execution>
<goals>
<goal>wsdl2code</goal>
</goals>
<configuration>
<packageName>myPackageName</packageName>
<wsdlFile>src/main/axis2/GPservice.wsdl</wsdlFile>
<databindingName>xmlbeans</databindingName>
<generateAllClasses>true</generateAllClasses>
<generateServerSide>true</generateServerSide>
<generateServerSideInterface>true</generateServerSideInterface>
<generateServicesXml>true</generateServicesXml>
<serviceName>GPService</serviceName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

Let us start with the wsdlFile parm. If I run this script using mvn axis2-wsdl2code:wsdl2code command, it does not locate the wsdlFile and seems to be looking for a wsdl named service.wsdl instead of GPService.wsdl. Funny thing is if I change the name of my wsdl to service.wsdl, then it gets picked up and some things get generated but not everything.
I also have to define the package name from the command line because the package parm doesn't seem to be getting picked up.
mvn axis2-wsdl2code:wsdl2code -Daxis2.wsdl2code.package=myPackageName

If I don't define the packageName in the commandline I get this error:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] One or more required plugin parameters are invalid/missing for 'axis2-wsdl2code:wsdl2code'

[0] Inside the definition for plugin 'axis2-wsdl2code-maven-plugin' specify the following:

<configuration>
...
<packageName>VALUE</packageName>
</configuration>

-OR-

on the command line, specify: '-Daxis2.wsdl2code.package=VALUE'
Does anyone have any idea why the parms aren't getting picked up because none of them appear to work or have any effect.
here's a link to apache's page regarding the plugin. http://ws.apache.org/axis2/tools/1_4/maven-plugins/maven-wsdl2code-plugin.html
Please Help! I'm stumped!
Kevin Eddy
Ranch Hand

Joined: Feb 24, 2010
Posts: 74
my apologies that the xml i posted above did not retain it's formatting. I tried to indent it and make it neat. my apologies.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Hi Kevin,

You can UseCodeTags to achieve this!


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Kevin Eddy
Ranch Hand

Joined: Feb 24, 2010
Posts: 74
Here's the code reformatted.

Doug Rothauser
Greenhorn

Joined: Nov 05, 2004
Posts: 1
The doc is wrong. Should be:

mvn generate-sources

See http://issues.apache.org/jira/browse/AXIS2-3585
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Axis2 plugin