[ 
https://issues.apache.org/jira/browse/AXIS2-2116?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12470696
 ] 

Manoj Khangaonkar commented on AXIS2-2116:
------------------------------------------

Deepal,

There is no reason to have the limitation that AXIS2 supports only java beans. 
Remember that java2WSDL is typically used
to generate WSDL for legacy java code. The legacy code may or may not be java 
bean. It seems unreasonable that java2WSDL cannot
handle class if there are no get/set methods.

I propose this as an enhancement. I know how to fix it and will provide the 
patch.

Currently java2WSDL uses codehaus library for introspecting the 
metthods/parameters in the input java class. When
introspecting the parameters, the code gets only the "properties" from the 
class. We really need to get the "properties" and
"fields".

"fields" in codehaus refers to public members of the class.

If you see any serious downside to doing this, let me know - other wise I can 
provide a patch.

Even if we decide not to support this , the code should print a warning and not 
spit out incorrect WSDL.

Dims,

The issue is that the generated WSDL is incorrect. This is straight - 
generation of WSDL from java - so unless I am missing
something obvious - there are no databinding issues here.

Manoj

> java2WSDL should generate schema elements for public fields
> -----------------------------------------------------------
>
>                 Key: AXIS2-2116
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2116
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Improvement
>          Components: wsdl
>    Affects Versions: 1.2, 1.1.1, nightly
>         Environment: ALL
>            Reporter: Manoj Khangaonkar
>
> When java2WSDL generates schema for method parameters, it generates elements 
> only for "properties" - those that have get/set metthods.
> If I have a class that has fields without get/set methods like
> public class Book {
> public String title ;
> public String author ;
> }
> The complex type in types section of the WSDL is
> <xs:complexType name="Book">
> <xs:sequence />
> </xs:complexType>
> It should be
> <xs:complexType name="Book">
> <xs:sequence >
> <xs:element name="title" nillable="true" type="xs:string" />
> <xs:element name="author" nillable="true" type="xs:string" />
> </xs;sequence>
> </xs:complexType>
> java2wsdl is typically used to generate WSDL for legacy code and it is not 
> reasonable to expect users to go add get/set methods to legacy code
> just because they need to generate WSDL

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to