Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A4CD0200CF3 for ; Mon, 14 Aug 2017 11:00:07 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id A374F164B0E; Mon, 14 Aug 2017 09:00:07 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F3049164B0C for ; Mon, 14 Aug 2017 11:00:06 +0200 (CEST) Received: (qmail 75970 invoked by uid 500); 14 Aug 2017 09:00:05 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 75959 invoked by uid 99); 14 Aug 2017 09:00:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Aug 2017 09:00:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id D20D018036E for ; Mon, 14 Aug 2017 09:00:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id qWLz1OZTamlI for ; Mon, 14 Aug 2017 09:00:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 120275F254 for ; Mon, 14 Aug 2017 09:00:04 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A7FDDE09FE for ; Mon, 14 Aug 2017 09:00:03 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 615DB2140B for ; Mon, 14 Aug 2017 09:00:03 +0000 (UTC) Date: Mon, 14 Aug 2017 09:00:03 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-7455) IndexOutOfBoundsException when message part is missing MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 14 Aug 2017 09:00:07 -0000 [ https://issues.apache.org/jira/browse/CXF-7455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125421#comment-16125421 ] ASF GitHub Bot commented on CXF-7455: ------------------------------------- Github user semancik commented on the issue: https://github.com/apache/cxf/pull/297 I was looking around how to construct a test for this. But I'm really puzzled. There seems to be very little documentation about writing tests. And I could not find any test that would be similar to what I'm trying to do. I have SOAP message that is causing the exception. It is a SOAP response from the server. How do I create a simple test that just attempts to process the message, runs the interceptors and checks the processed message? > IndexOutOfBoundsException when message part is missing > ------------------------------------------------------ > > Key: CXF-7455 > URL: https://issues.apache.org/jira/browse/CXF-7455 > Project: CXF > Issue Type: Bug > Affects Versions: 3.1.12 > Reporter: Radovan Semancik > > When SOAP response from the server does not include a part which is defined in the WSDL, the the following exception is thrown: > {code} > Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1 > at java.util.ArrayList.rangeCheck(ArrayList.java:653) > at java.util.ArrayList.get(ArrayList.java:429) > at org.apache.cxf.message.MessageContentsList.get(MessageContentsList.java:80) > at org.apache.cxf.jaxws.interceptors.HolderInInterceptor.handleMessage(HolderInInterceptor.java:69) > ... > {code} > Yes, this is violation of the specs. Parts should not be missing. However, there are bad servers out there (e.g. Windows 2008 WinRM). Throwing exception like this prohibits the client to handle the situation. Which breaks projects such as winrm4j when talking to old windows boxes. -- This message was sent by Atlassian JIRA (v6.4.14#64029)