Yes; if we have two separate maven projects both using the wsdl2code maven 
plugin, running mvn compile on each project individually creates the 
ExtensionMapper in the correct package. 

The funny behaviour starts happening when we have a single maven project 
that as part of the generate-sources phase runs wsdl2code on 2 different 
wsdls, or when two maven projects both using wsdl2code are under a 
parent/multi-module/aggregator project, and mvn compile is run on the 
parent. 

Thanks for your response,
Greg 





"Amila Suriarachchi" <[EMAIL PROTECTED]> 
10/05/2007 01:48 AM
Please respond to
[email protected]


To
[email protected]
cc

Subject
Re: [Axis2] issue when using wsdl2code to generate service 
[SEC=UNCLASSIFIED]
Reference


 Expires 






So if you generate the code by running the maven plugin twice, Does it 
creates the ExtenstionMapper in correct package? 


On 5/9/07, [EMAIL PROTECTED] <
[EMAIL PROTECTED]> wrote:

Hi, 

In addition to the scenario in the previous email, the setup below seems 
to result in ExtensionMapper classes being generated with the same package 
name: 

-A and B are two separate maven projects 
-A and B both use the wsdl2code maven plugin, but contain different wsdls 
-Both A and B are sub projects of parent project C.   

Running mvn compile on parent project C results in the ExtensionMappers 
generated in A and B having the same package name.   

With reference to the code, it seems like this behaviour is due to the 
extensionMapperPackageName variable in 
org.apache.axis2.schema.writer.JavaBeanWriter not being reset after the 
wsdl2code maven plugin is invoked.  Is it feasible to have the extension 
mapper packageName reset each time, or for some other similar change to be 
made? 

Cheers, 
Greg 




[EMAIL PROTECTED] 
08/05/2007 09:58 AM 

Please respond to
[email protected]



To
[email protected] 
cc

Subject
[Axis2] issue when using wsdl2code to generate service [SEC=UNCLASSIFIED] 
Reference


 Expires 









Hi, 

Our team is currently using Axis2 v1.2, and we have a maven2 project that 
requires java source code to be generated for 2 different wsdls.  We are 
using the wsdl2code maven plugin to generate the java code, with one 
execution for each wsdl.  e.g. 

<plugin> 
       <groupId>org.apache.axis2</groupId> 
       <artifactId>axis2-wsdl2code-maven-plugin</artifactId> 
       <version>1.2</version> 
       <executions> 
 
               <execution> 
                       <id>xQuotes</id> 
                       <configuration> 
 <wsdlFile>src/main/wsdl/xQuotes.wsdl</wsdlFile> 
 <packageName>au.gov.centrelink.jfs.servicemanager.service</packageName> 
 
<outputDirectory>${project.build.directory}/generated-sources/axis2/wsdl2code/xQuotes</outputDirectory>
 

                       </configuration> 
                       <goals> 
                               <goal>wsdl2code</goal> 
                       </goals> 
               </execution> 
 
               <!-- Needs Axis2 1.1.1 or later --> 
 
               <execution> 
                       <id>email</id> 
                       <configuration> 
 <wsdlFile>src/main/wsdl/Emailvernotestemail.wsdl</wsdlFile> 
 <packageName>au.gov.centrelink.jfs.isislocation.service</packageName> 
 
<outputDirectory>${project.build.directory}/generated-sources/axis2/wsdl2code/email</outputDirectory>
 

                       </configuration> 
                       <goals> 
                               <goal>wsdl2code</goal> 
                       </goals> 
               </execution> 
 
       </executions> 
       <configuration> 
               <unpackClasses>true</unpackClasses> 
       </configuration> 
</plugin> 


However we are getting a problem during the compile phase, caused by 
duplicates of the generated ExtensionMapper class.  i.e. output from mvn 
compile is 


[INFO] 
------------------------------------------------------------------------ 
[ERROR] BUILD FAILURE 
[INFO] 
------------------------------------------------------------------------ 
[INFO] Compilation failure 
C:\Java\test\target\generated-sources\axis2\wsdl2code\xQuotes\src\com\xignite\www
 

\services\ExtensionMapper.java:[14,16] duplicate class: 
com.xignite.www.services 
.ExtensionMapper 



C:\Java\test\target\generated-sources\axis2\wsdl2code\xQuotes\src\com\xignite\www
 

\services\ExtensionMapper.java:[14,16] duplicate class: 
com.xignite.www.services 
.ExtensionMapper 


[INFO] 
------------------------------------------------------------------------ 
[DEBUG] Trace 
org.apache.maven.BuildFailureException: Compilation failure 
C:\Java\test\target\generated-sources\axis2\wsdl2code\xQuotes\src\com\xignite\www
 

\services\ExtensionMapper.java:[14,16] duplicate class: 
com.xignite.www.services 
.ExtensionMapper 


It seems that the ExtensionMapper class for the second wsdl is generated 
into the same package as the ExtensionMapper class for the first wsdl.   

What I am unsure of is why this is happening.  Is this an issue with 
maven2 or with the wsdl2code plugin?  Or is it due to the approach we have 
used to generate code for 2 services within a single project?  I can't 
think of any other way to do this... 

I have attached the wsdls and pom.xml.  I was testing using the jdk 
version 1.4.2, maven version 2.0.6, and axis2 1.2 



Thanks in advance for any help, 

Greg********************************************************************** 
IMPORTANT: This e-mail is intended for the use of the addressee and may 
contain information that is confidential, commercially valuable or subject 
to legal or parliamentary privilege. If you are not the intended recipient 
you are notified that any review, re-transmission, disclosure, use or 
dissemination of this communication is strictly prohibited by several 
Commonwealth Acts of Parliament. If you have received this communication 
in error please notify the sender immediately and delete all copies of 
this transmission together with any attachments. 
********************************************************************** 
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED] 

********************************************************************** 
IMPORTANT: This e-mail is intended for the use of the addressee and may 
contain information that is confidential, commercially valuable or subject 
to legal or parliamentary privilege. If you are not the intended recipient 
you are notified that any review, re-transmission, disclosure, use or 
dissemination of this communication is strictly prohibited by several 
Commonwealth Acts of Parliament. If you have received this communication 
in error please notify the sender immediately and delete all copies of 
this transmission together with any attachments. 
********************************************************************** 



-- 
Amila Suriarachchi,
WSO2 Inc. 

**********************************************************************
IMPORTANT:  This e-mail is intended for the use of the addressee and may 
contain information that is confidential, commercially valuable or subject to 
legal or parliamentary privilege.  If you are not the intended recipient you 
are notified that any review, re-transmission, disclosure, use or dissemination 
of this communication is strictly prohibited by several Commonwealth Acts of 
Parliament.  If you have received this communication in error please notify the 
sender immediately and delete all copies of this transmission together with any 
attachments.
**********************************************************************

Reply via email to