You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/02/21 20:08:57 UTC

svn commit: r1073117 [2/2] - in /cxf/trunk: parent/ rt/ rt/databinding/jibx/ rt/databinding/jibx/src/ rt/databinding/jibx/src/main/ rt/databinding/jibx/src/main/java/ rt/databinding/jibx/src/main/java/org/ rt/databinding/jibx/src/main/java/org/apache/ ...

Added: cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java (added)
+++ cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java Mon Feb 21 19:08:55 2011
@@ -0,0 +1,379 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jibx.tools;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.common.xmlschema.SchemaCollection;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.tools.common.ClassUtils;
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.tools.common.ToolContext;
+import org.apache.cxf.tools.common.ToolException;
+import org.apache.cxf.tools.common.model.DefaultValueWriter;
+import org.apache.cxf.tools.util.ClassCollector;
+import org.apache.cxf.tools.wsdlto.core.DataBindingProfile;
+import org.jibx.binding.Compile;
+import org.jibx.binding.Utility;
+import org.jibx.binding.model.BindingElement;
+import org.jibx.binding.model.BindingUtils;
+import org.jibx.binding.model.MappingElement;
+import org.jibx.binding.model.ValueElement;
+import org.jibx.runtime.JiBXException;
+import org.jibx.schema.ISchemaResolver;
+import org.jibx.schema.codegen.CodeGen;
+import org.jibx.schema.codegen.PackageHolder;
+import org.jibx.schema.codegen.PackageOrganizer;
+import org.jibx.schema.codegen.StringObjectPair;
+import org.jibx.schema.codegen.custom.SchemaCustom;
+import org.jibx.schema.codegen.custom.SchemasetCustom;
+import org.jibx.schema.validation.ProblemMultiHandler;
+
+public class JibxToolingDataBinding implements DataBindingProfile {
+
+    private JibxToolingProblemHandler problemHandler = new JibxToolingProblemHandler();
+    private Map<String, Element> schemaMap = new HashMap<String, Element>();
+    private List<ISchemaResolver> resolvers = new ArrayList<ISchemaResolver>();
+
+    private Map<org.jibx.runtime.QName, MappingElement> types = new HashMap<org.jibx.runtime.QName,
+                                                                            MappingElement>();
+    private Map<org.jibx.runtime.QName, MappingElement> elements = new HashMap<org.jibx.runtime.QName,
+                                                                            MappingElement>();
+
+    public DefaultValueWriter createDefaultValueWriter(QName qn, boolean element) {
+        return null;
+    }
+
+    public DefaultValueWriter createDefaultValueWriterForWrappedElement(QName wrapperElement, QName qn) {
+        return null;
+    }
+
+    public void generate(ToolContext context) throws ToolException {
+        try {
+            JiBXCodeGen codegen = new JiBXCodeGen();
+
+            ProblemMultiHandler handler = new ProblemMultiHandler();
+            handler.addHandler(problemHandler);
+            codegen.setProblemHandler(handler);
+
+            // Setting the source (or the output) directory
+            String sourcePath = (String)context.get(ToolConstants.CFG_SOURCEDIR);
+            if (sourcePath == null) {
+                sourcePath = (new File(".")).getAbsolutePath();
+            }
+            File generatePath = new File(sourcePath);
+            if (!generatePath.exists()) {
+                generatePath.mkdir();
+            }
+            codegen.setGeneratePath(generatePath);
+
+            String classPath = (String)context.get(ToolConstants.CFG_CLASSDIR);
+            if (classPath == null) {
+                classPath = (new File(".")).getAbsolutePath();
+            }
+            File compilePath = new File(classPath);
+            if (!compilePath.exists()) {
+                compilePath.mkdir();
+            }
+            codegen.setCompilePath(compilePath);
+
+            // Set schema resolver list
+
+            codegen.setFileset(resolvers);
+
+            // Set Customization
+            String[] bindingFiles = (String[])context.get(ToolConstants.CFG_BINDING);
+            SchemasetCustom customRoot;
+            if (bindingFiles == null || bindingFiles.length == 0) {
+                customRoot = defaultSchemasetCustom(schemaMap);
+            } else {
+                customRoot = SchemasetCustom.loadCustomizations(bindingFiles[0], handler);
+            }
+            // force to retrain types information in the generated binding model
+            forceTypes(customRoot);
+            codegen.setCustomRoot(customRoot);
+
+            codegen.generate();
+
+            if (Boolean.valueOf((String)context.get(ToolConstants.CFG_COMPILE))) {
+                if (context.get(ToolConstants.CFG_SOURCEDIR) == null) {
+                    context.put(ToolConstants.CFG_SOURCEDIR, generatePath.getAbsolutePath());
+                }
+                if (context.get(ToolConstants.CFG_CLASSDIR) == null) {
+                    context.put(ToolConstants.CFG_CLASSDIR, compilePath.getAbsolutePath());
+                }
+
+                ClassCollector collector = new ClassCollector();
+                addGeneratedSourceFiles(codegen.getPackageOrganizer(), collector);
+                context.put(ClassCollector.class, collector);
+
+                // compile generated source files
+                (new ClassUtils()).compile(context);
+
+                // jibx binding compiler
+                codegen.compile();
+            }
+
+            BindingElement rootBinding = codegen.getRootBinding();
+            BindingUtils.getDefinitions(rootBinding, types, elements, null);
+
+        } catch (Exception e) {
+            problemHandler.handleSevere("", e);
+        }
+    }
+
+    public String getType(QName qn, boolean element) {
+        MappingElement mappingElement = element ? elements.get(jibxQName(qn)) : types.get(jibxQName(qn));
+        return (mappingElement == null) ? null : mappingElement.getClassName();
+    }
+
+    public String getWrappedElementType(QName wrapperElement, QName item) {
+        MappingElement mappingElement = elements.get(jibxQName(wrapperElement));
+        return (mappingElement == null) ? null : itemType(mappingElement, item);
+    }
+
+    public void initialize(ToolContext context) throws ToolException {
+        String wsdlUrl = (String)context.get(ToolConstants.CFG_WSDLURL);
+        initializeJiBXCodeGenerator(wsdlUrl);
+    }
+
+    private void initializeJiBXCodeGenerator(String wsdlUrl) {
+        try {
+            loadWsdl(wsdlUrl, this.schemaMap, this.resolvers);
+        } catch (WSDLException e) {
+            problemHandler.handleSevere("Error in loading wsdl file at :" + wsdlUrl, e);
+        }
+    }
+
+    private static void loadWsdl(String wsdlUrl, Map<String, Element> schemaMap,
+                                 List<ISchemaResolver> resolvers) throws WSDLException {
+        WSDLFactory factory = WSDLFactory.newInstance();
+        WSDLReader reader = factory.newWSDLReader();
+        Definition parentDef = reader.readWSDL(wsdlUrl);
+
+        JibxSchemaHelper util = new JibxSchemaHelper(BusFactory.getDefaultBus(), schemaMap);
+        util.getSchemas(parentDef, new SchemaCollection(), resolvers);
+    }
+
+    private static org.jibx.runtime.QName jibxQName(QName qname) {
+        return new org.jibx.runtime.QName(qname.getNamespaceURI(), qname.getLocalPart());
+    }
+
+    private static String itemType(MappingElement mappingElement, QName qName) {
+        String localPart = qName.getLocalPart();
+        for (Iterator childIterator = mappingElement.childIterator(); childIterator.hasNext();) {
+            Object child = childIterator.next();
+            if (child instanceof ValueElement) {
+                ValueElement valueElement = (ValueElement)child;
+                if (localPart.equals(valueElement.getName())) {
+                    return valueElement.getDeclaredType();
+                }
+            }
+            // TODO
+            /*
+             * else if (child instanceof ) { .. } else if () { .. }
+             */
+        }
+        return null;
+    }
+
+    @SuppressWarnings("unchecked")
+    private static SchemasetCustom defaultSchemasetCustom(Map<String, Element> schemaMap) {
+        SchemasetCustom customRoot = new SchemasetCustom((SchemasetCustom)null);
+        Set<String> schemaIds = schemaMap.keySet();
+        for (String schemaId : schemaIds) {
+            SchemaCustom schemaCustom = new SchemaCustom(customRoot);
+            schemaCustom.setName(schemaId);
+            customRoot.getChildren().add(schemaCustom);
+        }
+        return customRoot;
+    }
+
+    private static void forceTypes(SchemasetCustom customRoot) {
+        List<?> children = customRoot.getChildren();
+        for (Object child : children) {
+            SchemaCustom schemaCustom = (SchemaCustom)child;
+            schemaCustom.setForceTypes(Boolean.TRUE);
+            // TODO setForceType recursively ??
+        }
+    }
+
+    private static void addGeneratedSourceFiles(PackageOrganizer o, ClassCollector collector) {
+        List<PackageHolder> packages = CastUtils.cast(o.getPackages());
+        for (PackageHolder pkgHolder : packages) {
+            if (pkgHolder.getTopClassCount() > 0) {
+                String pkgName = pkgHolder.getName();
+                StringObjectPair[] classFields = pkgHolder.getClassFields();
+                for (int i = 0; i < classFields.length; i++) {
+                    String fullname = classFields[i].getKey();
+                    if (fullname.contains("$")) { // CHECK
+                        continue;
+                    }
+                    collector.addTypesClassName(pkgName, fullname.replace(pkgName, ""), fullname);
+                }
+            }
+        }
+    }
+
+    /**
+     * A helper class to manage JiBX specific code generation parameters and initiate code generation. Every
+     * member variable is a parameter for JiBX code generator and carries a default value in case it is not
+     * set by CXF code generator framework.
+     */
+    static class JiBXCodeGen {
+        private ProblemMultiHandler problemHandler;
+        private SchemasetCustom customRoot;
+        private URL schemaRoot;
+        private File generatePath;
+        private boolean verbose;
+        private String usingNamespace;
+        private String nonamespacePackage;
+        private String bindingName = "binding";
+        private List fileset;
+        private List includePaths = new ArrayList();
+        private File modelFile;
+        private BindingElement rootBinding;
+        private File compilePath;
+        private PackageOrganizer packageOrganizer;
+
+        public void setProblemHandler(ProblemMultiHandler problemHandler) {
+            this.problemHandler = problemHandler;
+        }
+
+        public void setCustomRoot(SchemasetCustom customRoot) {
+            this.customRoot = customRoot;
+        }
+
+        public void setSchemaRoot(URL schemaRoot) {
+            this.schemaRoot = schemaRoot;
+        }
+
+        public void setGeneratePath(File generatePath) {
+            this.generatePath = generatePath;
+        }
+
+        public void setVerbose(boolean verbose) {
+            this.verbose = verbose;
+        }
+
+        public void setUsingNamespace(String usingNamespace) {
+            this.usingNamespace = usingNamespace;
+        }
+
+        public void setNonamespacePackage(String nonamespacePackage) {
+            this.nonamespacePackage = nonamespacePackage;
+        }
+
+        public void setBindingName(String bindingName) {
+            this.bindingName = bindingName;
+        }
+
+        public List getFileset() {
+            return fileset;
+        }
+
+        public void setFileset(List fileset) {
+            this.fileset = fileset;
+        }
+
+        public void setIncludePaths(List includePaths) {
+            this.includePaths = includePaths;
+        }
+
+        public void setModelFile(File modelFile) {
+            this.modelFile = modelFile;
+        }
+
+        /**
+         * Returns the {@link BindingElement} instance that contains binding information of generated code.
+         * Hence it is <strong>only meaningful<strong> after executing {@link #generate()} method.
+         * 
+         * @return the binding element instance that contains binding info of generated code
+         */
+        public BindingElement getRootBinding() {
+            return rootBinding;
+        }
+
+        public PackageOrganizer getPackageOrganizer() {
+            return packageOrganizer;
+        }
+
+        public void setCompilePath(File compilePath) {
+            this.compilePath = compilePath;
+        }
+
+        /**
+         * Generates code based on parameters set. Once the code is generated {@link #rootBinding} is set
+         * which can be retrieved by {@link #getRootBinding()}
+         * 
+         * @throws JiBXException if thrown by JiBX code generator
+         * @throws IOException if thrown by JiBX code generator
+         */
+        public void generate() throws JiBXException, IOException {
+            CodeGen codegen = new CodeGen(customRoot, schemaRoot, generatePath);
+            codegen.generate(verbose, usingNamespace, nonamespacePackage, bindingName, fileset, includePaths,
+                             modelFile, problemHandler);
+            setPostGenerateInfo(codegen);
+        }
+
+        public void compile() throws JiBXException {
+            Compile compiler = new Compile();
+            String path = generatePath.getAbsolutePath();
+            if (!path.endsWith(File.separator)) {
+                path = path + File.separator;
+            }
+
+            List<String> clsPath = new ArrayList<String>();
+            clsPath.add(compilePath.getAbsolutePath());
+            clsPath.addAll(Arrays.asList(Utility.getClassPaths()));
+
+            String[] clsPathSet = clsPath.toArray(new String[clsPath.size()]);
+            String[] bindingSet = new String[] {
+                path + bindingName + ".xml"
+            };
+
+            compiler.compile(clsPathSet, bindingSet);
+        }
+
+        private void setPostGenerateInfo(CodeGen codegen) {
+            this.rootBinding = codegen.getRootBinding();
+            this.packageOrganizer = codegen.getPackageDirectory();
+        }
+
+    }
+}

