You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by em...@apache.org on 2006/12/21 08:36:06 UTC

svn commit: r489274 - in /incubator/cxf/trunk/tools2/wsdlto: core/src/main/java/org/apache/cxf/tools/wsdlto/ core/src/main/java/org/apache/cxf/tools/wsdlto/core/ frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/ fron...

Author: ema
Date: Wed Dec 20 23:36:05 2006
New Revision: 489274

URL: http://svn.apache.org/viewvc?view=rev&rev=489274
Log:
[CXF-306] Added JAXWSDefinitionBuilder and CustomizationParser for tools2

Added:
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBinding.java   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingSerializer.java   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSParameter.java   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/WSDLExtensionRegister.java   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml   (with props)
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl   (with props)
Modified:
    incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractWSDLBuilder.java
    incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSProfileTest.java
    incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java

Modified: incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?view=diff&rev=489274&r1=489273&r2=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java (original)
+++ incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java Wed Dec 20 23:36:05 2006
@@ -19,14 +19,18 @@
 
 package org.apache.cxf.tools.wsdlto;
 
-import java.io.*;
-import java.util.*;
+import java.io.File;
+import java.io.InputStream;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Properties;
+import java.util.Set;
+
 import javax.wsdl.Definition;
 
 import org.apache.cxf.Bus;
 import org.apache.cxf.BusFactoryHelper;
 import org.apache.cxf.common.i18n.Message;
-//import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.AbstractCXFToolContainer;
 import org.apache.cxf.tools.common.Processor;
 import org.apache.cxf.tools.common.ToolConstants;
@@ -88,7 +92,7 @@
                     
                     if (context.optionSet(ToolConstants.CFG_BINDING)) {
                         builder.setContext(context);
-                        builder.customize(definition);
+                        builder.customize();
                     }
                     WSDLServiceBuilder serviceBuilder = new WSDLServiceBuilder(getBus());
                     //services = 

Modified: incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractWSDLBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractWSDLBuilder.java?view=diff&rev=489274&r1=489273&r2=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractWSDLBuilder.java (original)
+++ incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/AbstractWSDLBuilder.java Wed Dec 20 23:36:05 2006
@@ -29,5 +29,5 @@
         this.context = c;
     }
     
-    public abstract void customize(T t);
+    public abstract void customize();
 }

