Discussion:
java.io.IOException: Non nillable element is null
Ronnie Downing
2006-02-28 16:52:38 UTC
Permalink
Anand,

I, too, get this error. Did you ever find a solution to it?

Further, I don't believe I have access to the code that let's me control the
nillable attribute. The stubs I have don't have anything about nillable, so
that may be hiddent from me.

This is all part of a greater effort to upgrade to a WL 9 server. Been a lot
more trouble than I anticipated, first w XML parsing. Had to upgrade from
Axis 1.2 to get past the parsing problem. Axis 1.3 brings this nillable
problem.

Thanks!

Ronnie

--------
I get the same error even when I populate the element with a genuine value.
I am at loss as to what is going on here. Please help.




--------------------------------------------------------------------------------

From: Kasi, Anand [mailto:***@sabre-holdings.com]
Sent: Monday, December 05, 2005 10:30 AM
To: axis-***@ws.apache.org
Subject: RE: java.io.IOException: Non nillable element is null



When I populate the client side proxy object, I do not populate the
UserNameToken object, nor its parent, thus satisfying minOccurs = 0. I am
not setting the value to null. I am not sure what is going on here.



Anand






--------------------------------------------------------------------------------

From: Jerry DuVal [mailto:***@pace2020.com]
Sent: Monday, December 05, 2005 7:18 AM
To: axis-***@ws.apache.org
Subject: RE: java.io.IOException: Non nillable element is null



When the element is nillable=”false” then you are not able to set the value
to null. If you set nillable=”true” then regenerate the stubs you should not
get this error, but with the minOccurs=”0” and nillable=”true” when you set
the value to null it will not send the placeholder.



Jerry DuVal
Pace Systems Group, Inc.
800.624.5999
www.Pace2020.com


--------------------------------------------------------------------------------

From: Kasi, Anand [mailto:***@sabre-holdings.com]
Sent: Sunday, December 04, 2005 6:36 PM
To: axis-***@ws.apache.org
Subject: java.io.IOException: Non nillable element is null



Hi,

I have an issue here which is happening only in Axis 1.3 and not 1.1. I am
getting the following exception.

17:20:14,196 ERROR [BeanSerializer] Exception:

java.io.IOException: Non nillable element 'usernameToken' is null.

at
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:215)

at
org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1502)

at
org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:978)

at
org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:799)

at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)

at
org.apache.axis.message.RPCHeaderParam.outputImpl(RPCHeaderParam.java:45)

at
org.apache.axis.message.MessageElement.output(MessageElement.java:1208)

at
org.apache.axis.message.SOAPHeader.outputImpl(SOAPHeader.java:328)

at
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:476)

at
org.apache.axis.message.MessageElement.output(MessageElement.java:1208)

at org.apache.axis.client.Call.invoke(Call.java:2757)

at org.apache.axis.client.Call.invoke(Call.java:2443)

at org.apache.axis.client.Call.invoke(Call.java:2366)

at org.apache.axis.client.Call.invoke(Call.java:1812)



I have pasted the code fragment from the corresponding stub file auto
generated by Axis from the wsdl.

typeDesc.setXmlType(new
javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext",
">>Security>UsernameToken"));

org.apache.axis.description.ElementDesc elemField = new
org.apache.axis.description.ElementDesc();

elemField.setFieldName("username");

elemField.setXmlName(new
javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext",
"Username"));

elemField.setXmlType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));

elemField.setMinOccurs(0);

elemField.setNillable(false);

typeDesc.addFieldDesc(elemField);

I tried changing nillable to true, but still have the same problem. Axis
seems to not handle minOccurs and nillable well. I am confused as to what I
can try here? This was not an issue with Axis 1.1

Please help.



Anand




Ronnie 703-526-0001

In the beginning, God created the heaven and the earth (Ge 1:1)

_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
Ronnie Downing
2006-03-06 18:33:37 UTC
Permalink
It appears the solution to this is to re-generate the stubs (WSDL2Java) with
Axis 1.3. At least that appears to work for me.

Ronnie
Post by Ronnie Downing
Subject: RE: java.io.IOException: Non nillable element is null
Date: Tue, 28 Feb 2006 11:52:38 -0500
Anand,
I, too, get this error. Did you ever find a solution to it?
Further, I don't believe I have access to the code that let's me control
the nillable attribute. The stubs I have don't have anything about
nillable, so that may be hiddent from me.
This is all part of a greater effort to upgrade to a WL 9 server. Been a
lot more trouble than I anticipated, first w XML parsing. Had to upgrade
from Axis 1.2 to get past the parsing problem. Axis 1.3 brings this
nillable problem.
Thanks!
Ronnie
--------
I get the same error even when I populate the element with a genuine value.
I am at loss as to what is going on here. Please help.
--------------------------------------------------------------------------------
Sent: Monday, December 05, 2005 10:30 AM
Subject: RE: java.io.IOException: Non nillable element is null
When I populate the client side proxy object, I do not populate the
UserNameToken object, nor its parent, thus satisfying minOccurs = 0. I am
not setting the value to null. I am not sure what is going on here.
Anand
--------------------------------------------------------------------------------
Sent: Monday, December 05, 2005 7:18 AM
Subject: RE: java.io.IOException: Non nillable element is null
When the element is nillable=”false” then you are not able to set the value
to null. If you set nillable=”true” then regenerate the stubs you should
not get this error, but with the minOccurs=”0” and nillable=”true” when you
set the value to null it will not send the placeholder.
Jerry DuVal
Pace Systems Group, Inc.
800.624.5999
www.Pace2020.com
--------------------------------------------------------------------------------
Sent: Sunday, December 04, 2005 6:36 PM
Subject: java.io.IOException: Non nillable element is null
Hi,
I have an issue here which is happening only in Axis 1.3 and not 1.1. I am
getting the following exception.
java.io.IOException: Non nillable element 'usernameToken' is null.
at
org.apache.axis.encoding.ser.BeanSerializer.serialize(BeanSerializer.java:215)
at
org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1502)
at
org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:978)
at
org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:799)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:208)
at
org.apache.axis.message.RPCHeaderParam.outputImpl(RPCHeaderParam.java:45)
at
org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at
org.apache.axis.message.SOAPHeader.outputImpl(SOAPHeader.java:328)
at
org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:476)
at
org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
at org.apache.axis.client.Call.invoke(Call.java:2757)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
I have pasted the code fragment from the corresponding stub file auto
generated by Axis from the wsdl.
typeDesc.setXmlType(new
javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext",
">>Security>UsernameToken"));
org.apache.axis.description.ElementDesc elemField = new
org.apache.axis.description.ElementDesc();
elemField.setFieldName("username");
elemField.setXmlName(new
javax.xml.namespace.QName("http://schemas.xmlsoap.org/ws/2002/12/secext",
"Username"));
elemField.setXmlType(new
javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
elemField.setMinOccurs(0);
elemField.setNillable(false);
typeDesc.addFieldDesc(elemField);
I tried changing nillable to true, but still have the same problem. Axis
seems to not handle minOccurs and nillable well. I am confused as to what I
can try here? This was not an issue with Axis 1.1
Please help.
Anand
Ronnie 703-526-0001
In the beginning, God created the heaven and the earth (Ge 1:1)
_________________________________________________________________
Is your PC infected? Get a FREE online computer virus scan from McAfee®
Security. http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar – get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/

Loading...