title: How to pass null value to Document Literal SOAP Request
body: <p>Hi,
  I am passing the null value for the resourcekey in the SOAP Request as below.</p>
  
  <pre><code> &lt;urn:createNetwork&gt;
   &lt;net:resourceIdentityInfo&gt;
          &lt;api:resourceKey &gt;&lt;/api:resourceKey&gt;
             &lt;api:resourceName&gt;TEST2&lt;/api:resourceName&gt;
             &lt;api:resourceType&gt;NETWORK&lt;/api:resourceType&gt;
   &lt;/net:resourceIdentityInfo&gt;
   &lt;/urn:createNetwork&gt;
  </code></pre>
  
  <p>The sample WSDL file for this request is as below:</p>
  
  <pre><code> &lt;wsdl:operation name="createNetwork"&gt;
  
       &lt;wsdlsoap:operation soapAction=""/&gt;
  
       &lt;wsdl:input name="createNetworkRequest"&gt;
  
          &lt;wsdlsoap:body use="literal"/&gt;
  
       &lt;/wsdl:input&gt;
  
       &lt;wsdl:output name="createNetworkResponse"&gt;
  
          &lt;wsdlsoap:body use="literal"/&gt;
  
       &lt;/wsdl:output&gt;
  
        &lt;/wsdl:operation&gt;
  
    &lt;element name="createNetwork"&gt;
   &lt;complexType&gt;
   &lt;sequence&gt;
    &lt;element name="in0" type="tns5:NetworkInfo"/&gt;
   &lt;/sequence&gt;
  &lt;/complexType&gt;
   &lt;/element&gt;
   &lt;element name="createNetworkResponse"&gt;
   &lt;complexType&gt;
   &lt;sequence&gt;
    &lt;element name="createNetworkReturn" type="tns2:ResourceIdentityInfo"/&gt;
   &lt;/sequence&gt;
  &lt;/complexType&gt;
  &lt;/element&gt;
  &lt;wsdl:message name="createNetworkRequest"&gt;
    &lt;wsdl:part element="intf:createNetwork" name="parameters"&gt;
    &lt;/wsdl:part&gt;
  &lt;/wsdl:message&gt;
   &lt;complexType name="NetworkInfo"&gt;
  &lt;sequence&gt;
   &lt;element name="comments" nillable="true" type="impl:ArrayOf_xsd_anyType"/&gt;
   &lt;element name="description" nillable="true" type="xsd:string"/&gt;
   &lt;element name="dnsDomainName" nillable="true" type="xsd:string"/&gt;
   &lt;element name="documentUrls" nillable="true" type="impl:ArrayOf_xsd_anyType"/&gt;
   &lt;element name="resourceIdentityInfo" nillable="true" type="tns2:ResourceIdentityInfo"/&gt;
  &lt;/sequence&gt;
  &lt;/complexType&gt;
  &lt;complexType name="ResourceIdentityInfo"&gt;
  &lt;sequence&gt;
   &lt;element name="resourceKey"  nillable="true" type="xsd:string"/&gt;
   &lt;element name="resourceName" nillable="true" type="xsd:string"/&gt;
   &lt;element name="resourceType" nillable="true" type="xsd:string"/&gt;
  &lt;/sequence&gt;
  &lt;/complexType&gt;
  </code></pre>
  
  <p>I have declared as nillable=true in all the places. 
  If i pass the resourcekey as empty, in SOAP UI I am getting null pointer exception. </p>
  
  <pre><code>&lt;soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"   xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
  &lt;soapenv:Body&gt;
    &lt;soapenv:Fault&gt;
       &lt;faultcode&gt;soapenv:Server.userException&lt;/faultcode&gt;
       &lt;faultstring&gt;java.lang.NullPointerException&lt;/faultstring&gt;
       &lt;detail&gt;
          &lt;ns1:hostname   xmlns:ns1="http://xml.apache.org/axis/"&gt;linbgg244.lss.emc.com&lt;/ns1:hostname&gt;
       &lt;/detail&gt;
    &lt;/soapenv:Fault&gt;
  &lt;/soapenv:Body&gt;
  &lt;/soapenv:Envelope&gt;
  </code></pre>
  
  <p>I have tried with</p>
  
  <pre><code>&lt;api:resourceKey xsi:nil="true" &gt;&lt;/api:resourceKey&gt; 
  </code></pre>
  
  <p>The same null pointer exception is getting. </p>
  
  <p>Could you please guide to resolve the issue?</p>
  
  <p>Thanks in advance.</p>