Propchange: cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingDataBinding.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingProblemHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingProblemHandler.java?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingProblemHandler.java (added)
+++ cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingProblemHandler.java Mon Feb 21 19:08:55 2011
@@ -0,0 +1,68 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jibx.tools;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.jibx.schema.validation.ProblemHandler;
+import org.jibx.schema.validation.ValidationProblem;
+
+public class JibxToolingProblemHandler implements ProblemHandler {
+
+    // We are using JiBXToolingDataBinding logger
+    private static final Logger LOG = LogUtils.getLogger(JibxToolingDataBinding.class);
+
+    public void handleError(ValidationProblem prob) {
+        LOG.log(Level.SEVERE, prob.getDescription());
+    }
+
+    public void handleFatal(ValidationProblem prob) {
+        LOG.log(Level.SEVERE, prob.getDescription());
+    }
+
+    public void handleUnimplemented(ValidationProblem prob) {
+        LOG.log(Level.INFO, "Unimplemented feature - " + prob.getDescription());
+    }
+
+    public void handleWarning(ValidationProblem prob) {
+        LOG.log(Level.WARNING, prob.getDescription());
+    }
+
+    public void report(String msg) {
+        LOG.log(Level.INFO, msg);
+    }
+
+    public void terminate(String msg) {
+        LOG.log(Level.SEVERE, msg);
+
+    }
+    
+    public void terminate(String msg, Throwable thrown) {
+        LOG.log(Level.SEVERE, msg, thrown);
+    }
+    
+    public void handleSevere(String msg, Throwable thrown) {
+        LOG.log(Level.SEVERE, msg, thrown);
+    }
+
+
+}

