简体   繁体   中英

Want to set true to boolean in WSDL

We are Creating a WSDL for soap request , where we have a boolean variable. As we know boolean is by default "false". But we need to have it as true.

I wanted to know where to set this value to true. So even if the variable is not set, it will take as True. Please advice.

thanks in advance.

** More info: **

<complexType name="User">
<sequence>
 <element name="IMAddress" nillable="true" type="soapenc:string"/>
 <element name="**active**" type="xsd:boolean"/>
 <element name="address" nillable="true" type="soapenc:string"/>

so, i want my wsdl to have a variable active to be default true. My WSDL is a "WSDL created by Apache Axis version: 1.4 Built on Apr 22, 2006 (06:55:48 PDT)"

    <!-- Create wsdl file -->
    <java classname="org.apache.axis.wsdl.Java2WSDL" fork="true" failonerror="true">
        <classpath refid="axis-classpath" />
  <jvmarg value="-Dlog4j.configuration=file:${env.log4j.configuration}"/>
        <arg value="--output" /> <arg value="${service}.wsdl" />
 </java>

i tried setting the active variable to be true in my User bean, but that did not help.

<xsd:element name="isCaseSensitive" type="xsd:boolean" default="false"/>

Or set Annotation to the field in a class :

@XmlElement(defaultValue = "false")
private boolean isCaseSensitive;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM