Author: dkulp Date: Wed Aug 1 18:28:07 2012 New Revision: 1368165 URL: http://svn.apache.org/viewvc?rev=1368165&view=rev Log: Merged revisions 1368111 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
........ r1368111 | dkulp | 2012-08-01 12:42:26 -0400 (Wed, 01 Aug 2012) | 10 lines Merged revisions 1368099 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1368099 | dkulp | 2012-08-01 12:24:12 -0400 (Wed, 01 Aug 2012) | 2 lines [CXF-4449] Make sure the xmlbinding root elements are qualified ........ ........ Modified: cxf/branches/2.5.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java Modified: cxf/branches/2.5.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java URL: http://svn.apache.org/viewvc/cxf/branches/2.5.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java?rev=1368165&r1=1368164&r2=1368165&view=diff ============================================================================== --- cxf/branches/2.5.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java (original) +++ cxf/branches/2.5.x-fixes/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLBindingFactory.java Wed Aug 1 18:28:07 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()); + } + } + } + } }