Propchange: cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingProblemHandler.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/main/java/org/apache/cxf/jibx/tools/JibxToolingProblemHandler.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/databinding/jibx/src/main/resources/META-INF/tools-plugin.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/main/resources/META-INF/tools-plugin.xml?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/main/resources/META-INF/tools-plugin.xml (added)
+++ cxf/trunk/rt/databinding/jibx/src/main/resources/META-INF/tools-plugin.xml Mon Feb 21 19:08:55 2011
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<plugin name="jibx" version="" provider="cxf.apache.org" xmlns="http://cxf.apache.org/tools/plugin">
+    <databinding name="jibx" package="org.apache.cxf.jibx.tools" profile="JiBXToolingDataBinding"/>
+</plugin>
\ No newline at end of file

Propchange: cxf/trunk/rt/databinding/jibx/src/main/resources/META-INF/tools-plugin.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/main/resources/META-INF/tools-plugin.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/databinding/jibx/src/main/resources/META-INF/tools-plugin.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/AbstractJibxTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/AbstractJibxTest.java?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/AbstractJibxTest.java (added)
+++ cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/AbstractJibxTest.java Mon Feb 21 19:08:55 2011
@@ -0,0 +1,112 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jibx;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Node;
+
+import org.apache.cxf.binding.BindingFactoryManager;
+import org.apache.cxf.binding.soap.SoapBindingFactory;
+import org.apache.cxf.binding.soap.SoapTransportFactory;
+import org.apache.cxf.common.util.SOAPConstants;
+import org.apache.cxf.endpoint.Server;
+import org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory;
+import org.apache.cxf.frontend.ServerFactoryBean;
+import org.apache.cxf.jaxws.JaxWsServerFactoryBean;
+import org.apache.cxf.test.AbstractCXFTest;
+import org.apache.cxf.transport.ConduitInitiatorManager;
+import org.apache.cxf.transport.DestinationFactoryManager;
+import org.apache.cxf.transport.local.LocalTransportFactory;
+import org.apache.cxf.wsdl.WSDLManager;
+import org.apache.cxf.wsdl11.WSDLManagerImpl;
+import org.junit.Before;
+
+public abstract class AbstractJibxTest extends AbstractCXFTest {
+
+    protected LocalTransportFactory localTransport;
+
+    @Before
+    public void setUp() throws Exception {
+        super.setUpBus();
+
+        SoapBindingFactory bindingFactory = new SoapBindingFactory();
+        bindingFactory.setBus(bus);
+
+        bus.getExtension(BindingFactoryManager.class)
+            .registerBindingFactory("http://schemas.xmlsoap.org/wsdl/soap/", bindingFactory);
+
+        DestinationFactoryManager dfm = bus.getExtension(DestinationFactoryManager.class);
+
+        SoapTransportFactory soapDF = new SoapTransportFactory();
+        soapDF.setBus(bus);
+        dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/", soapDF);
+        dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/", soapDF);
+        dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", soapDF);
+
+        localTransport = new LocalTransportFactory();
+        dfm.registerDestinationFactory("http://schemas.xmlsoap.org/soap/http", localTransport);
+        dfm.registerDestinationFactory("http://schemas.xmlsoap.org/wsdl/soap/http", localTransport);
+        dfm.registerDestinationFactory("http://cxf.apache.org/bindings/xformat", localTransport);
+        dfm.registerDestinationFactory("http://cxf.apache.org/transports/local", localTransport);
+
+        ConduitInitiatorManager extension = bus.getExtension(ConduitInitiatorManager.class);
+        extension.registerConduitInitiator(LocalTransportFactory.TRANSPORT_ID, localTransport);
+        extension.registerConduitInitiator("http://schemas.xmlsoap.org/wsdl/soap/", localTransport);
+        extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/http", localTransport);
+        extension.registerConduitInitiator("http://schemas.xmlsoap.org/soap/", localTransport);
+
+        bus.setExtension(new WSDLManagerImpl(), WSDLManager.class);
+
+        addNamespace("wsdl", SOAPConstants.WSDL11_NS);
+        addNamespace("wsdlsoap", SOAPConstants.WSDL11_SOAP_NS);
+        addNamespace("xsd", SOAPConstants.XSD);
+    }
+
+    public Server createService(Class serviceClass, Object serviceBean, String address, QName name) {
+        ServerFactoryBean sf = createServiceFactory(serviceClass, serviceBean, address, name, null);
+        return sf.create();
+    }
+
+    protected ServerFactoryBean createServiceFactory(Class serviceClass, Object serviceBean, String address,
+                                                     QName name, JibxDataBinding binding) {
+        JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean();
+        sf.setServiceClass(serviceClass);
+        if (serviceBean != null) {
+            sf.setServiceBean(serviceBean);
+        }
+        sf.getServiceFactory().setServiceName(name);
+        sf.setAddress("local://" + address);
+        sf.getServiceFactory().setQualifyWrapperSchema(true);
+        setupJibxBinding(sf, binding);
+        return sf;
+    }
+
+    protected void setupJibxBinding(AbstractWSDLBasedEndpointFactory sf, JibxDataBinding binding) {
+        if (binding == null) {
+            binding = new JibxDataBinding();
+        }
+        sf.getServiceFactory().setDataBinding(binding);
+    }
+
+    protected Node invoke(String service, byte[] message) throws Exception {
+        return invoke("local://" + service, LocalTransportFactory.TRANSPORT_ID, message);
+    }
+
+}

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/AbstractJibxTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/AbstractJibxTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesService.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesService.java?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesService.java (added)
+++ cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesService.java Mon Feb 21 19:08:55 2011
@@ -0,0 +1,76 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jibx;
+
+import javax.jws.WebMethod;
+import javax.jws.WebParam;
+import javax.jws.WebService;
+import javax.xml.ws.Holder;
+
+@WebService(targetNamespace = "urn:PrimitiveTypesService")
+public class PrimitiveTypesService {
+
+    @WebMethod
+    public String testInt(int i, @WebParam(mode = WebParam.Mode.OUT) Holder<Integer> i2) {
+        i2.value = i;
+        return "In:" + i;
+    }
+    
+    @WebMethod
+    public String testInteger(Integer i, @WebParam(mode = WebParam.Mode.OUT) Holder<Integer> i2) {
+        i2.value = i;
+        return "In:" + i;
+    }
+
+    @WebMethod
+    public String testFloatPrim(float i, @WebParam(mode = WebParam.Mode.OUT) Holder<Float> i2) {
+        i2.value = i;
+        return "In:" + i;
+    }
+
+    @WebMethod
+    public String testFloat(Float i, @WebParam(mode = WebParam.Mode.OUT) Holder<Float> i2) {
+        i2.value = i;
+        return "In:" + i;
+    }
+
+    @WebMethod
+    public String testBooleanPrim(boolean i, @WebParam(mode = WebParam.Mode.OUT) Holder<Boolean> i2) {
+        i2.value = i;
+        return "In:" + i;
+    }
+
+    @WebMethod
+    public String testBoolean(Boolean i, @WebParam(mode = WebParam.Mode.OUT) Holder<Boolean> i2) {
+        i2.value = i;
+        return "In:" + i;
+    }
+
+    @WebMethod
+    public String testLongPrim(long i, @WebParam(mode = WebParam.Mode.OUT) Holder<Long> i2) {
+        i2.value = i;
+        return "In:" + i;
+    }
+
+    @WebMethod
+    public String testLong(Long i, @WebParam(mode = WebParam.Mode.OUT) Holder<Long> i2) {
+        i2.value = i;
+        return "In:" + i;
+    }
+}

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesTest.java?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesTest.java (added)
+++ cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesTest.java Mon Feb 21 19:08:55 2011
@@ -0,0 +1,78 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.jibx;
+
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Node;
+
+import org.junit.Before;
+import org.junit.Test;
+
+public class PrimitiveTypesTest extends AbstractJibxTest {
+    @Before
+    public void setUp() throws Exception {
+        super.setUp();
+        createService(PrimitiveTypesService.class, new PrimitiveTypesService(), "PrimitiveTypesService",
+                      new QName("urn:PrimitiveTypesService", "PrimitiveTypesService"));
+    }
+
+    @Test
+    public void testInt() throws Exception {
+        doTestType("testInt", "24", "In:24");
+    }
+
+    @Test
+    public void testInteger() throws Exception {
+        doTestType("testInteger", "24", "In:24");
+    }
+
+    @Test
+    public void testFloat() throws Exception {
+        doTestType("testFloat", "3.14", "In:3.14");
+    }
+
+    @Test
+    public void testFloatPrimitive() throws Exception {
+        doTestType("testFloatPrim", "3.14", "In:3.14");
+    }
+
+    @Test
+    public void testBoolean() throws Exception {
+        doTestType("testBoolean", "false", "In:false");
+    }
+
+    @Test
+    public void testBooleanPrimitive() throws Exception {
+        doTestType("testBooleanPrim", "true", "In:true");
+
+    }
+
+    private void doTestType(String operation, String data, String expected) throws Exception {
+        String req = "<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'>" + "<env:Header/>"
+                     + "<env:Body xmlns='urn:PrimitiveTypesService' xmlns:x='http://example.com'>" + "   <"
+                     + operation + ">" + "      <arg0>" + data + "</arg0>" + "   </" + operation + ">"
+                     + "</env:Body>" + "</env:Envelope>";
+        Node nd = invoke("PrimitiveTypesService", req.getBytes());
+        addNamespace("t", "urn:PrimitiveTypesService");
+        assertValid("//t:return[text()='" + expected + "']", nd);
+        assertValid("//t:return1[text()='" + data + "']", nd);
+    }
+
+}

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/org/apache/cxf/jibx/PrimitiveTypesTest.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/rt/databinding/jibx/src/test/java/resources/binding.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/resources/binding.xml?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/test/java/resources/binding.xml (added)
+++ cxf/trunk/rt/databinding/jibx/src/test/java/resources/binding.xml Mon Feb 21 19:08:55 2011
@@ -0,0 +1,14 @@
+<binding xmlns:ns1="http://sosnoski.com/ws/library/types" name="binding" package="com.sosnoski.ws.library.types">
+  <namespace uri="http://sosnoski.com/ws/library/types" default="elements"/>
+  <mapping abstract="true" type-name="ns1:bookInformation" class="com.sosnoski.ws.library.types.BookInformation">
+    <collection field="authorList" usage="optional" create-type="java.util.ArrayList">
+      <value name="string" type="java.lang.String"/>
+    </collection>
+    <value style="element" name="title" field="title" usage="optional"/>
+    <value style="element" name="type" field="type" usage="optional"/>
+    <value style="element" name="isbn" field="isbn" usage="optional"/>
+  </mapping>
+  <mapping class="com.sosnoski.ws.library.types.BookInformation" name="bookInformation">
+    <structure map-as="ns1:bookInformation"/>
+  </mapping>
+</binding>
\ No newline at end of file

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/resources/binding.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/resources/binding.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/resources/binding.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/BookInformation.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/BookInformation.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/BookInformation.class (added) and cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/BookInformation.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access.class (added) and cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access2.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access2.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access2.class (added) and cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access2.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingFactory.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingFactory.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingFactory.class (added) and cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingFactory.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingMungeAdapter.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingMungeAdapter.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingMungeAdapter.class (added) and cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/JiBX_bindingMungeAdapter.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/TypeInformation.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/TypeInformation.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/TypeInformation.class (added) and cxf/trunk/rt/databinding/jibx/src/test/java/resources/com/sosnoski/ws/library/types/TypeInformation.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/java/resources/types.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/java/resources/types.xsd?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/test/java/resources/types.xsd (added)
+++ cxf/trunk/rt/databinding/jibx/src/test/java/resources/types.xsd Mon Feb 21 19:08:55 2011
@@ -0,0 +1,14 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://sosnoski.com/ws/library/types" elementFormDefault="qualified" targetNamespace="http://sosnoski.com/ws/library/types">
+  <xs:complexType name="bookInformation">
+    <xs:annotation>
+      <xs:documentation>Schema fragment(s) for this class: <![CDATA[<pre> &lt;xs:complexType xmlns:ns="http://ws.sosnoski.com/library/types" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="BookInformation"> &lt;xs:sequence> &lt;xs:element type="xs:string" name="author" minOccurs="0" maxOccurs="unbounded"/> &lt;xs:element type="xs:string" name="title"/> &lt;/xs:sequence> &lt;xs:attribute type="xs:string" use="required" name="type"/> &lt;xs:attribute type="xs:string" use="required" name="isbn"/> &lt;/xs:complexType> ]]>/pre></xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element type="xs:string" name="string" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element type="xs:string" name="title" minOccurs="0"/>
+      <xs:element type="xs:string" name="type" minOccurs="0"/>
+      <xs:element type="xs:string" name="isbn" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:element type="tns:bookInformation" name="bookInformation"/>
+</xs:schema>
\ No newline at end of file

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/resources/types.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/resources/types.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/databinding/jibx/src/test/java/resources/types.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/rt/databinding/jibx/src/test/resources/binding.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/resources/binding.xml?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/test/resources/binding.xml (added)
+++ cxf/trunk/rt/databinding/jibx/src/test/resources/binding.xml Mon Feb 21 19:08:55 2011
@@ -0,0 +1,14 @@
+<binding xmlns:ns1="http://sosnoski.com/ws/library/types" name="binding" package="com.sosnoski.ws.library.types">
+  <namespace uri="http://sosnoski.com/ws/library/types" default="elements"/>
+  <mapping abstract="true" type-name="ns1:bookInformation" class="com.sosnoski.ws.library.types.BookInformation">
+    <collection field="authorList" usage="optional" create-type="java.util.ArrayList">
+      <value name="string" type="java.lang.String"/>
+    </collection>
+    <value style="element" name="title" field="title" usage="optional"/>
+    <value style="element" name="type" field="type" usage="optional"/>
+    <value style="element" name="isbn" field="isbn" usage="optional"/>
+  </mapping>
+  <mapping class="com.sosnoski.ws.library.types.BookInformation" name="bookInformation">
+    <structure map-as="ns1:bookInformation"/>
+  </mapping>
+</binding>
\ No newline at end of file

