Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 57348 invoked from network); 31 Mar 2011 11:23:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 31 Mar 2011 11:23:43 -0000 Received: (qmail 15840 invoked by uid 500); 31 Mar 2011 11:23:43 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 15820 invoked by uid 500); 31 Mar 2011 11:23:43 -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 15812 invoked by uid 99); 31 Mar 2011 11:23:43 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Mar 2011 11:23:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 31 Mar 2011 11:23:42 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id B93B28BF23 for ; Thu, 31 Mar 2011 11:23:05 +0000 (UTC) Date: Thu, 31 Mar 2011 11:23:05 +0000 (UTC) From: "Daniel Kulp (JIRA)" To: issues@cxf.apache.org Message-ID: <357782940.24123.1301570585755.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <982924600.23752.1301559665725.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (CXF-3433) RPCOutInterceptor naively appends "Response" to the request message name for a response message name MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-3433?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Kulp resolved CXF-3433. ------------------------------ Resolution: Not A Problem Fix Version/s: Invalid This is currently working per spec. The RPCOutInterceptor is used for "RPC-literal" style interactions. Per WSI-Basic Profil, section 4.7.10: "Conversely, in a rpc-literal SOAP binding, the serialized child element of the soap:Body element consists of a wrapper element, whose namespace is the value of the namespace attribute of the soapbind:body element and whose local name is either the name of the operation or the name of the operation suffixed with "Response". The namespace attribute is required, as opposed to being optional, to ensure that the children of the soap:Body element are namespace-qualified." For RPC-literal, there is no way to control the element name for the direct child of the soap:body. The block above covers it. > RPCOutInterceptor naively appends "Response" to the request message name for a response message name > ---------------------------------------------------------------------------------------------------- > > Key: CXF-3433 > URL: https://issues.apache.org/jira/browse/CXF-3433 > Project: CXF > Issue Type: Bug > Components: Core > Affects Versions: 2.3.1, 2.3.2, 2.3.3 > Environment: N/A > Reporter: Burton Alexander > Priority: Minor > Labels: RPCOutInterceptor, name, response > Fix For: Invalid > > > The existing code in org.apache.cxf.binding.soap.interceptor.RPCOutInterceptor appends "Response" as a suffix to a request message element name for the response name, ignoring the defined name in the associated WSDL. I've implemented the following fix for our environment: > protected String addOperationNode(NSStack nsStack, Message message, XMLStreamWriter xmlWriter, boolean output, BindingOperationInfo boi) throws XMLStreamException { > String ns = boi.getName().getNamespaceURI(); > SoapBody body = null; > if (output) { > body = boi.getOutput().getExtensor(SoapBody.class); > } else { > body = boi.getInput().getExtensor(SoapBody.class); > } > if (body != null && !StringUtils.isEmpty(body.getNamespaceURI())) { > ns = body.getNamespaceURI(); > } > nsStack.add(ns); > String prefix = nsStack.getPrefix(ns); > // Fixes the name problem > String name = getName(boi, output); > StaxUtils.writeStartElement(xmlWriter, prefix, name, ns); > return ns; > } > private String getName(BindingOperationInfo boi, boolean output) { > if (!output) { > return boi.getName().getLocalPart(); > } > return boi.getOutput().getMessageInfo().getName().getLocalPart(); > } -- This message is automatically generated by JIRA. For more information on JIRA, see: http://www.atlassian.com/software/jira