You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by "Rich Scheuerle (JIRA)" <ji...@apache.org> on 2010/03/30 15:26:27 UTC

[jira] Resolved: (AXIS2-4667) JAX-W:NullPointerException in MethodMarshalerUtils

     [ https://issues.apache.org/jira/browse/AXIS2-4667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Scheuerle resolved AXIS2-4667.
-----------------------------------

    Resolution: Fixed

Committed Revision 928871

> JAX-W:NullPointerException in MethodMarshalerUtils
> --------------------------------------------------
>
>                 Key: AXIS2-4667
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4667
>             Project: Axis2
>          Issue Type: Bug
>          Components: jaxws
>            Reporter: Rich Scheuerle
>            Assignee: Rich Scheuerle
>   Original Estimate: 1h
>  Remaining Estimate: 1h
>
> Background:
> -----------------
> A wsdl operation may defined one or more message parts that are mapped to header elements.  This is unusual, but it is allowed by the specification.
> In JAX-WS, these header mapped parameters can be designed using the @WebParam annotation.  Here is an example:
> @WebMethod                                                      
> @WebResult(name = "String",  targetNamespace = "http://sample",  partName = "result")                                 
> public String myOperation(                                      
>         @WebParam(name = "BodyInteger",   targetNamespace = "http://sample", partName = "bodyParam")                       
>         int bodyParam,                                          
>         @WebParam(name = "HeaderString",  targetNamespace = "http://sample",   partName = "headerParam",  header=true)                                   
>         String headerParam)                                     
>     ;                              
> Problem:
> -------------
> A remote node may send a message that lacks the header element for the parameter.   This causes a NullPointerException.
> Here is the location of the NullPointerException:
> org.apache.axis2.jaxws.ExceptionFactory
> logRootCause stack:java.lang.NullPointerException
> at
> org.apache.axis2.jaxws.marshaller.impl.alt.MethodMarshallerUtils
> .getPDElements(MethodMarshallerUtils.java:335)
> at
> org.apache.axis2.jaxws.marshaller.impl.alt.DocLitBareMethodMarsh
> aller.demarshalResponse(DocLitBareMethodMarshaller.java:133)
> at
> Solution:
> ------------
> The JAX-WS code should properly accommodate the missing header parameter.  
> A validation test will be provided to verify the new code.
> Note: the JAX-WS Proxy engine currently sends a header element with a xsi:nil="true" if the java argument for the parameter is null. 
> We believe that this is the safest and most correct behavior.
> However, I am adding a new JAX-WS RequestContext property which will allow a user to specify that no header element should be sent in such cases.
> This new property is used by the validation test.

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org