Re: Generics Support / Forced Stub Generation
I thought that could not be done, because web services doesn't return java complex types, like Lists, HashMaps and etc. Could anyone clarify this question? Thanks in advance, --fx On Tue, Apr 7, 2009 at 3:22 AM, Rahul Miglani rmigl...@quark.com wrote: Hi, 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 [mailto:rj...@yahoo.com] Sent: Tuesday, April 07, 2009 11:42 AM To: axis-user@ws.apache.org Subject: Generics Support / Forced Stub Generation Hi, I'm using axis 1.2.1 I have a method which returns an object of type MapString, MyType1 where MyType1 is a bean. MapString, 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 MapString, 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?
Re: Generics Support / Forced Stub Generation
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(?)... Rahul - Original Message From: Rahul Miglani rmigl...@quark.com To: axis-user@ws.apache.org Sent: Monday, April 6, 2009 11:22:42 PM Subject: RE: Generics Support / Forced Stub Generation Hi, 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 [mailto:rj...@yahoo.com] Sent: Tuesday, April 07, 2009 11:42 AM To: axis-user@ws.apache.org Subject: Generics Support / Forced Stub Generation Hi, I'm using axis 1.2.1 I have a method which returns an object of type MapString, MyType1 where MyType1 is a bean. MapString, 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 MapString, 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? Thanks, Rahul
RE: Generics Support / Forced Stub Generation
Hi, 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 [mailto:rj...@yahoo.com] Sent: Tuesday, April 07, 2009 11:42 AM To: axis-user@ws.apache.org Subject: Generics Support / Forced Stub Generation Hi, I'm using axis 1.2.1 I have a method which returns an object of type MapString, MyType1 where MyType1 is a bean. MapString, 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 MapString, 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? Thanks, Rahul