axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Ojeda <dojeda-l...@integra.la>
Subject More questions about maven and axis2
Date Tue, 04 Nov 2008 15:52:42 GMT
Hello all,

I have some questions about using maven and axis2. I am using maven 2.0.9, 
axis2 1.4.1, axis2-wsdl2code-maven-plugin 1.4.1.

Here is my situation:
Right now I just want to have a project that generates the client stub for a 
webservice. I need to use xmlbeans over other databindings.

I set up a pom to do this:

<project xmlns="http://maven.apache.org/POM/4.0.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<groupId>mypackage.ws.client</groupId>
	<artifactId>wsclients</artifactId>
	<packaging>jar</packaging>
	<version>1.0.0-SNAPSHOT</version>
	<name>wsclients</name>
	<url>http://maven.apache.org</url>
	<build>
		<resources>
			<resource>
				<directory>target/generated-sources/axis2/wsdl2code/resources</directory>
			</resource>
		</resources>
		<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>
					</execution>
				</executions>
				<configuration>
					<packageName>mypackage.x1</packageName>
					<wsdlFile>src/main/wsdl/WSClientOperations.wsdl</wsdlFile>
					<databindingName>xmlbeans</databindingName>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>3.8.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.axis2</groupId>
			<artifactId>axis2</artifactId>
			<version>1.4.1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.axis2</groupId>
			<artifactId>axis2-xmlbeans</artifactId>
			<version>1.4.1</version>
		</dependency>
	</dependencies>
</project>

The first problem I encountered was that I had to explicitly declare the 
axis2-xmlbeans dependecy. No big deal there.
Then, I was having the TypeHolder class problem that xmlbeans usually has when 
the schemaorg_apache_xmlbeans directory is not in the classpath. That's why I 
had to add to the pom a resource in the build section. It seems like the 
plugin doesn't work as it should, because I believe this step should not be 
necessary.

Now I want to add another wsdl so another stub is generated. I plan to have 
10-20 wsdl in this project so all stubs are generated here. 

My first question is: how do I add another wsdl? I checked 
http://ws.apache.org/axis2/tools/1_4_1/maven-plugins/maven-wsdl2code-
plugin.html
and there is no documentation for this scenario.

Second question: I would rather generate xmlbeans classes separately and tell 
wsdl2code to only generate stubs with the -Ewdc option. Is this possible with 
the axis2-wsdl2code-maven-plugin ? Again, the documentation doesn't say 
anything about this feature.

Third question: axis2 and maven users: how do you structure your projects with 
maven? I am really interested specially if my first and second questions are 
no and no. Do you use a module for each webservice client and webservice 
implementation?
I was hoping to have a module for all webservices client and another one for 
the server implementations (although one module per ws implementation works 
for me too).

Thanks for you attention

-- 
David Ojeda


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message