Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AB588D8B8 for ; Wed, 1 Aug 2012 16:24:59 +0000 (UTC) Received: (qmail 10772 invoked by uid 500); 1 Aug 2012 16:24:59 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 10707 invoked by uid 500); 1 Aug 2012 16:24:59 -0000 Mailing-List: contact commits-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 commits@cxf.apache.org Received: (qmail 10700 invoked by uid 99); 1 Aug 2012 16:24:59 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2012 16:24:59 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Aug 2012 16:24:56 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 99C85238889B; Wed, 1 Aug 2012 16:24:12 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1368099 - /cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java Date: Wed, 01 Aug 2012 16:24:12 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120801162412.99C85238889B@eris.apache.org> Author: dkulp Date: Wed Aug 1 16:24:12 2012 New Revision: 1368099 URL: http://svn.apache.org/viewvc?rev=1368099&view=rev Log: [CXF-4449] Make sure the xmlbinding root elements are qualified Modified: cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java Modified: cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java URL: http://svn.apache.org/viewvc/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java?rev=1368099&r1=1368098&r2=1368099&view=diff ============================================================================== --- cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java (original) +++ cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java Wed Aug 1 16:24:12 2012 @@ -41,6 +41,8 @@ import org.apache.cxf.interceptor.URIMap import org.apache.cxf.interceptor.WrappedOutInterceptor; import org.apache.cxf.service.model.BindingInfo; import org.apache.cxf.service.model.BindingOperationInfo; +import org.apache.cxf.service.model.MessageInfo; +import org.apache.cxf.service.model.MessagePartInfo; import org.apache.cxf.service.model.OperationInfo; import org.apache.cxf.service.model.ServiceInfo; @@ -84,7 +86,9 @@ public class XMLBindingFactory extends A info.setName(new QName(service.getName().getNamespaceURI(), service.getName().getLocalPart() + "XMLBinding")); - for (OperationInfo op : service.getInterface().getOperations()) { + for (OperationInfo op : service.getInterface().getOperations()) { + adjustConcreteNames(op.getInput()); + adjustConcreteNames(op.getOutput()); BindingOperationInfo bop = info.buildOperation(op.getName(), op.getInputName(), op.getOutputName()); info.addOperation(bop); @@ -93,4 +97,14 @@ public class XMLBindingFactory extends A return info; } + private void adjustConcreteNames(MessageInfo mi) { + if (mi != null) { + for (MessagePartInfo mpi : mi.getMessageParts()) { + if (!mpi.isElement()) { + //if it's not an element, we need to make it one + mpi.setElementQName(mpi.getName()); + } + } + } + } }