Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

xsd:boolean mapping to java.lang.Boolean

843834Jan 3 2006
Hi,

I am using JWSDP 1.6 to generate client stubs for a given WSDL file. In this WSDL, there is a complexType definition as follows:
  <complexType name="ClassifierAccess">
   <sequence>
     <element name="classifierId" type="Organite:ClassifierID" minOccurs="1" maxOccurs="1"/>
     <element name="password-train" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default=""/>
     <element name="password-classify" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default=""/>
     <element name="password-view" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default=""/>
     <element name="password-remote" type="xsd:string" minOccurs="0" maxOccurs="1" nillable="true" default=""/>
     <element name="use-parent-password" type="xsd:boolean" minOccurs="0" maxOccurs="1" default="true"/>
     <element name="remote-train" type="Organite:RemotingType" minOccurs="0" maxOccurs="1" default="RT-NEVER"/>
     <element name="remote-classify" type="Organite:RemotingType" minOccurs="0" maxOccurs="1" default="RT-NEVER"/>
   </sequence>
  </complexType>
I feed the WSDL into "wscompile" as follows:
wscompile.bat -gen:client -keep -d build-dir -classpath classpath config.xml
Where config.xml is as follows:
<configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
<wsdl location="Organite.wsdl" packageName="com.symphonia.organite"/>
</configuration>
The element in question is "use-parent-password", which is of type xsd:boolean. As far as I can figure, xsd:boolean should map to the primitive type "boolean" as long as the "nillable" attribute is not set to true. But when I look at the generated Java code, it is as follows:
public class ClassifierAccess {
    protected com.symphonia.organite.ClassifierID classifierId;
    protected java.lang.String passwordTrain;
    protected java.lang.String passwordClassify;
    protected java.lang.String passwordView;
    protected java.lang.String passwordRemote;
    protected java.lang.Boolean useParentPassword;
    protected com.symphonia.organite.RemotingType remoteTrain;
    protected com.symphonia.organite.RemotingType remoteClassify;
Note the java.lang.Boolean type on useParentPassword. Shouldn't the type be "boolean"?

Any ideas?
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 31 2006
Added on Jan 3 2006
0 comments
238 views