Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 9390 invoked from network); 30 Mar 2010 14:39:51 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 30 Mar 2010 14:39:51 -0000 Received: (qmail 10015 invoked by uid 500); 30 Mar 2010 14:39:51 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 9870 invoked by uid 500); 30 Mar 2010 14:39:50 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 9862 invoked by uid 99); 30 Mar 2010 14:39:50 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Mar 2010 14:39:50 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Mar 2010 14:39:48 +0000 Received: from brutus.apache.org (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3ABF9234C4BA for ; Tue, 30 Mar 2010 14:39:27 +0000 (UTC) Message-ID: <1434537312.579401269959967239.JavaMail.jira@brutus.apache.org> Date: Tue, 30 Mar 2010 14:39:27 +0000 (UTC) From: "Rich Scheuerle (JIRA)" To: java-dev@axis.apache.org Subject: [jira] Updated: (AXIS2-4667) JAX-WS:NullPointerException in MethodMarshalerUtils In-Reply-To: <10581783.556981269888867150.JavaMail.jira@brutus.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/AXIS2-4667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Rich Scheuerle updated AXIS2-4667: ---------------------------------- Summary: JAX-WS:NullPointerException in MethodMarshalerUtils (was: JAX-W:NullPointerException in MethodMarshalerUtils) > JAX-WS: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