-
1. Re: Usage of xsi:nil with literal style
thomas.diesler Apr 28, 2005 7:23 AM (in response to thomas.diesler)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.
http://www-106.ibm.com/developerworks/webservices/library/ws-whichwsdl/ -
2. Re: Usage of xsi:nil with literal style
noel.rocher Apr 28, 2005 9:02 AM (in response to thomas.diesler)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 ... -
3. Re: Usage of xsi:nil with literal style
thomas.diesler Apr 28, 2005 9:07 AM (in response to thomas.diesler)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 -
4. Re: Usage of xsi:nil with literal style
noel.rocher Apr 28, 2005 9:12 AM (in response to thomas.diesler)ok, fyi BP1.1, they change MESSAGE to ENVELOPE
-
5. Re: Usage of xsi:nil with literal style
noel.rocher Apr 28, 2005 10:21 AM (in response to thomas.diesler)from Jason
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
allowed.
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
corresponding type.
-Jason
and
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.