Propchange: cxf/trunk/rt/databinding/jibx/src/test/resources/binding.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/test/resources/binding.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/databinding/jibx/src/test/resources/binding.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/BookInformation.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/BookInformation.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/BookInformation.class (added) and cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/BookInformation.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access.class (added) and cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access2.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access2.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access2.class (added) and cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingBookInformation_access2.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingFactory.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingFactory.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingFactory.class (added) and cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingFactory.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingMungeAdapter.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingMungeAdapter.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingMungeAdapter.class (added) and cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/JiBX_bindingMungeAdapter.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/TypeInformation.class
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/TypeInformation.class?rev=1073117&view=auto
==============================================================================
Files cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/TypeInformation.class (added) and cxf/trunk/rt/databinding/jibx/src/test/resources/com/sosnoski/ws/library/types/TypeInformation.class Mon Feb 21 19:08:55 2011 differ

Added: cxf/trunk/rt/databinding/jibx/src/test/resources/types.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/databinding/jibx/src/test/resources/types.xsd?rev=1073117&view=auto
==============================================================================
--- cxf/trunk/rt/databinding/jibx/src/test/resources/types.xsd (added)
+++ cxf/trunk/rt/databinding/jibx/src/test/resources/types.xsd Mon Feb 21 19:08:55 2011
@@ -0,0 +1,14 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://sosnoski.com/ws/library/types" elementFormDefault="qualified" targetNamespace="http://sosnoski.com/ws/library/types">
+  <xs:complexType name="bookInformation">
+    <xs:annotation>
+      <xs:documentation>Schema fragment(s) for this class: <![CDATA[<pre> &lt;xs:complexType xmlns:ns="http://ws.sosnoski.com/library/types" xmlns:xs="http://www.w3.org/2001/XMLSchema" name="BookInformation"> &lt;xs:sequence> &lt;xs:element type="xs:string" name="author" minOccurs="0" maxOccurs="unbounded"/> &lt;xs:element type="xs:string" name="title"/> &lt;/xs:sequence> &lt;xs:attribute type="xs:string" use="required" name="type"/> &lt;xs:attribute type="xs:string" use="required" name="isbn"/> &lt;/xs:complexType> ]]>/pre></xs:documentation>
+    </xs:annotation>
+    <xs:sequence>
+      <xs:element type="xs:string" name="string" minOccurs="0" maxOccurs="unbounded"/>
+      <xs:element type="xs:string" name="title" minOccurs="0"/>
+      <xs:element type="xs:string" name="type" minOccurs="0"/>
+      <xs:element type="xs:string" name="isbn" minOccurs="0"/>
+    </xs:sequence>
+  </xs:complexType>
+  <xs:element type="tns:bookInformation" name="bookInformation"/>
+</xs:schema>
\ No newline at end of file

