You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Ias <ia...@apache-korea.org> on 2003/10/26 10:20:50 UTC

[PATCH] Wrapped style skips necessary type generations

I found this problem from my experience that I've worked on J2ME web
services.

The attached WSDL is introduced in J2ME WS spec (appendix). The point is
that WSDL2Java works wrong while it is processing types. From the WSDL,
Axis recognizes it is wrapped-style, and sets the type of wrapper elements
as "isOnlyLiteralReferenced true". However, the marked types can be used in
other types or elements rather than the wrapper elements. For example,

			<xsd:element name="isManager" type="xsd1:NameType"/>
->
NameType's onlyLiteralReferenced is set to true since isManager is
considered to be a wrapper element.

			<xsd:element name="getEmployees"
type="xsd1:NameArrayType"/>
->
NameArrayType's onlyLiteralReferenced is also set to true since
getEmployees is considered to be a wrapper element.  
->
NameArrayType's nested type, i.e., NameType's onlyLiteralReferenced is
true, so JavaTypeWriter skips its generation.

The attached patch is "awakening" those types that are once only literally
referenced but later turned "not" only literally referenced.

I tested this WSDL before and after applying this patch. The former result
brought no type artifacts, so port class couldn't be compiled. On the other
hand, the latter result emitted exactly necessary type artifacts.

I hope more tests and reviews are put to this case and solution as well.

Thanks,

Ias 

=========================================================
Lee, Changshin (Korean name)
Ias (International name)
           Company Web Site: http://www.tmax.co.kr
           Personal Web Site: http://www.iasandcb.pe.kr
---------------------------------------------------------
Senior Researcher, Emerging Technology Evangelist
JCP member - http://jcp.org/en/participation/members/L
R&D Institute
Tmax Soft, Inc.
JCP member - http://jcp.org/en/participation/members/T
=========================================================