axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul J <>
Subject Re: Generics Support / Forced Stub Generation
Date Thu, 09 Apr 2009 03:55:48 GMT

Thank you Rahul.

As for Java 5 generics support, I'm guessing that the Axis 1 version that I'm using may just
not support them(?)...  


----- Original Message ----
From: Rahul Miglani <>
Sent: Monday, April 6, 2009 11:22:42 PM
Subject: RE: Generics Support / Forced Stub Generation


You can use the -xc (extraClasses) option with java2wsdl and give the fully qualified name
of the MyType1 bean. This will result in generation of schema for your bean class even if
it is not directly referenced in any of the operations.

As for the first part of your mail I am not very sure so maybe somebody else might be able
to help you out in that.

Thanks and Regards,
Rahul Miglani
Quark Media House

-----Original Message-----
From: Rahul J [] 
Sent: Tuesday, April 07, 2009 11:42 AM
Subject: Generics Support / Forced Stub Generation


I'm using axis 1.2.1

I have a method which returns an object of type Map<String, MyType1> where MyType1 is
a bean. 

          Map<String, MyType1> myMethod(String a, String b)

When I run java2wsdl followed by wsdl2java, this results in a HashMap object in the generated
Java type. 

          HashMap myMethod(String a, String b)

Thus, the types of the Map (generics feature) are lost. 

Is there a way to make java2wsdl/wsdl2java to support Java 5 generics, so that the generated
method also has a return type of Map<String, MyType1>?

Secondly, because generics are not supported, the WSDL doesn't contain MyType1, so MyType1
Java type is not generated by wsdl2java. 

This type is defined in beanMapping as follows: 

<beanMapping qname="myNs:MyType1" type="java:com.myCompany.MyType1" encodingStyle=""/>

Is there a way to force generation of this Java type (Stubs) even if any method in WSDL
doesn't contain it? 



View raw message