Propchange: cxf/trunk/rt/databinding/jibx/src/test/resources/types.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/rt/databinding/jibx/src/test/resources/types.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/rt/databinding/jibx/src/test/resources/types.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: cxf/trunk/rt/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/pom.xml?rev=1073117&r1=1073116&r2=1073117&view=diff
==============================================================================
--- cxf/trunk/rt/pom.xml (original)
+++ cxf/trunk/rt/pom.xml Mon Feb 21 19:08:55 2011
@@ -39,6 +39,7 @@
         <module>databinding/xmlbeans</module>
         <module>databinding/aegis</module>
         <module>databinding/sdo</module>
+        <module>databinding/jibx</module>
         <module>bindings</module>
         <module>frontend/simple</module>
         <module>frontend/jaxws</module>

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java?rev=1073117&r1=1073116&r2=1073117&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java (original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/AbstractHTTPDestination.java Mon Feb 21 19:08:55 2011
@@ -214,10 +214,10 @@ public abstract class AbstractHTTPDestin
         
         DelegatingInputStream in = new DelegatingInputStream(req.getInputStream()) {
             public void cacheInput() {
-                if (!cached) {
-                    //we need to cache the values of the HttpServletRequest
+                if (!cached && inMessage.getExchange().getOutMessage() == null) {
+                    //For one-ways, we need to cache the values of the HttpServletRequest
                     //so they can be queried later for things like paths and schemes 
-                    //and such like that 
+                    //and such like that.                   
                     inMessage.put(HTTP_REQUEST, new HttpServletRequestSnapshot(req));
                 }
                 super.cacheInput();