I am not sure about this. If the schema has minOccurs=0 or nillable=true then it would be correct to ommit the element all together, which I believe Axis does not do.
Your issue might be related to http://jira.jboss.com/jira/browse/JBWS-168
Where did you read about xsi and encoded vs. literal style?
The IBM artichle "Which style of WSDL should I use?" makes use of xsi:nil with literal style.
in WS-I BP1.0 I've found this:
R2211 A MESSAGE described with an rpc-literal binding MUST NOT have the xsi:nil attribute with a value of "1" or "true" on the part accessors.
nothing yet for doc ...
This is talking about message bindings in the wsdl. It means the part element in wsdl should not have xsi:nil=true, i.e. you cannot have nil parts.
AFAIK, you can have xsi:nil with complex types defined in schema
ok, fyi BP1.1, they change MESSAGE to ENVELOPE
The xsi prefix typically refers to schema-instance, which is literal
valid. What you are thinking of is xsi:null (as opposed to xsi:nil)
which is a schema 1999 attribute. SOAP Encoding states that use of
xsi:null for null values is allowed, but it was never a requirement. It
also says custom attributes, and omitting the tag altogether is also
So, to clarify, anything that is sent using the literal style must be
schema 2001 valid, and thus must use xsi:nil to represent a null value.
This, however, is only allowed if the schema has nillable=true on the
I left one thing out. An element can only be omitted if minOccurs=0, all
nillable=true does is allow xsi:nil to be used.