Modified: incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java?view=diff&rev=489274&r1=489273&r2=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java (original)
+++ incubator/cxf/trunk/tools2/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/core/PluginLoader.java Wed Dec 20 23:36:05 2006
@@ -246,6 +246,7 @@
         AbstractWSDLBuilder builder = null;
         try {
             builder = (AbstractWSDLBuilder) Class.forName(fullClzName).newInstance();
+            
         } catch (Exception e) {
             LOG.log(Level.SEVERE, "LOAD_PROCESSOR_FAILED", fullClzName);
             Message msg = new Message("LOAD_PROCESSOR_FAILED", LOG, fullClzName);

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java Wed Dec 20 23:36:05 2006
@@ -0,0 +1,526 @@
+/**
+ * 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.tools.wsdlto.frontend.jaxws.customiztion;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.logging.Logger;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.PortType;
+import javax.wsdl.WSDLException;
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.FactoryConfigurationError;
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpressionException;
+import javax.xml.xpath.XPathFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.xml.sax.ErrorHandler;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+import org.xml.sax.SAXParseException;
+
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.StringUtils;
+import org.apache.cxf.helpers.DOMUtils;
+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.util.ProcessorUtil;
+import org.apache.cxf.tools.util.StAXUtil;
+
+public final class CustomizationParser {
+    // For WSDL1.1
+    private static final Logger LOG = LogUtils.getL7dLogger(CustomizationParser.class);
+    private static final XPathFactory XPF = XPathFactory.newInstance();
+    private static CustomizationParser parser;
+
+    private final XPath xpath = XPF.newXPath();
+
+    private ToolContext env;
+    private final Map<URI, Element> jaxwsBindings = new HashMap<URI, Element>();
+    private final Set<InputSource> jaxbBindings = new HashSet<InputSource>();
+    private final Map<String, JAXWSBinding> definitionBindingMap = new HashMap<String, JAXWSBinding>();
+    private final Map<QName, JAXWSBinding> portTypeBindingMap = new HashMap<QName, JAXWSBinding>();
+    private final Map<QName, JAXWSBinding> opertaionBindingMap = new HashMap<QName, JAXWSBinding>();
+    private final Map<QName, JAXWSBinding> partBindingMap = new HashMap<QName, JAXWSBinding>();
+
+    private Definition definition;
+
+    private Element handlerChains;
+    private Element wsdlNode;;
+
+    private CustomizationParser() {
+
+    }
+
+    public static CustomizationParser getInstance() {
+        if (parser == null) {
+            parser = new CustomizationParser();
+            parser.clean();
+        }
+        return parser;
+    }
+
+    public void clean() {
+        definitionBindingMap.clear();
+        portTypeBindingMap.clear();
+        opertaionBindingMap.clear();
+        partBindingMap.clear();
+        jaxwsBindings.clear();
+        jaxbBindings.clear();
+    }
+
+    public Element getHandlerChains() {
+        return this.handlerChains;
+    }
+
+    public void parse(ToolContext pe) {
+        this.env = pe;
+        String[] bindingFiles;
+        try {
+            bindingFiles = (String[])env.get(ToolConstants.CFG_BINDING);
+        } catch (ClassCastException e) {
+            bindingFiles = new String[1];
+            bindingFiles[0] = (String)env.get(ToolConstants.CFG_BINDING);
+        }
+
+        for (int i = 0; i < bindingFiles.length; i++) {
+            try {
+                addBinding(bindingFiles[i]);
+            } catch (XMLStreamException xse) {
+                Message msg = new Message("STAX_PASER_ERROR", LOG);
+                throw new ToolException(msg, xse);
+            }
+        }
+
+        for (URI wsdlUri : jaxwsBindings.keySet()) {
+            Element element = jaxwsBindings.get(wsdlUri);
+            definition = getWSDlDefinition(wsdlUri.toString());
+            wsdlNode = getTargetNode(wsdlUri);
+            buildTargetNodeMap(element, "");
+        }
+
+        buildHandlerChains();
+    }
+
+    public Element getTargetNode(URI wsdlLoc) {
+        Document doc = null;
+        try {
+            File file = new File(wsdlLoc);
+            java.io.InputStream ins = new java.io.FileInputStream(file);
+            doc = DOMUtils.readXml(ins);
+        } catch (SAXException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (IOException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        } catch (ParserConfigurationException e) {
+            // TODO Auto-generated catch block
+            e.printStackTrace();
+        }
+
+        if (doc != null) {
+            return doc.getDocumentElement();
+        }
+        return null;
+    }
+
+    private void buildHandlerChains() {
+        /*
+         * for (Element jaxwsBinding : jaxwsBindings) { NodeList nl =
+         * jaxwsBinding.getElementsByTagNameNS(ToolConstants.HANDLER_CHAINS_URI,
+         * ToolConstants.HANDLER_CHAINS); if (nl.getLength() == 0) { continue; } //
+         * take the first one, anyway its 1 handler-config per customization
+         * this.handlerChains = (Element)nl.item(0); return; }
+         */
+    }
+
+    private void buildTargetNodeMap(Element bindings, String expression) {
+        if (bindings.getAttributeNode("wsdlLocation") != null) {
+            expression = "/";
+        }
+
+        JAXWSBindingParser bindingsParser = new JAXWSBindingParser(definition.getExtensionRegistry());
+
+        if (isGlobaleBindings(bindings)) {
+
+            try {
+                JAXWSBinding jaxwsBinding = bindingsParser.parse(Definition.class, bindings, definition
+                    .getTargetNamespace());
+                if (definitionBindingMap.containsKey(definition.getTargetNamespace())) {
+                    JAXWSBinding binding = definitionBindingMap.get(definition.getTargetNamespace());
+                    mergeJaxwsBinding(binding, jaxwsBinding);
+                } else {
+                    definitionBindingMap.put(definition.getTargetNamespace(), jaxwsBinding);
+                }
+
+            } catch (WSDLException e) {
+                // TODO Auto-generated catch block
+                e.printStackTrace();
+            }
+
+        }
+
+        if (isJAXWSParameter(bindings) && bindings.getAttribute("part") != null) {
+            String partExpression = "//" + bindings.getAttribute("part");
+            try {
+                Node node = evaluateBindingsNode(partExpression);
+
+                if ("part".equals(node.getLocalName())) {
+                    JAXWSBinding jaxwsBinding = bindingsParser.parse(PortType.class, bindings,
+                                                                     getTargetNamspace(node));
+                    addJAXWSBindingMap(partBindingMap, node, jaxwsBinding);
+
+                }
+            } catch (WSDLException we) {
+                Message msg = new Message("PARSE_BINDINGFILE_EXCEPTION", LOG);
+                throw new ToolException(msg, we);
+            }
+        }
+
+        if (isJAXWSBindings(bindings) && bindings.getAttributeNode("node") != null) {
+
+            expression = expression + "/" + bindings.getAttribute("node");
+            try {
+                Node node = evaluateBindingsNode(expression);
+
+                if ("portType".equals(node.getLocalName())) {
+                    JAXWSBinding jaxwsBinding = bindingsParser.parse(PortType.class, bindings,
+                                                                     getTargetNamspace(node));
+                    addJAXWSBindingMap(portTypeBindingMap, node, jaxwsBinding);
+                }
+
+                if ("operation".equals(node.getLocalName())) {
+                    JAXWSBinding jaxwsBinding = bindingsParser.parse(Operation.class, bindings,
+                                                                     getTargetNamspace(node));
+                    addJAXWSBindingMap(opertaionBindingMap, node, jaxwsBinding);
+                }
+
+            } catch (WSDLException we) {
+                Message msg = new Message("PARSE_BINDINGFILE_EXCEPTION", LOG);
+                throw new ToolException(msg, we);
+            }
+        }
+
+        Element[] children = getChildElements(bindings, ToolConstants.NS_JAXWS_BINDINGS);
+        for (int i = 0; i < children.length; i++) {
+            buildTargetNodeMap(children[i], expression);
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    public Definition getWSDlDefinition(String baseUrl) {
+        Definition def = (Definition)env.get(ToolConstants.WSDL_DEFINITION);
+        if (def.getDocumentBaseURI().equals(baseUrl)) {
+            return def;
+        }
+        List<Definition> defs = (List<Definition>)env.get(ToolConstants.IMPORTED_DEFINITION);
+        for (Definition arg : defs) {
+            if (arg.getDocumentBaseURI().equals(baseUrl)) {
+                return arg;
+            }
+        }
+        return null;
+    }
+
+    private boolean isGlobaleBindings(Element binding) {
+
+        boolean globleNode = binding.getNamespaceURI().equals(ToolConstants.NS_JAXWS_BINDINGS)
+                             && binding.getLocalName().equals("package")
+                             || binding.getLocalName().equals("enableAsyncMapping")
+                             || binding.getLocalName().equals("enableAdditionalSOAPHeaderMapping")
+                             || binding.getLocalName().equals("enableWrapperStyle")
+                             || binding.getLocalName().equals("enableMIMEContent");
+        Node parentNode = binding.getParentNode();
+        if (parentNode instanceof Element) {
+            Element ele = (Element)parentNode;
+            if (ele.getAttributeNode("wsdlLocation") != null && globleNode) {
+                return true;
+            }
+
+        }
+        return false;
+
+    }
+
+    private boolean isJAXWSParameter(Element binding) {
+        boolean parameterNode = ToolConstants.NS_JAXWS_BINDINGS.equals(binding.getNamespaceURI())
+                                && "parameter".equals(binding.getLocalName());
+        Node parentNode = binding.getParentNode();
+        if (parentNode instanceof Element) {
+            Element ele = (Element)parentNode;
+            if (parameterNode && ele.getAttributeNode("node") != null
+                && ele.getAttribute("node").indexOf("portType") > -1) {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private Element[] getChildElements(Element parent, String nsUri) {
+        List<Element> a = new ArrayList<Element>();
+        NodeList children = parent.getChildNodes();
+        for (int i = 0; i < children.getLength(); i++) {
+            Node item = children.item(i);
+            if (!(item instanceof Element)) {
+                continue;
+            }
+            if (nsUri.equals(item.getNamespaceURI())) {
+                a.add((Element)item);
+            }
+        }
+        return (Element[])a.toArray(new Element[a.size()]);
+    }
+
+    private void addBinding(String bindingFile) throws XMLStreamException {
+        String bindingLocation = ProcessorUtil.absolutize(ProcessorUtil.getFileOrURLName(bindingFile));
+
+        InputSource is = new InputSource(bindingLocation);
+        XMLStreamReader reader = StAXUtil.createFreshXMLStreamReader(is);
+
+        StAXUtil.toStartTag(reader);
+
+        if (isValidJaxwsBindingFile(bindingFile, reader)) {
+            Element root = parse(is);
+            String wsdlLocation = root.getAttribute("wsdlLocation");
+            URI wsdlURI = null;
+            try {
+                wsdlURI = new URI(wsdlLocation);
+            } catch (URISyntaxException e) {
+                Message msg = new Message("JAXWSBINDINGS_WSDLLOC_ERROR", LOG, new Object[] {wsdlLocation});
+                throw new ToolException(msg);
+            }
+
+            if (!wsdlURI.isAbsolute()) {
+                try {
+                    URI baseURI = new URI(bindingLocation);
+                    wsdlURI = baseURI.resolve(wsdlURI);
+                } catch (URISyntaxException e) {
+                    // ignore
+                }
+
+            }
+
+            if (getWSDlDefinition(wsdlURI.toString()) != null) {
+                jaxwsBindings.put(wsdlURI, root);
+            } else {
+                String wsdl = (String)env.get(ToolConstants.CFG_WSDLURL);
+                Message msg = new Message("NOT_POINTTO_URL", LOG, new Object[] {bindingLocation, wsdl});
+                throw new ToolException(msg);
+            }
+
+        } else if (isValidJaxbBindingFile(reader)) {
+            jaxbBindings.add(is);
+        } else {
+            Message msg = new Message("UNKNOWN_BINDING_FILE", LOG, bindingFile);
+            throw new ToolException(msg);
+        }
+    }
+
+    private boolean isValidJaxbBindingFile(XMLStreamReader reader) {
+        if (ToolConstants.JAXB_BINDINGS.equals(reader.getName())) {
+            return true;
+        }
+        return false;
+    }
+
+    private boolean isValidJaxwsBindingFile(String bindingLocation, XMLStreamReader reader) {
+        if (ToolConstants.JAXWS_BINDINGS.equals(reader.getName())) {
+            String wsdlLocation = reader.getAttributeValue(null, "wsdlLocation");
+            if (!StringUtils.isEmpty(wsdlLocation)) {
+                return true;
+            }
+        }
+        return false;
+
+    }
+
+    private Element parse(InputSource source) {
+        try {
+            DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
+            builderFactory.setNamespaceAware(true);
+            builderFactory.setValidating(false);
+            DocumentBuilder builder = builderFactory.newDocumentBuilder();
+            builder.setErrorHandler(new ErrorHandler() {
+                public void error(SAXParseException e) throws SAXParseException {
+                    throw e;
+                }
+
+                public void fatalError(SAXParseException e) throws SAXParseException {
+                    throw e;
+                }
+
+                public void warning(SAXParseException err) throws SAXParseException {
+                    // do nothing
+                }
+            });
+
+            // builder.setEntityResolver(new NullEntityResolver());
+            return builder.parse(source).getDocumentElement();
+        } catch (ParserConfigurationException e) {
+            throw new ToolException("parsing.parserConfigException", e);
+        } catch (FactoryConfigurationError e) {
+            throw new ToolException("parsing.factoryConfigException", e);
+        } catch (SAXException e) {
+            throw new ToolException("parsing.saxException", e);
+        } catch (IOException e) {
+            throw new ToolException("parsing.saxException", e);
+        }
+    }
+
+    private Node evaluateBindingsNode(String expression) throws WSDLException {
+        Node node = evaluateXPathNode(wsdlNode, expression, new javax.xml.namespace.NamespaceContext() {
+            public String getNamespaceURI(String prefix) {
+                return definition.getNamespace(prefix);
+            }
+
+            public String getPrefix(String nsURI) {
+                throw new UnsupportedOperationException();
+            }
+
+            public Iterator getPrefixes(String namespaceURI) {
+                throw new UnsupportedOperationException();
+            }
+        });
+        return node;
+    }
+
+    private Node evaluateXPathNode(Node target, String expression, NamespaceContext namespaceContext) {
+        NodeList nlst;
+        try {
+            xpath.setNamespaceContext(namespaceContext);
+            nlst = (NodeList)xpath.evaluate(expression, target, XPathConstants.NODESET);
+        } catch (XPathExpressionException e) {
+            e.printStackTrace();
+            return null; // abort processing this <jaxb:bindings>
+        }
+
+        if (nlst.getLength() == 0) {
+            // error("internalizer.XPathEvaluatesToNoTarget", new
+            // Object[]{expression});
+            return null; // abort
+        }
+
+        if (nlst.getLength() != 1) {
+            // error("internalizer.XPathEvaulatesToTooManyTargets", new
+            // Object[]{expression, nlst.getLength()});
+            return null; // abort
+        }
+
+        Node rnode = nlst.item(0);
+        if (!(rnode instanceof Element)) {
+            // error("internalizer.XPathEvaluatesToNonElement", new
+            // Object[]{expression});
+            return null; // abort
+        }
+        return (Element)rnode;
+    }
+
+    private void mergeJaxwsBinding(JAXWSBinding old, JAXWSBinding present) {
+        if (present.isEnableAsyncMapping()) {
+            old.setEnableAsyncMapping(present.isEnableAsyncMapping());
+        }
+        if (present.isEnableMime()) {
+            old.setEnableMime(present.isEnableMime());
+        }
+        if (present.isEnableWrapperStyle()) {
+            old.setEnableWrapperStyle(present.isEnableWrapperStyle());
+        }
+        if (present.getMethodName() != null) {
+            old.setMethodName(present.getMethodName());
+        }
+        if (present.getPackage() != null) {
+            old.setPackage(present.getPackage());
+        }
+        if (present.getJaxwsPara() != null) {
+            old.setJaxwsPara(present.getJaxwsPara());
+        }
+    }
+
+    private void addJAXWSBindingMap(Map<QName, JAXWSBinding> bindingMap, 
+                                    Node node, JAXWSBinding jaxwsBinding) {
+        if (bindingMap.containsKey(getQName(node))) {
+            JAXWSBinding binding = bindingMap.get(getQName(node));
+            mergeJaxwsBinding(binding, jaxwsBinding);
+        } else {
+            bindingMap.put(getQName(node), jaxwsBinding);
+        }
+    }
+
+    private String getTargetNamspace(Node node) {
+        Document doc = ((Element)node).getOwnerDocument();
+        if (!StringUtils.isEmpty(doc.getDocumentElement().getAttribute("targetNamespace"))) {
+            return doc.getDocumentElement().getAttribute("targetNamespace");
+        }
+        return node.getBaseURI();
+    }
+
+    private QName getQName(Node node) {
+        String ns = getTargetNamspace(node);
+        Element ele = (Element)node;
+        return new QName(ns, ele.getAttribute("name"));
+    }
+
+    private boolean isJAXWSBindings(Node bindings) {
+        return ToolConstants.NS_JAXWS_BINDINGS.equals(bindings.getNamespaceURI())
+               && "bindings".equals(bindings.getLocalName());
+    }
+
+    public Map<String, JAXWSBinding> getDefinitionBindingMap() {
+        return this.definitionBindingMap;
+    }
+
+    public Map<QName, JAXWSBinding> getPortTypeBindingMap() {
+        return this.portTypeBindingMap;
+    }
+
+    public Map<QName, JAXWSBinding> getOperationBindingMap() {
+        return this.opertaionBindingMap;
+    }
+
+    public Map<QName, JAXWSBinding> getPartBindingMap() {
+        return this.partBindingMap;
+    }
+
+}

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/CustomizationParser.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBinding.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBinding.java?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBinding.java (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBinding.java Wed Dec 20 23:36:05 2006
@@ -0,0 +1,128 @@
+/**
+ * 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.tools.wsdlto.frontend.jaxws.customiztion;
+
+import java.io.Serializable;
+
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.xml.namespace.QName;
+
+import org.w3c.dom.Element;
+
+public class JAXWSBinding implements ExtensibilityElement, Serializable {
+
+    private boolean enableAsyncMapping;
+
+    private boolean enableMime;
+
+    private Element element;
+    private boolean required;
+    private QName elementType;
+
+    private boolean enableWrapperStyle;
+
+    private String documentBaseURI;
+
+    private String packageName;
+    
+    private String methodName;
+
+    private JAXWSParameter jaxwsPara;
+    
+    public void setDocumentBaseURI(String baseURI) {
+        this.documentBaseURI = baseURI;
+    }
+
+    public String getDocumentBaseURI() {
+        return this.documentBaseURI;
+    }
+
+    public void setElement(Element elem) {
+        this.element = elem;
+    }
+
+    public Element getElement() {
+        return element;
+    }
+
+    public void setRequired(Boolean r) {
+        this.required = r;
+    }
+
+    public Boolean getRequired() {
+        return required;
+    }
+
+    public void setElementType(QName elemType) {
+        this.elementType = elemType;
+    }
+
+    public QName getElementType() {
+        return elementType;
+    }
+
+    public boolean isEnableMime() {
+        return enableMime;
+    }
+
+    public void setEnableMime(boolean enableMime) {
+        this.enableMime = enableMime;
+    }
+
+    public boolean isEnableAsyncMapping() {
+        return this.enableAsyncMapping;
+    }
+
+    public void setEnableAsyncMapping(boolean enableAsync) {
+        this.enableAsyncMapping = enableAsync;
+    }
+
+    public boolean isEnableWrapperStyle() {
+        return enableWrapperStyle;
+    }
+
+    public void setEnableWrapperStyle(boolean pEnableWrapperStyle) {
+        this.enableWrapperStyle = pEnableWrapperStyle;
+    }
+
+    public void setPackage(String pkg) {
+        this.packageName = pkg;
+    }
+
+    public String getPackage() {
+        return this.packageName;
+    }
+
+    public void setJaxwsPara(JAXWSParameter para) {
+        this.jaxwsPara = para;
+    }
+    
+    public JAXWSParameter getJaxwsPara() {
+        return this.jaxwsPara;
+    }
+    
+    public void setMethodName(String name) {
+        methodName = name;
+    }
+    public String getMethodName() {
+        return this.methodName;
+    }
+    
+}

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBinding.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java Wed Dec 20 23:36:05 2006
@@ -0,0 +1,50 @@
+/**
+ * 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.tools.wsdlto.frontend.jaxws.customiztion;
+
+import java.io.*;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.ExtensionDeserializer;
+import javax.wsdl.extensions.ExtensionRegistry;
+import javax.xml.namespace.QName;
+import org.w3c.dom.*;
+
+public class JAXWSBindingDeserializer implements ExtensionDeserializer, Serializable {
+
+    public ExtensibilityElement unmarshall(Class parentType,
+                                           QName elementType,
+                                           Element el,
+                                           Definition def,
+                                           ExtensionRegistry extReg) throws WSDLException {
+        JAXWSBinding jaxwsBinding = (JAXWSBinding)extReg.createExtension(parentType, elementType);
+
+        jaxwsBinding.setElementType(elementType);
+        jaxwsBinding.setElement(el);
+        jaxwsBinding.setDocumentBaseURI(def.getDocumentBaseURI());
+
+        JAXWSBindingParser parser = new JAXWSBindingParser(extReg);
+        parser.parseElement(jaxwsBinding, el);
+        
+        return jaxwsBinding;
+    }
+}

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingDeserializer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java Wed Dec 20 23:36:05 2006
@@ -0,0 +1,140 @@
+/**
+ * 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.tools.wsdlto.frontend.jaxws.customiztion;
+
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensionRegistry;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import org.apache.cxf.tools.common.ToolConstants;
+
+public class JAXWSBindingParser {
+
+    private ExtensionRegistry extReg;
+
+    public JAXWSBindingParser(ExtensionRegistry ext) {
+        extReg = ext;
+    }
+
+    public JAXWSBinding parse(Class parentType, Element element, String namespace) throws WSDLException {
+        JAXWSBinding jaxwsBinding = (JAXWSBinding)extReg.createExtension(parentType,
+                                                                         ToolConstants.JAXWS_BINDINGS);
+
+        jaxwsBinding.setElementType(ToolConstants.JAXWS_BINDINGS);
+        jaxwsBinding.setElement(element);
+        jaxwsBinding.setDocumentBaseURI(namespace);
+        parseElement(jaxwsBinding, element);
+        return jaxwsBinding;
+    }
+
+    public void parseElement(JAXWSBinding jaxwsBinding, Element element) {
+        NodeList children = element.getChildNodes();
+        if (children != null && children.getLength() == 0) {
+            // global binding
+            if (isAsyncElement(element)) {
+                jaxwsBinding.setEnableAsyncMapping(getNodeValue(element));
+            }
+            if (isMIMEElement(element)) {
+                jaxwsBinding.setEnableMime(getNodeValue(element));
+            }
+            if (isPackageElement(element)) {
+                jaxwsBinding.setPackage(getPackageName(element));
+            }
+            if (isJAXWSParameterElement(element)) {
+                JAXWSParameter jpara = new JAXWSParameter();
+                jpara.setName(element.getAttribute("name"));
+                jpara.setElementName(element.getAttribute("childElementName"));
+                jaxwsBinding.setJaxwsPara(jpara);
+            }
+
+        }
+
+        if (children != null && children.getLength() > 0) {
+            // other binding
+            for (int i = 0; i < children.getLength(); i++) {
+                Node child = children.item(i);
+                if (isAsyncElement(child)) {
+                    jaxwsBinding.setEnableAsyncMapping(getNodeValue(child));
+                }
+                if (isMIMEElement(child)) {
+                    jaxwsBinding.setEnableMime(getNodeValue(child));
+                }
+                if (isPackageElement(child)) {
+                    jaxwsBinding.setPackage(getPackageName(child));
+                }
+
+                if (isJAXWSMethodElement(child)) {
+                    jaxwsBinding.setMethodName(getMethodName(child));
+                }
+
+            }
+        }
+
+    }
+
+    private boolean isJAXWSMethodElement(Node node) {
+        return ToolConstants.NS_JAXWS_BINDINGS.equals(node.getNamespaceURI())
+               && "method".equals(node.getLocalName());
+    }
+
+    private String getMethodName(Node node) {
+        Element ele = (Element)node;
+        return ele.getAttribute("name");
+    }
+
+    private boolean isPackageElement(Node node) {
+        if (ToolConstants.NS_JAXWS_BINDINGS.equals(node.getNamespaceURI())
+            && "package".equals(node.getLocalName())) {
+            return true;
+        }
+        return false;
+
+    }
+
+    private boolean isJAXWSParameterElement(Node node) {
+        return (ToolConstants.NS_JAXWS_BINDINGS.equals(node.getNamespaceURI()))
+               && "parameter".equals(node.getLocalName());
+
+    }
+
+    private String getPackageName(Node node) {
+        Element ele = (Element)node;
+        return ele.getAttribute("name");
+    }
+
+    private Boolean isAsyncElement(Node node) {
+        return "enableAsyncMapping".equals(node.getLocalName())
+               && ToolConstants.NS_JAXWS_BINDINGS.equals(node.getNamespaceURI());
+
+    }
+
+    private Boolean getNodeValue(Node node) {
+        return Boolean.valueOf(node.getTextContent());
+    }
+
+    private Boolean isMIMEElement(Node node) {
+        return "enableMIMEContent".equals(node.getLocalName())
+               && ToolConstants.NS_JAXWS_BINDINGS.equals(node.getNamespaceURI());
+    }
+
+}

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingParser.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingSerializer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingSerializer.java?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingSerializer.java (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingSerializer.java Wed Dec 20 23:36:05 2006
@@ -0,0 +1,43 @@
+/**
+ * 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.tools.wsdlto.frontend.jaxws.customiztion;
+
+import java.io.*;
+
+import javax.wsdl.Definition;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.ExtensionRegistry;
+import javax.wsdl.extensions.ExtensionSerializer;
+import javax.xml.namespace.QName;
+
+public class JAXWSBindingSerializer implements ExtensionSerializer, Serializable {
+    public static final long serialVersionUID = 1;
+
+    public void marshall(Class parentType,
+                         QName elementType,
+                         ExtensibilityElement extension,
+                         PrintWriter pw,
+                         Definition def,
+                         ExtensionRegistry extReg)
+        throws WSDLException {
+        // TODO
+    }
+}

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingSerializer.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSBindingSerializer.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSParameter.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSParameter.java?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSParameter.java (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSParameter.java Wed Dec 20 23:36:05 2006
@@ -0,0 +1,41 @@
+/**
+ * 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.tools.wsdlto.frontend.jaxws.customiztion;
+
+public class JAXWSParameter {
+    private String name;
+    private String elementName;
+
+    public void setName(String name) {
+        this.name = name;
+    }
+
+    public String getName() {
+        return name;
+    }
+
+    public void setElementName(String eleName) {
+        this.elementName = eleName;
+    }
+
+    public String getElementName() {
+        return this.elementName;
+    }
+
+}

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSParameter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/JAXWSParameter.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties Wed Dec 20 23:36:05 2006
@@ -0,0 +1,29 @@
+#
+#
+#    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.
+#
+#
+STAX_PASER_ERROR = StAX parser error, check your external binding file(s)
+PARSE_BINDINGFILE_EXCEPTION = Exception while parsing external jaxws binding file(s)
+UNKNOWN_BINDING_FILE= Unknown external binding files : {0}
+NOT_POINTTO_URL = External binding file: {0} does not point to the specified wsdl url:{1}
+CAN_NOT_GET_WSDL_LOCATION = Can not get this wsdl
+JAXWSBINDINGS_WSDLLOC_ERROR = Attribute wsdlLocation value {0} in jaxws binding element is not an uri
+JAXWSBINDINGS_NOT_BIND = JAXWSBidnings do not bind to any wsdl.Check the wsdlLocation attribute in the JAXWSBindings element
+
+ 
\ No newline at end of file

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/WSDLExtensionRegister.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/WSDLExtensionRegister.java?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/WSDLExtensionRegister.java (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/WSDLExtensionRegister.java Wed Dec 20 23:36:05 2006
@@ -0,0 +1,64 @@
+/**
+ * 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.tools.wsdlto.frontend.jaxws.customiztion;
+
+import javax.wsdl.Binding;
+import javax.wsdl.BindingOperation;
+import javax.wsdl.Definition;
+import javax.wsdl.Operation;
+import javax.wsdl.PortType;
+import javax.wsdl.extensions.ExtensionRegistry;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import org.apache.cxf.tools.common.ToolConstants;
+
+public class WSDLExtensionRegister {
+
+    private WSDLFactory wsdlFactory;
+    private WSDLReader wsdlreader;
+
+    public WSDLExtensionRegister(WSDLFactory factory, WSDLReader reader) {
+        wsdlFactory = factory;
+        wsdlreader = reader;
+    }
+
+    public void registerExtensions() {
+        ExtensionRegistry registry = wsdlreader.getExtensionRegistry();
+        if (registry == null) {
+            registry = wsdlFactory.newPopulatedExtensionRegistry();
+        }
+        registerJAXWSBinding(registry, Definition.class);
+        registerJAXWSBinding(registry, PortType.class);
+        registerJAXWSBinding(registry, Operation.class);
+
+        registerJAXWSBinding(registry, Binding.class);
+        registerJAXWSBinding(registry, BindingOperation.class);
+        wsdlreader.setExtensionRegistry(registry);
+    }
+
+    private void registerJAXWSBinding(ExtensionRegistry registry, Class clz) {
+        registry.registerSerializer(clz, ToolConstants.JAXWS_BINDINGS, new JAXWSBindingSerializer());
+
+        registry.registerDeserializer(clz, ToolConstants.JAXWS_BINDINGS, new JAXWSBindingDeserializer());
+        registry.mapExtensionTypes(clz, ToolConstants.JAXWS_BINDINGS, JAXWSBinding.class);
+    }
+
+}

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/WSDLExtensionRegister.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/customiztion/WSDLExtensionRegister.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Modified: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java?view=diff&rev=489274&r1=489273&r2=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java (original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilder.java Wed Dec 20 23:36:05 2006
@@ -19,23 +19,149 @@
 
 package org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11;
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.logging.Logger;
+
+import javax.jws.soap.SOAPBinding;
+import javax.wsdl.Binding;
+import javax.wsdl.BindingOperation;
 import javax.wsdl.Definition;
+import javax.wsdl.Import;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+
+import org.xml.sax.InputSource;
 
-import org.apache.cxf.tools.common.extensions.jaxws.CustomizationParser;
+import org.apache.cxf.common.i18n.Message;
+import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.resource.URIResolver;
+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.util.SOAPBindingUtil;
 import org.apache.cxf.tools.wsdlto.core.AbstractWSDLBuilder;
-import org.apache.cxf.wsdl.WSDLBuilder;
+import org.apache.cxf.tools.wsdlto.frontend.jaxws.customiztion.CustomizationParser;
+import org.apache.cxf.tools.wsdlto.frontend.jaxws.customiztion.WSDLExtensionRegister;
 import org.apache.cxf.wsdl11.WSDLDefinitionBuilder;
+import org.apache.cxf.wsdl4jutils.WSDLResolver;
+
+public class JAXWSDefinitionBuilder extends AbstractWSDLBuilder {
+
+    protected static final Logger LOG = LogUtils.getL7dLogger(WSDLDefinitionBuilder.class);
+    protected WSDLFactory wsdlFactory;
+    protected WSDLReader wsdlReader;
+    protected Definition wsdlDefinition;
+    protected List<Definition> importedDefs = new ArrayList<Definition>();
+    protected CustomizationParser cusParser;
+    
+    public JAXWSDefinitionBuilder() {
+    }
+    
+    public void setContext(ToolContext arg) {
+        context = arg;
+    }
 
-public class JAXWSDefinitionBuilder extends AbstractWSDLBuilder<Definition> {
+    public Definition build() {
+        String wsdlURL = (String)context.get(ToolConstants.CFG_WSDLURL);
+        return build(wsdlURL);
+    }
 
     public Definition build(String wsdlURL) {
-        WSDLBuilder<Definition> builder = new WSDLDefinitionBuilder();
-        return builder.build(wsdlURL);
+        parseWSDL(wsdlURL);
+        context.put(ToolConstants.WSDL_DEFINITION, wsdlDefinition);
+        context.put(ToolConstants.IMPORTED_DEFINITION, this.importedDefs);
+        return wsdlDefinition;
+    }
+
+    public void customize() {
+        cusParser = CustomizationParser.getInstance();
+        cusParser.parse(context);   
+    }
+
+    protected void parseWSDL(String wsdlURL) {
+        try {
+            wsdlFactory = WSDLFactory.newInstance();
+            wsdlReader = wsdlFactory.newWSDLReader();
+            wsdlReader.setFeature("javax.wsdl.verbose", false);
+            // REVISIT: JAXWS/JMS/XML extensions, should be provided by the
+            // WSDLServiceBuilder
+            // Do we need to expose the wsdlReader and wsdlFactory?
+            WSDLExtensionRegister register = new WSDLExtensionRegister(wsdlFactory, wsdlReader);
+            register.registerExtensions();
+            URIResolver resolver = new URIResolver(wsdlURL);
+            InputSource insource = new InputSource(resolver.getInputStream());
+            wsdlURL = resolver.getURI().toString();
+            wsdlDefinition = wsdlReader.readWSDL(new WSDLResolver(wsdlURL, insource));
+            checkSupported(wsdlDefinition);
+            parseImports(wsdlDefinition);
+        } catch (Exception we) {
+            Message msg = new Message("FAIL_TO_CREATE_WSDL_DEFINITION", LOG, wsdlURL);
+            throw new RuntimeException(msg.toString(), we);
+        }
+    }
+
+    @SuppressWarnings("unchecked")
+    private void parseImports(Definition def) {
+        List<Import> importList = new ArrayList<Import>();
+        Map imports = def.getImports();
+        for (Iterator iter = imports.keySet().iterator(); iter.hasNext();) {
+            String uri = (String)iter.next();
+            importList.addAll((List<Import>)imports.get(uri));
+        }
+        for (Import impt : importList) {
+            parseImports(impt.getDefinition());
+            importedDefs.add(impt.getDefinition());
+        }
+    }
+
+    public List<Definition> getImportedDefinition() {
+        return importedDefs;
+    }
+
+    private void checkSupported(Definition def) throws ToolException {
+        if (isRPCEncoded(def)) {
+            org.apache.cxf.common.i18n.Message msg = 
+                new org.apache.cxf.common.i18n.Message("UNSUPPORTED_RPC_ENCODED"
+                                                       , LOG);
+            throw new ToolException(msg);
+        }
+    }
+
+    private boolean isRPCEncoded(Definition def) {
+        Iterator ite1 = def.getBindings().values().iterator();
+        while (ite1.hasNext()) {
+            Binding binding = (Binding)ite1.next();
+            String bindingStyle = SOAPBindingUtil.getBindingStyle(binding);
+
+            Iterator ite2 = binding.getBindingOperations().iterator();
+            while (ite2.hasNext()) {
+                BindingOperation bop = (BindingOperation)ite2.next();
+                String bopStyle = SOAPBindingUtil.getSOAPOperationStyle(bop);
+
+                String outputUse = "";
+                if (SOAPBindingUtil.getBindingOutputSOAPBody(bop) != null) {
+                    outputUse = SOAPBindingUtil.getBindingOutputSOAPBody(bop).getUse();
+                }
+                String inputUse = "";
+                if (SOAPBindingUtil.getBindingInputSOAPBody(bop) != null) {
+                    inputUse = SOAPBindingUtil.getBindingInputSOAPBody(bop).getUse();
+                }
+                if ((SOAPBinding.Style.RPC.name().equalsIgnoreCase(bindingStyle) || SOAPBinding.Style.RPC
+                    .name().equalsIgnoreCase(bopStyle))
+                    && (SOAPBinding.Use.ENCODED.name().equalsIgnoreCase(inputUse) || SOAPBinding.Use.ENCODED
+                        .name().equalsIgnoreCase(outputUse))) {
+                    return true;
+                }
+            }
+
+        }
+        return false;
     }
     
-    public void customize(Definition t) {
-        CustomizationParser customizationParser = CustomizationParser.getInstance();
-        customizationParser.clean();
-        customizationParser.parse(context, t);
+    public CustomizationParser getCustomizationParer() {
+        return cusParser;
     }
 }

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties Wed Dec 20 23:36:05 2006
@@ -0,0 +1,27 @@
+#
+#
+#    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.
+#
+#
+DIRECTORY_NOT_EXIST = Directory : {0} does not exist
+NOT_A_DIRECTORY = {0} is not a directory
+FILE_NOT_EXIST = File does not exist : {0}
+NOT_A_FILE = {0} is not a file
+PARAMETER_MISSING = Required parameter is missing
+
+

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/Messages.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSProfileTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSProfileTest.java?view=diff&rev=489274&r1=489273&r2=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSProfileTest.java (original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSProfileTest.java Wed Dec 20 23:36:05 2006
@@ -19,16 +19,13 @@
 
 package org.apache.cxf.tools.wsdlto.frontend.jaxws;
 
-import java.io.*;
-import java.util.*;
+import java.util.List;
+import java.util.Map;
 
-//import org.apache.cxf.tools.wsdlto.core.FrontEndGenerator;
 import junit.framework.TestCase;
 
 import org.apache.cxf.tools.common.FrontEndGenerator;
 import org.apache.cxf.tools.common.Processor;
-
-
 import org.apache.cxf.tools.plugin.FrontEnd;
 import org.apache.cxf.tools.plugin.Generator;
 import org.apache.cxf.tools.plugin.Plugin;

Modified: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java?view=diff&rev=489274&r1=489273&r2=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java (original)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java Wed Dec 20 23:36:05 2006
@@ -19,11 +19,63 @@
 
 package org.apache.cxf.tools.wsdlto.frontend.jaxws.wsdl11;
 
+import javax.wsdl.Definition;
+import javax.xml.namespace.QName;
+
 import junit.framework.TestCase;
 
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.tools.common.ToolContext;
+import org.apache.cxf.tools.wsdlto.frontend.jaxws.customiztion.CustomizationParser;
+import org.apache.cxf.tools.wsdlto.frontend.jaxws.customiztion.JAXWSBinding;
+
 public class JAXWSDefinitionBuilderTest extends TestCase {
+    private ToolContext env;
+
+    public void setUp() {
+        env = new ToolContext();
+    }
 
     public void testCustomization() {
-        // TODO: to port from tools
-    } 
+        env.put(ToolConstants.CFG_WSDLURL, getClass().getResource("./hello_world.wsdl").toString());
+        env.put(ToolConstants.CFG_BINDING, getClass().getResource("./binding2.xml").toString());
+        JAXWSDefinitionBuilder builder = new JAXWSDefinitionBuilder();
+        builder.setContext(env);
+        Definition def = builder.build((String)env.get(ToolConstants.CFG_WSDLURL));
+        builder.customize();
+
+        CustomizationParser parser = builder.getCustomizationParer();
+
+        JAXWSBinding jaxwsBinding = parser.getDefinitionBindingMap().get(def.getTargetNamespace());
+        assertNotNull("JAXWSBinding for definition is null", jaxwsBinding);
+        assertEquals("Package customiztion for definition is not correct", "com.foo", jaxwsBinding
+            .getPackage());
+
+        
+        QName qn = new QName(def.getTargetNamespace(), "Greeter");
+        jaxwsBinding = parser.getPortTypeBindingMap().get(qn);
+        assertNotNull("JAXWSBinding for PortType is null", jaxwsBinding);
+        assertTrue("AsynMapping customiztion for PortType is not true", 
+                   jaxwsBinding.isEnableAsyncMapping());
+
+        qn = new QName(def.getTargetNamespace(), "greetMeOneWay");
+        jaxwsBinding = parser.getOperationBindingMap().get(qn);
+        
+        assertNotNull("JAXWSBinding for Operation is null", jaxwsBinding);
+        assertEquals("Method name customiztion for operation is not correct", 
+                     "echoMeOneWay", jaxwsBinding.getMethodName());
+
+        qn = new QName(def.getTargetNamespace(), "in");
+        jaxwsBinding = parser.getPartBindingMap().get(qn);
+       
+        assertEquals("Parameter name customiztion for part is not correct", 
+                     "num1", jaxwsBinding.getJaxwsPara().getName());
+
+        // System.out.println("----size ---- " +
+        // parser.getDefinitionBindingMap().size());
+
+        // CustomizationParser cusParser = CustomizationParser.getInstance();
+        // cusParser.parse(env);
+
+    }
 }

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml Wed Dec 20 23:36:05 2006
@@ -0,0 +1,29 @@
+<!--
+  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.
+-->
+<jaxb:bindings version="2.0" schemaLocation="./hello_world.wsdl"
+	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	node="//xsd:element[@name='CreateProcess']/xsd:complexType/xsd:sequence/xsd:element[@name='MyProcess']/xsd:simpleType">
+	<jaxb:typesafeEnumClass name="MyProcess">
+		<jaxb:typesafeEnumMember name="BLUE" value="BLUE" />
+		<jaxb:typesafeEnumMember name="RED" value="RED" />
+		<jaxb:typesafeEnumMember name="GREEN" value="GREEN" />
+	</jaxb:typesafeEnumClass>
+</jaxb:bindings>
+

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml Wed Dec 20 23:36:05 2006
@@ -0,0 +1,46 @@
+<!--
+	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.
+-->
+<jaxws:bindings
+	wsdlLocation="hello_world.wsdl"
+	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
+	xmlns:jaxws="http://java.sun.com/xml/ns/jaxws"
+	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+	<jaxws:package name="com.foo" />
+
+	<jaxws:bindings node="wsdl:portType[@name='Greeter']">
+		<jaxws:enableAsyncMapping>true</jaxws:enableAsyncMapping>
+		<jaxws:parameter part="wsdl:message[@name='greetMeOneWayRequest']/wsdl:part[@name='in']" element="tns:number1" name="num1"/>
+		<jaxws:bindings
+			node="wsdl:operation[@name='greetMeOneWay']">
+			<jaxws:method name="echoMeOneWay" />
+		</jaxws:bindings>
+	</jaxws:bindings>
+
+	<jaxws:bindings node="wsdl:definitions/wsdl:types/xsd:schema">
+		<jaxb:bindings version="2.0"
+			node="xsd:element[@name='CreateProcess']/xsd:complexType/xsd:sequence/xsd:element[@name='MyProcess']/xsd:simpleType">
+			<jaxb:typesafeEnumClass name="MyProcess">
+				<jaxb:typesafeEnumMember name="BLUE" value="BLUE" />
+				<jaxb:typesafeEnumMember name="RED" value="RED" />
+				<jaxb:typesafeEnumMember name="GREEN" value="GREEN" />
+			</jaxb:typesafeEnumClass>
+		</jaxb:bindings>
+	</jaxws:bindings>
+</jaxws:bindings>
\ No newline at end of file

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl?view=auto&rev=489274
==============================================================================
--- incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl (added)
+++ incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl Wed Dec 20 23:36:05 2006
@@ -0,0 +1,81 @@
+<?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.
+-->
+<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
+	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+	xmlns:tns="http://apache.org/hello_world_soap_http"
+	xmlns:x1="http://apache.org/hello_world_soap_http/types"
+	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	targetNamespace="http://apache.org/hello_world_soap_http"
+	name="HelloWorld">
+	<wsdl:types>
+		<schema elementFormDefault="qualified"
+			targetNamespace="http://apache.org/hello_world_soap_http/types"
+			xmlns="http://www.w3.org/2001/XMLSchema">
+			<element name="CreateProcess">
+				<complexType>
+					<sequence>
+						<element name="MyProcess">
+							<simpleType>
+								<restriction base="string">
+									<enumeration value="BLUE" />
+									<enumeration value="RED" />
+									<enumeration value="GREEN" />
+								</restriction>
+							</simpleType>
+						</element>
+					</sequence>
+				</complexType>
+			</element>
+			
+		</schema>
+	</wsdl:types>
+
+	<wsdl:message name="greetMeOneWayRequest">
+		<wsdl:part name="in" element="x1:CreateProcess" />
+	</wsdl:message>
+
+	
+	<wsdl:portType name="Greeter">	
+		<wsdl:operation name="greetMeOneWay">
+			<wsdl:input name="greetMeOneWayRequest"
+				message="tns:greetMeOneWayRequest" />
+		</wsdl:operation>	
+	</wsdl:portType>
+	
+	<wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+		<soap:binding style="document"
+			transport="http://schemas.xmlsoap.org/soap/http" />
+		<wsdl:operation name="greetMeOneWay">
+			<soap:operation style="document" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+		</wsdl:operation>
+	</wsdl:binding>
+	
+	<wsdl:service name="SOAPService">
+		<wsdl:port name="SoapPort"
+			binding="tns:Greeter_SOAPBinding">
+			<soap:address location="http://localhost:9100" />
+		</wsdl:port>		
+	</wsdl:service>
+</wsdl:definitions>
+

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/tools2/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml