[ 
https://issues.apache.org/jira/browse/AXIS2-2309?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12480134
 ] 

Rich Scheuerle commented on AXIS2-2309:
---------------------------------------

Background:

A doc/lit base parameter is always represented by a root element.

Root elements cannot have occurrence attributes (i.e. minOccurs=0) per the XML 
Schema specification.

Thus java null must be represented by an element with a xsi:nill=true attribute.
Example:
   <foo xsi:nil="true" />

-------------------------------
This issue will be used to 
  1) Make sure that the JAX-WS layer supports null java objects for doc/lit 
bare parameters.
  2) Make sure that the JAX-WS marshalling code correctly sends the null using 
xsi:nil.
  3) Make sure that the JAX-WS unmarshalling code accurate receives and 
processes null values.

Thanks Dims for the heads up.  This may take a few days to assess.

> Unnecessary WebServiceException if parameter is null
> ----------------------------------------------------
>
>                 Key: AXIS2-2309
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2309
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>            Reporter: Davanum Srinivas
>         Assigned To: Rich Scheuerle
>         Attachments: my.diff
>
>
> Around line 280 in 
> src/org/apache/axis2/jaxws/marshaller/impl/alt/DocLitBareMethodMarshaller.java,
>  there is a check for null value and a WebServiceException is thrown. There 
> is a comment just before this code that says the following.
> =====================================================================================
>              // TODO This needs more work.  We need to check inside holders 
> of input params.  We also
>              // may want to exclude header params from this check
>              //Validate input parameters for operation and make sure no input 
> parameters are null.
>             //As per JAXWS Specification section 3.6.2.3 if a null value is 
> passes as an argument
>             //to a method then an implementation MUST throw 
> WebServiceException.
> =====================================================================================
> *BUT* this is not correct reading of the jaxws 2.0 spec (Page 39) says the 
> following:
> =====================================================================================
> Due to the limitations described in section 5.3.1 of theWS-I Basic Profile 
> specification (see [8]), null values
> cannot be used as method arguments or as the return value from a method which 
> uses the rpc/literal binding.
> } 
> Conformance (Null Values in rpc/literal): If a null value is passed as an 
> argument to amethod, or returned
> from amethod, that uses the rpc/literal style, then an implementation MUST 
> throw a WebServiceException.
> =====================================================================================
> So the WebServiceException for null parameters is not applicable to 
> doc/lit/bare. it's required only for rpc/lit.
> thanks,
> dims

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to