cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject svn commit: r542728 [1/2] - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/tools/ api/src/main/java/org/apache/cxf/tools/validator/ api/src/main/java/org/apache/cxf/wsdl/ rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl11/ rt/...
Date Wed, 30 May 2007 02:38:56 GMT
Author: mmao
Date: Tue May 29 19:38:51 2007
New Revision: 542728

URL: http://svn.apache.org/viewvc?view=rev&rev=542728
Log:
CXF-658 Tool dependecies on runtime components
* Move xsd(s) from tools/common back to runtime
* Add plugin api to create the wsdl extensibility, to create the binding/addresses which can be added into wsdl model
* Move service validator API, and move the XMLFormat validator to xml binding
* Move testing resources into resources dir
* Remove system.out in tests
* Move some of tools tests which depend on rt to wsdlto/tests, otherwise will have a cycle dependencies



Added:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/AbstractValidator.java
      - copied, changed from r542400, incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractValidator.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/ServiceValidator.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/AbstractWSDLPlugin.java
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLExtensibilityPlugin.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl11/
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl11/SoapAddressPlugin.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/wsdl.plugin.xml
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java
      - copied, changed from r542400, incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/XMLFormatValidator.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/HttpAddressPlugin.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/extensions.xml
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/service.validator.xml
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/wsdl.plugin.xml
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xjb
      - copied, changed from r542101, incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xjb
    incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xsd
      - copied, changed from r542101, incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xsd
    incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/wsdl11/
    incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/wsdl11/JmsTransportPlugin.java
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/extensions.xml
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/wsdl.plugin.xml
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xjb
      - copied, changed from r542101, incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xjb
    incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd
      - copied, changed from r542101, incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xsd
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/binding1.xml
      - copied unchanged from r542452, incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/binding2.xml
      - copied unchanged from r542452, incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/binding3.xml
      - copied unchanged from r542452, incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding3.xml
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/cxf556_binding.xml
      - copied unchanged from r542452, incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/cxf556_binding.xml
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/resources/hello_world.wsdl
      - copied unchanged from r542452, incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/address/
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/address/Address.java
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/address/AddressFactory.java
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/address/JmsAddress.java
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/address/Messages.properties
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/address/SoapAddress.java
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/address/XmlAddress.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/wsdl11/
Removed:
    incubator/cxf/trunk/tools/common/src/main/resources/META-INF/extensions.xml
    incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xjb
    incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xsd
    incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xjb
    incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xsd
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractValidator.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/ServiceValidator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/XMLFormatValidator.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding1.xml
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding2.xml
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/binding3.xml
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/cxf556_binding.xml
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world.wsdl
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/hello_world_xml_bare.wsdl
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/jms_test.wsdl
Modified:
    incubator/cxf/trunk/rt/bindings/xml/pom.xml
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
    incubator/cxf/trunk/rt/transports/jms/pom.xml
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
    incubator/cxf/trunk/tools/common/pom.xml
    incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/util/URIParserUtilTest.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractDefinitionValidator.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
    incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
    incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
    incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java
    incubator/cxf/trunk/tools/wsdlto/misc/pom.xml
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/WSDLToService.java
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.java
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/Messages.properties
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessor.java
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/WSDLToXMLProcessor.java
    incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/wsdl2service.xml
    incubator/cxf/trunk/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToServiceProcessorTest.java
    incubator/cxf/trunk/tools/wsdlto/test/pom.xml
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenBugTest.java
    incubator/cxf/trunk/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSContainerTest.java

Copied: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/AbstractValidator.java (from r542400, incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractValidator.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/AbstractValidator.java?view=diff&rev=542728&p1=incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractValidator.java&r1=542400&p2=incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/AbstractValidator.java&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractValidator.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/AbstractValidator.java Tue May 29 19:38:51 2007
@@ -17,21 +17,17 @@
  * under the License.
  */
 
-package org.apache.cxf.tools.validator.internal;
+package org.apache.cxf.tools.validator;
 
 import java.util.List;
 import java.util.Vector;
 
-import org.apache.cxf.tools.common.ToolContext;
-
 public abstract class AbstractValidator {
     protected List<String> errorMessages = new Vector<String>();
-    protected ToolContext env;
     
     public AbstractValidator() {
-        
     }
-    
+
     public abstract boolean isValid();
 
     public void addErrorMessage(String err) {

Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/ServiceValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/ServiceValidator.java?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/ServiceValidator.java (added)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/tools/validator/ServiceValidator.java Tue May 29 19:38:51 2007
@@ -0,0 +1,34 @@
+/**
+ * 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.validator;
+
+import org.apache.cxf.service.model.ServiceInfo;
+
+public class ServiceValidator extends AbstractValidator {
+    protected ServiceInfo service;
+
+    public void setService(final ServiceInfo s) {
+        this.service = s;
+    }
+    
+    public boolean isValid() {
+        throw new RuntimeException("ServiceValidator.isValid should be extended");
+    }
+}

Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/AbstractWSDLPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/AbstractWSDLPlugin.java?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/AbstractWSDLPlugin.java (added)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/AbstractWSDLPlugin.java Tue May 29 19:38:51 2007
@@ -0,0 +1,55 @@
+/**
+ * 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.wsdl;
+
+import java.util.Map;
+import javax.wsdl.extensions.ExtensionRegistry;
+
+public abstract class AbstractWSDLPlugin implements WSDLExtensibilityPlugin {
+    protected ExtensionRegistry registry;
+
+    public void setExtensionRegistry(final ExtensionRegistry r) {
+        this.registry = r;
+    }
+
+    public ExtensionRegistry getExtenstionRegistry() {
+        return this.registry;
+    }
+
+    public boolean optionSet(final Map<String, Object> args, final String key) {
+        return args.containsKey(key);
+    }
+
+    public String getOption(final Map<String, Object> args, final String key) {
+        return args.get(key).toString();
+    }
+
+    public <T> T getOption(final Map<String, Object> args, final Class<T> clz) {
+        return clz.cast(args.get(clz.getName()));
+    }
+
+    public String getOption(final Map<String, Object> args, final String key, final String defaultValue) {
+        if (!optionSet(args, key)) {
+            return defaultValue;
+        }
+        return getOption(args, key);
+    }
+    
+}

Added: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLExtensibilityPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLExtensibilityPlugin.java?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLExtensibilityPlugin.java (added)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/wsdl/WSDLExtensibilityPlugin.java Tue May 29 19:38:51 2007
@@ -0,0 +1,31 @@
+/**
+ * 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.wsdl;
+
+import java.util.Map;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.ExtensionRegistry;
+
+public interface WSDLExtensibilityPlugin {
+    void setExtensionRegistry(final ExtensionRegistry registry);
+
+    ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException;
+}

Added: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl11/SoapAddressPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl11/SoapAddressPlugin.java?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl11/SoapAddressPlugin.java (added)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/wsdl11/SoapAddressPlugin.java Tue May 29 19:38:51 2007
@@ -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.binding.soap.wsdl11;
+
+import java.util.Map;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.tools.common.extensions.soap.SoapAddress;
+import org.apache.cxf.tools.util.SOAPBindingUtil;
+import org.apache.cxf.wsdl.AbstractWSDLPlugin;
+
+public class SoapAddressPlugin extends AbstractWSDLPlugin {
+
+    public ExtensibilityElement createExtension(Map<String, Object> args) throws WSDLException {
+        SoapAddress soapAddress = null;
+        boolean isSOAP12 = optionSet(args, ToolConstants.CFG_SOAP12);
+
+        soapAddress = SOAPBindingUtil.createSoapAddress(registry, isSOAP12);
+        
+        soapAddress.setLocationURI(getOption(args, ToolConstants.CFG_ADDRESS));
+
+        return soapAddress;
+    }
+}

Added: incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/wsdl.plugin.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/wsdl.plugin.xml?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/wsdl.plugin.xml (added)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/resources/META-INF/wsdl.plugin.xml Tue May 29 19:38:51 2007
@@ -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.
+-->
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+    <entry key="soap-javax.wsdl.Port">org.apache.cxf.binding.soap.wsdl11.SoapAddressPlugin</entry>
+</properties>

Modified: incubator/cxf/trunk/rt/bindings/xml/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/pom.xml?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/pom.xml (original)
+++ incubator/cxf/trunk/rt/bindings/xml/pom.xml Tue May 29 19:38:51 2007
@@ -80,6 +80,38 @@
        
         
     </dependencies>
+
+    <build>
+	<plugins>
+	    <plugin>
+		<groupId>org.apache.cxf</groupId>
+		<artifactId>cxf-common-xsd</artifactId>
+		<version>${project.version}</version>
+		<executions>
+		    <execution>
+			<id>generate-sources</id>
+			<phase>generate-sources</phase>
+			<configuration>
+			    <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+			    <xsdOptions>
+				<xsdOption>
+				    <xsd>${basedir}/src/main/resources/schemas/wsdl/xml-binding.xsd</xsd>
+				    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/xml-binding.xjb</bindingFile>
+				    <deleteDirs>
+					<deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
+				    </deleteDirs>
+				</xsdOption>
+			    </xsdOptions>
+			</configuration>
+			<goals>
+			    <goal>xsdtojava</goal>
+			</goals>
+		    </execution>
+		</executions>
+	    </plugin>
+	</plugins>
+    </build>
+
     <scm>
         <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/bindings/xml</connection>
         <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/cxf/trunk/rt/bindings/xml</developerConnection>

Copied: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java (from r542400, incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/XMLFormatValidator.java)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java?view=diff&rev=542728&p1=incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/XMLFormatValidator.java&r1=542400&p2=incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/validator/XMLFormatValidator.java (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/XMLFormatValidator.java Tue May 29 19:38:51 2007
@@ -17,7 +17,7 @@
  * under the License.
  */
 
-package org.apache.cxf.tools.wsdlto.frontend.jaxws.validator; 
+package org.apache.cxf.binding.xml;
 
 import java.util.Collection;
 import java.util.Iterator;
@@ -33,11 +33,12 @@
 import org.apache.cxf.service.model.OperationInfo;
 import org.apache.cxf.service.model.ServiceInfo;
 import org.apache.cxf.tools.common.WSDLConstants;
-import org.apache.cxf.tools.validator.internal.AbstractValidator;
+import org.apache.cxf.tools.validator.ServiceValidator;
 
-public class XMLFormatValidator extends AbstractValidator {
+public class XMLFormatValidator extends ServiceValidator {
 
-    private ServiceInfo service;
+    public XMLFormatValidator() {
+    }
 
     public XMLFormatValidator(ServiceInfo s) {
         this.service = s;

Added: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/HttpAddressPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/HttpAddressPlugin.java?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/HttpAddressPlugin.java (added)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/HttpAddressPlugin.java Tue May 29 19:38:51 2007
@@ -0,0 +1,44 @@
+/**
+ * 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.binding.xml.wsdl11;
+
+import java.util.Map;
+import javax.wsdl.Port;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.http.HTTPAddress;
+
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.tools.common.WSDLConstants;
+import org.apache.cxf.wsdl.AbstractWSDLPlugin;
+
+public final class HttpAddressPlugin extends AbstractWSDLPlugin {
+
+    public ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException {
+        HTTPAddress xmlHttpAddress = null;
+
+        xmlHttpAddress = (HTTPAddress)registry.createExtension(Port.class,
+                                                               WSDLConstants.NS_XMLHTTP_BINDING_ADDRESS);
+
+        xmlHttpAddress.setLocationURI(getOption(args, ToolConstants.CFG_ADDRESS));
+
+        return xmlHttpAddress;
+    }
+}

Added: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java (added)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlBindingPlugin.java Tue May 29 19:38:51 2007
@@ -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.binding.xml.wsdl11;
+
+import java.util.Map;
+import javax.wsdl.Binding;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+
+import org.apache.cxf.bindings.xformat.XMLFormatBinding;
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.wsdl.AbstractWSDLPlugin;
+
+public final class XmlBindingPlugin extends AbstractWSDLPlugin {
+
+    public ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException {
+        XMLFormatBinding xmlBinding = null;
+
+        xmlBinding = (XMLFormatBinding)registry.createExtension(Binding.class,
+                                                                ToolConstants.XML_BINDING_FORMAT);
+
+        return xmlBinding;
+    }
+}

Added: incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java (added)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/java/org/apache/cxf/binding/xml/wsdl11/XmlIoPlugin.java Tue May 29 19:38:51 2007
@@ -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.binding.xml.wsdl11;
+
+import java.util.Map;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.xml.namespace.QName;
+
+import org.apache.cxf.bindings.xformat.XMLBindingMessageFormat;
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.wsdl.AbstractWSDLPlugin;
+
+public final class XmlIoPlugin extends AbstractWSDLPlugin {
+
+    public ExtensibilityElement createExtension(final Map<String, Object> args) throws WSDLException {
+        XMLBindingMessageFormat xmlFormat = null;
+
+        Class clz = getOption(args, Class.class);
+        QName qname = getOption(args, QName.class);
+
+        xmlFormat = (XMLBindingMessageFormat)registry.createExtension(clz, ToolConstants.XML_FORMAT);
+        xmlFormat.setRootNode(qname);
+        return xmlFormat;
+    }
+}

Added: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/extensions.xml?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/extensions.xml (added)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/extensions.xml Tue May 29 19:38:51 2007
@@ -0,0 +1,26 @@
+<?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.
+-->
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+    <!-- XML Binding -->
+    <entry key="org.apache.cxf.bindings.xml-1">javax.wsdl.BindingInput=org.apache.cxf.bindings.xformat.XMLBindingMessageFormat</entry>
+    <entry key="org.apache.cxf.bindings.xml-2">javax.wsdl.BindingOutput=org.apache.cxf.bindings.xformat.XMLBindingMessageFormat</entry>
+    <entry key="org.apache.cxf.bindings.xml-3">javax.wsdl.Binding=org.apache.cxf.bindings.xformat.XMLFormatBinding</entry>
+</properties>

Added: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/service.validator.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/service.validator.xml?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/service.validator.xml (added)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/service.validator.xml Tue May 29 19:38:51 2007
@@ -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.
+-->
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+    <entry key="XMLFormatValidator">org.apache.cxf.binding.xml.XMLFormatValidator</entry>
+</properties>

Added: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/wsdl.plugin.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/wsdl.plugin.xml?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/wsdl.plugin.xml (added)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/resources/META-INF/wsdl.plugin.xml Tue May 29 19:38:51 2007
@@ -0,0 +1,26 @@
+<?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.
+-->
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+    <entry key="xml-javax.wsdl.Port">org.apache.cxf.binding.xml.wsdl11.HttpAddressPlugin</entry>
+    <entry key="xml-javax.wsdl.Binding">org.apache.cxf.binding.xml.wsdl11.XmlBindingPlugin</entry>
+    <entry key="xml-javax.wsdl.BindingInput">org.apache.cxf.binding.xml.wsdl11.XmlIoPlugin</entry>
+    <entry key="xml-javax.wsdl.BindingOutput">org.apache.cxf.binding.xml.wsdl11.XmlIoPlugin</entry>
+</properties>

Copied: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xjb (from r542101, incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xjb)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xjb?view=diff&rev=542728&p1=incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xjb&r1=542101&p2=incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xjb&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xjb (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xjb Tue May 29 19:38:51 2007
@@ -22,13 +22,13 @@
   xmlns:xs="http://www.w3.org/2001/XMLSchema" 
   xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" 
   jaxb:extensionBindingPrefixes="xjc">
-    <jaxb:bindings schemaLocation="../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema">
+    <jaxb:bindings schemaLocation="../../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema">
         <jaxb:schemaBindings>
             <jaxb:package name="org.apache.cxf.wsdl"/>
         </jaxb:schemaBindings>
         <jaxb:globalBindings generateIsSetMethod="true"/>
     </jaxb:bindings>
-    <jaxb:bindings schemaLocation="../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema/xs:complexType[@name='tExtensibilityElement']">
+    <jaxb:bindings schemaLocation="../../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema/xs:complexType[@name='tExtensibilityElement']">
         <jaxb:class implClass="org.apache.cxf.wsdl.TExtensibilityElementImpl"/>
     </jaxb:bindings>
 </jaxb:bindings>

Copied: incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xsd (from r542101, incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xsd)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xsd?view=diff&rev=542728&p1=incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xsd&r1=542101&p2=incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xsd&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/xml-binding.xsd (original)
+++ incubator/cxf/trunk/rt/bindings/xml/src/main/resources/schemas/wsdl/xml-binding.xsd Tue May 29 19:38:51 2007
@@ -25,7 +25,7 @@
 	xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" jaxb:version="2.0">
 
 	<xs:import namespace="http://schemas.xmlsoap.org/wsdl/"
-		schemaLocation="../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" />
+		schemaLocation="../../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" />
 
 	<xs:complexType name="XMLBindingMessageFormat">
 		<xs:complexContent>

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLDefinitionBuilder.java Tue May 29 19:38:51 2007
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
@@ -29,7 +30,6 @@
 import java.util.StringTokenizer;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-
 import javax.wsdl.Definition;
 import javax.wsdl.Import;
 import javax.wsdl.extensions.ExtensionRegistry;
@@ -41,7 +41,6 @@
 
 import com.ibm.wsdl.extensions.soap.SOAPHeaderImpl;
 import com.ibm.wsdl.extensions.soap.SOAPHeaderSerializer;
-
 import org.apache.cxf.BusException;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
@@ -49,11 +48,13 @@
 import org.apache.cxf.helpers.CastUtils;
 import org.apache.cxf.wsdl.JAXBExtensionHelper;
 import org.apache.cxf.wsdl.WSDLBuilder;
+import org.apache.cxf.wsdl.WSDLExtensibilityPlugin;
 
 public class WSDLDefinitionBuilder implements WSDLBuilder<Definition> {    
     
     protected static final Logger LOG = LogUtils.getL7dLogger(WSDLDefinitionBuilder.class);
     private static final String EXTENSIONS_RESOURCE = "META-INF/extensions.xml";
+    private static final String WSDL_PLUGIN_RESOURCE = "META-INF/wsdl.plugin.xml";
     
     protected WSDLReader wsdlReader;
     protected Definition wsdlDefinition;
@@ -61,6 +62,9 @@
     final ExtensionRegistry registry;    
     private List<Definition> importedDefinitions = new ArrayList<Definition>();
     
+    private final Map<String, WSDLExtensibilityPlugin> wsdlPlugins
+        = new HashMap<String, WSDLExtensibilityPlugin>();
+    
     public WSDLDefinitionBuilder() {    
         try {
             wsdlFactory = WSDLFactory.newInstance();
@@ -82,6 +86,13 @@
             throw new RuntimeException(e);
         }
     }
+
+    public WSDLDefinitionBuilder(boolean requirePlugins) {
+        this();
+        if (requirePlugins) {
+            registerWSDLExtensibilityPlugins();
+        }
+    }
     
     public Definition build(String wsdlURL) {
         parseWSDL(wsdlURL);
@@ -173,5 +184,35 @@
     public WSDLReader getWSDLReader() {
         return wsdlReader;
     }
-    
+
+    public Map<String, WSDLExtensibilityPlugin> getWSDLPlugins() {
+        return wsdlPlugins;
+    }
+
+    private void registerWSDLExtensibilityPlugins() {
+        Properties initialExtensions = null;
+        try {
+            initialExtensions = PropertiesLoaderUtils.loadAllProperties(WSDL_PLUGIN_RESOURCE, Thread
+                            .currentThread().getContextClassLoader());
+        } catch (IOException ex) {
+            throw new RuntimeException(ex);
+        }
+
+        for (Iterator it = initialExtensions.keySet().iterator(); it.hasNext();) {
+            String key = (String) it.next();
+            String pluginClz = initialExtensions.getProperty(key);
+            try {
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.fine("Registering : " + pluginClz + " for type: " + key);
+                }
+
+                WSDLExtensibilityPlugin plugin
+                    = (WSDLExtensibilityPlugin)Class.forName(pluginClz).newInstance();
+                plugin.setExtensionRegistry(registry);
+                wsdlPlugins.put(key, plugin);
+            } catch (Exception ex) {
+                LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex);
+            }
+        }
+    }
 }

Modified: incubator/cxf/trunk/rt/transports/jms/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/pom.xml?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/pom.xml (original)
+++ incubator/cxf/trunk/rt/transports/jms/pom.xml Tue May 29 19:38:51 2007
@@ -105,6 +105,37 @@
 
     </dependencies>
 
+    <build>
+	<plugins>
+	    <plugin>
+		<groupId>org.apache.cxf</groupId>
+		<artifactId>cxf-common-xsd</artifactId>
+		<version>${project.version}</version>
+		<executions>
+		    <execution>
+			<id>generate-sources</id>
+			<phase>generate-sources</phase>
+			<configuration>
+			    <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
+			    <xsdOptions>
+  			      <xsdOption>
+    			        <xsd>${basedir}/src/main/resources/schemas/wsdl/jms.xsd</xsd>
+    			        <bindingFile>${basedir}/src/main/resources/schemas/wsdl/jms.xjb</bindingFile>
+    			        <deleteDirs>
+      			          <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
+    			        </deleteDirs>
+  			      </xsdOption>
+			    </xsdOptions>
+			</configuration>
+			<goals>
+			    <goal>xsdtojava</goal>
+			</goals>
+		    </execution>
+		</executions>
+	    </plugin>
+	</plugins>
+    </build>    
+
     <repositories>
         <repository>
             <id>apache.incubating.releases</id>

Added: incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/wsdl11/JmsTransportPlugin.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/wsdl11/JmsTransportPlugin.java?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/wsdl11/JmsTransportPlugin.java (added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/java/org/apache/cxf/transport/jms/wsdl11/JmsTransportPlugin.java Tue May 29 19:38:51 2007
@@ -0,0 +1,61 @@
+/**
+ * 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.transport.jms.wsdl11;
+
+import java.util.Map;
+import javax.wsdl.Port;
+import javax.wsdl.WSDLException;
+import javax.wsdl.extensions.ExtensibilityElement;
+
+import org.apache.cxf.tools.common.ToolConstants;
+import org.apache.cxf.transport.jms.AddressType;
+import org.apache.cxf.wsdl.AbstractWSDLPlugin;
+
+public class JmsTransportPlugin extends AbstractWSDLPlugin {
+    public ExtensibilityElement createExtension(Map<String, Object> args) throws WSDLException {
+        AddressType jmsAddress = null;
+
+        jmsAddress = (AddressType)registry.createExtension(Port.class, ToolConstants.JMS_ADDRESS);
+        if (optionSet(args, ToolConstants.JMS_ADDR_DEST_STYLE)) {
+            //jmsAddress.setDestinationStyle((String)env.get(ToolConstants.JMS_ADDR_DEST_STYLE));
+        }
+        if (optionSet(args, ToolConstants.JMS_ADDR_INIT_CTX)) {
+            //jmsAddress.setInitialContextFactory((String)env.get(ToolConstants.JMS_ADDR_INIT_CTX));
+        }
+        if (optionSet(args, ToolConstants.JMS_ADDR_JNDI_DEST)) {
+            jmsAddress.setJndiDestinationName(getOption(args, ToolConstants.JMS_ADDR_JNDI_DEST));
+        }
+        if (optionSet(args, ToolConstants.JMS_ADDR_JNDI_FAC)) {
+            jmsAddress.setJndiConnectionFactoryName(getOption(args, ToolConstants.JMS_ADDR_JNDI_FAC));
+        }
+        if (optionSet(args, ToolConstants.JMS_ADDR_JNDI_URL)) {
+            //jmsAddress.setJndiProviderURL((String)env.get(ToolConstants.JMS_ADDR_JNDI_URL));
+        }
+        if (optionSet(args, ToolConstants.JMS_ADDR_MSGID_TO_CORRID)) {
+            //jmsAddress.setUseMessageIDAsCorrelationID(Boolean.getBoolean((String)env
+            //.get(ToolConstants.JMS_ADDR_MSGID_TO_CORRID)));
+        }
+        if (optionSet(args, ToolConstants.JMS_ADDR_SUBSCRIBER_NAME)) {
+            //jmsAddress.setDurableSubscriberName((String)env
+            //  .get(ToolConstants.JMS_ADDR_SUBSCRIBER_NAME));
+        }
+        return jmsAddress;
+    }
+}

Added: incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/extensions.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/extensions.xml?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/extensions.xml (added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/extensions.xml Tue May 29 19:38:51 2007
@@ -0,0 +1,26 @@
+<?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.
+-->
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+    <!-- JMS Transport -->    
+    <entry key="org.apache.cxf.transport.jms-1">javax.wsdl.Port=org.apache.cxf.transport.jms.AddressType</entry>
+    <entry key="org.apache.cxf.transport.jms-2">javax.wsdl.Port=org.apache.cxf.transport.jms.ClientBehaviorPolicyType</entry>
+    <entry key="org.apache.cxf.transport.jms-3">javax.wsdl.Port=org.apache.cxf.transport.jms.ServerBehaviorPolicyType</entry>
+</properties>

Added: incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/wsdl.plugin.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/wsdl.plugin.xml?view=auto&rev=542728
==============================================================================
--- incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/wsdl.plugin.xml (added)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/META-INF/wsdl.plugin.xml Tue May 29 19:38:51 2007
@@ -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.
+-->
+<!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd">
+<properties>
+    <entry key="jms-javax.wsdl.Port">org.apache.cxf.transport.jms.wsdl11.JmsTransportPlugin</entry>
+</properties>

Copied: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xjb (from r542101, incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xjb)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xjb?view=diff&rev=542728&p1=incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xjb&r1=542101&p2=incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xjb&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xjb (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xjb Tue May 29 19:38:51 2007
@@ -22,13 +22,13 @@
   xmlns:xs="http://www.w3.org/2001/XMLSchema" 
   xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc" 
   jaxb:extensionBindingPrefixes="xjc">
-    <jaxb:bindings schemaLocation="../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema">
+    <jaxb:bindings schemaLocation="../../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema">
         <jaxb:schemaBindings>
             <jaxb:package name="org.apache.cxf.wsdl"/>
         </jaxb:schemaBindings>
         <jaxb:globalBindings generateIsSetMethod="true"/>
     </jaxb:bindings>
-    <jaxb:bindings schemaLocation="../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema/xs:complexType[@name='tExtensibilityElement']">
+    <jaxb:bindings schemaLocation="../../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd" node="/xs:schema/xs:complexType[@name='tExtensibilityElement']">
         <jaxb:class implClass="org.apache.cxf.wsdl.TExtensibilityElementImpl"/>
     </jaxb:bindings>
     <jaxb:bindings schemaLocation="jms.xsd" node="/xs:schema">

Copied: incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd (from r542101, incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xsd)
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd?view=diff&rev=542728&p1=incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xsd&r1=542101&p2=incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/common/src/main/resources/schemas/wsdl/jms.xsd (original)
+++ incubator/cxf/trunk/rt/transports/jms/src/main/resources/schemas/wsdl/jms.xsd Tue May 29 19:38:51 2007
@@ -25,7 +25,7 @@
   elementFormDefault="qualified" jaxb:version="2.0">
   
     <xs:import namespace="http://schemas.xmlsoap.org/wsdl/" 
-      schemaLocation="../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd"/>
+      schemaLocation="../../../../../../../../common/schemas/src/main/resources/schemas/wsdl/wsdl.xsd"/>
     
     <!-- Spring elements -->  
     <xs:element name="conduit" type="jms:ConduitType"/>

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/handlers/HandlerInvocationTest.java Tue May 29 19:38:51 2007
@@ -400,9 +400,6 @@
                                      "handler1", "handler1", "handler2"};
 
         List<String> resp = handlerTest.pingWithArgs("handler2 outbound stop");     
-        for (String expected1 : resp) {
-            System.out.println(expected1);
-        }
         assertEquals(expectedHandlers.length, resp.size());
 
         int i = 0;
@@ -864,8 +861,6 @@
                     if (!outbound) {
                         LogicalMessage msg = ctx.getMessage();
                         Source source = msg.getPayload();
-                        System.out.println("dddd " + source);
-                        XMLUtils.writeTo(source, System.out);
                     }
                 } catch (Exception e) {
                     e.printStackTrace();
@@ -884,7 +879,6 @@
                 if (!outbound) {
                     try {
                         SOAPMessage msg = ctx.getMessage();
-                        msg.writeTo(System.out);
                     } catch (Exception e) {
                         e.printStackTrace();
                         fail(e.toString());

Modified: incubator/cxf/trunk/tools/common/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/pom.xml?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/common/pom.xml (original)
+++ incubator/cxf/trunk/tools/common/pom.xml Tue May 29 19:38:51 2007
@@ -116,22 +116,6 @@
 			<configuration>
 			    <sourceRoot>${basedir}/target/generated/src/main/java</sourceRoot>
 			    <xsdOptions>
-      				<xsdOption>
-      				    <xsd>${basedir}/src/main/resources/schemas/wsdl/xml-binding.xsd</xsd>
-      				    <bindingFile>${basedir}/src/main/resources/schemas/wsdl/xml-binding.xjb</bindingFile>
-      				    <deleteDirs>
-            					<deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
-      				    </deleteDirs>
-      				</xsdOption>
-      				
-  			      <xsdOption>
-    			        <xsd>${basedir}/src/main/resources/schemas/wsdl/jms.xsd</xsd>
-    			        <bindingFile>${basedir}/src/main/resources/schemas/wsdl/jms.xjb</bindingFile>
-    			        <deleteDirs>
-      			          <deleteDir>${basedir}/target/generated/src/main/java/org/apache/cxf/wsdl</deleteDir>
-    			        </deleteDirs>
-  			      </xsdOption>
-  			      
   			      <xsdOption>
     			        <xsd>${basedir}/src/main/resources/schemas/wsdl/jbi.xsd</xsd>
     			        <bindingFile>${basedir}/src/main/resources/schemas/wsdl/jbi.xjb</bindingFile>

Modified: incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/util/URIParserUtilTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/util/URIParserUtilTest.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/util/URIParserUtilTest.java (original)
+++ incubator/cxf/trunk/tools/common/src/test/java/org/apache/cxf/tools/util/URIParserUtilTest.java Tue May 29 19:38:51 2007
@@ -61,7 +61,7 @@
         assertTrue(uri2.contains(uri));
         assertTrue(uri2.contains(new java.io.File("").toString()));
 
-        uri = getClass().getResource("/schemas/wsdl/xml-binding.xsd").toString();
+        uri = getClass().getResource("/schemas/wsdl/jbi.xsd").toString();
         uri2 = URIParserUtil.getAbsoluteURI(uri);
         assertNotNull(uri2);
         assertTrue(uri2.startsWith("file"));

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractDefinitionValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractDefinitionValidator.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractDefinitionValidator.java (original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/AbstractDefinitionValidator.java Tue May 29 19:38:51 2007
@@ -22,9 +22,11 @@
 import javax.wsdl.Definition;
 import javax.xml.stream.Location;
 import org.apache.cxf.tools.common.ToolContext;
+import org.apache.cxf.tools.validator.AbstractValidator;
 
 public abstract class AbstractDefinitionValidator extends AbstractValidator {
     protected Definition def;
+    protected ToolContext env;
 
     public AbstractDefinitionValidator() {
         super();

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java (original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDL11Validator.java Tue May 29 19:38:51 2007
@@ -49,6 +49,7 @@
 import org.apache.cxf.tools.common.ToolContext;
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.tools.util.URIParserUtil;
+import org.apache.cxf.tools.validator.AbstractValidator;
 
 public class WSDL11Validator extends AbstractDefinitionValidator {
     protected static final Logger LOG = LogUtils.getL7dLogger(SchemaValidator.class);

Modified: incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java (original)
+++ incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSDLRefValidator.java Tue May 29 19:38:51 2007
@@ -72,7 +72,7 @@
 import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaType;
 
-public class WSDLRefValidator extends AbstractValidator {
+public class WSDLRefValidator extends AbstractDefinitionValidator {
     protected static final Logger LOG = LogUtils.getL7dLogger(WSDLRefValidator.class);
     protected List<XNode> vNodes = new ArrayList<XNode>();
     

Modified: incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/core/src/main/java/org/apache/cxf/tools/wsdlto/WSDLToJavaContainer.java Tue May 29 19:38:51 2007
@@ -30,6 +30,7 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 import javax.wsdl.Definition;
 import javax.xml.namespace.QName;
@@ -40,6 +41,7 @@
 import org.apache.cxf.BusFactory;
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
+import org.apache.cxf.common.util.PropertiesLoaderUtils;
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.service.model.InterfaceInfo;
 import org.apache.cxf.service.model.ServiceInfo;
@@ -58,8 +60,7 @@
 import org.apache.cxf.tools.common.toolspec.parser.ErrorVisitor;
 import org.apache.cxf.tools.util.ClassCollector;
 import org.apache.cxf.tools.util.URIParserUtil;
-import org.apache.cxf.tools.validator.internal.AbstractValidator;
-import org.apache.cxf.tools.validator.internal.ServiceValidator;
+import org.apache.cxf.tools.validator.ServiceValidator;
 import org.apache.cxf.tools.wsdlto.core.AbstractWSDLBuilder;
 import org.apache.cxf.tools.wsdlto.core.DataBindingProfile;
 import org.apache.cxf.tools.wsdlto.core.FrontEndProfile;
@@ -70,6 +71,7 @@
     
     protected static final Logger LOG = LogUtils.getL7dLogger(WSDLToJavaContainer.class);
     private static final String DEFAULT_NS2PACKAGE = "http://www.w3.org/2005/08/addressing";
+    private static final String SERVICE_VALIDATOR = "META-INF/service.validator.xml";
     String toolName;
 
     public WSDLToJavaContainer(String name, ToolSpec toolspec) throws Exception {
@@ -481,13 +483,38 @@
         dataBindingProfile.generate(context);
     }
 
-    public void validate(ServiceInfo service) throws ToolException {
-        ServiceValidator validator = new ServiceValidator();
-        validator.addValidators(getServiceValidators());
-        validator.isValid();
+    public void validate(final ServiceInfo service) throws ToolException {
+        for (ServiceValidator validator : getServiceValidators()) {
+            validator.setService(service);
+            if (!validator.isValid()) {
+                throw new ToolException(validator.getErrorMessage());
+            }
+        }
     }
 
-    public List<AbstractValidator> getServiceValidators() {
-        return new ArrayList<AbstractValidator>();
+    public List<ServiceValidator> getServiceValidators() {
+        List<ServiceValidator> validators = new ArrayList<ServiceValidator>();
+        
+        Properties initialExtensions = null;
+        try {
+            initialExtensions = PropertiesLoaderUtils.loadAllProperties(SERVICE_VALIDATOR, Thread
+                            .currentThread().getContextClassLoader());
+        } catch (IOException ex) {
+            throw new RuntimeException(ex);
+        }
+
+        for (Iterator it = initialExtensions.values().iterator(); it.hasNext();) {
+            String validatorClass = (String) it.next();
+            try {
+                if (LOG.isLoggable(Level.FINE)) {
+                    LOG.fine("Found service validator : " + validatorClass);
+                }
+                ServiceValidator validator = (ServiceValidator)Class.forName(validatorClass).newInstance();
+                validators.add(validator);
+            } catch (Exception ex) {
+                LOG.log(Level.WARNING, "EXTENSION_ADD_FAILED_MSG", ex);
+            }
+        }
+        return validators;
     }
 }

Modified: incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/main/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/JAXWSContainer.java Tue May 29 19:38:51 2007
@@ -20,20 +20,15 @@
 package org.apache.cxf.tools.wsdlto.frontend.jaxws;
 
 import java.io.IOException;
-import java.util.ArrayList;
-import java.util.List;
 import java.util.Set;
 
 import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.resource.URIResolver;
-import org.apache.cxf.service.model.ServiceInfo;
 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.toolspec.ToolSpec;
-import org.apache.cxf.tools.validator.internal.AbstractValidator;
 import org.apache.cxf.tools.wsdlto.WSDLToJavaContainer;
-import org.apache.cxf.tools.wsdlto.frontend.jaxws.validator.XMLFormatValidator;
 
 public class JAXWSContainer extends WSDLToJavaContainer {
     
@@ -68,11 +63,4 @@
             env.put(ToolConstants.CFG_BINDING, bindings);
         }        
     }
-
-    public List<AbstractValidator> getServiceValidators() {
-        List<AbstractValidator> validators = new ArrayList<AbstractValidator>();
-        validators.add(new XMLFormatValidator(context.get(ServiceInfo.class)));
-        return validators;
-    }
-    
 }

Modified: incubator/cxf/trunk/tools/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/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/frontend/jaxws/src/test/java/org/apache/cxf/tools/wsdlto/frontend/jaxws/wsdl11/JAXWSDefinitionBuilderTest.java Tue May 29 19:38:51 2007
@@ -21,27 +21,18 @@
 
 import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 
-import javax.wsdl.Binding;
-import javax.wsdl.BindingInput;
-import javax.wsdl.BindingOperation;
 import javax.wsdl.Definition;
 import javax.wsdl.Operation;
-import javax.wsdl.Port;
 import javax.wsdl.PortType;
-import javax.wsdl.Service;
 import javax.wsdl.extensions.ExtensibilityElement;
-import javax.wsdl.extensions.http.HTTPAddress;
 import javax.xml.namespace.QName;
 
 import junit.framework.TestCase;
 
-import org.apache.cxf.bindings.xformat.XMLBindingMessageFormat;
 import org.apache.cxf.tools.common.ToolConstants;
 import org.apache.cxf.tools.common.ToolContext;
 import org.apache.cxf.tools.wsdlto.frontend.jaxws.customiztion.JAXWSBinding;
-import org.apache.cxf.transport.jms.AddressType;
 
 public class JAXWSDefinitionBuilderTest extends TestCase {
     private ToolContext env;
@@ -50,71 +41,9 @@
         env = new ToolContext();
     }
 
-    public void testBuildDefinitionWithXMLBinding() {
-        String qname = "http://apache.org/hello_world_xml_http/bare";
-        String wsdlUrl = getClass().getResource("hello_world_xml_bare.wsdl").toString();
-
-        JAXWSDefinitionBuilder builder = new JAXWSDefinitionBuilder();
-        builder.setContext(env);
-        Definition def = builder.build(wsdlUrl);
-        assertNotNull(def);
-        
-        Map services = def.getServices();
-        assertNotNull(services);
-        assertEquals(1, services.size());
-        Service service = (Service)services.get(new QName(qname, "XMLService"));
-        assertNotNull(service);
-        
-        Map ports = service.getPorts();
-        assertNotNull(ports);
-        assertEquals(1, ports.size());
-        Port port = service.getPort("XMLPort");
-        assertNotNull(port);
-
-        assertEquals(1, port.getExtensibilityElements().size());
-        assertTrue(port.getExtensibilityElements().get(0) instanceof HTTPAddress);
-
-        Binding binding = port.getBinding();
-        assertNotNull(binding);
-        assertEquals(new QName(qname, "Greeter_XMLBinding"), binding.getQName());
-
-        BindingOperation operation = binding.getBindingOperation("sayHi", null, null);
-        assertNotNull(operation);
-
-        BindingInput input = operation.getBindingInput();
-        assertNotNull(input);
-        assertEquals(1, input.getExtensibilityElements().size());
-        assertTrue(input.getExtensibilityElements().get(0) instanceof XMLBindingMessageFormat);
-    }
-
-    public void testBuildDefinitionWithJMSTransport() {
-        String qname = "http://cxf.apache.org/hello_world_jms";
-        String wsdlUrl = getClass().getResource("jms_test.wsdl").toString();
-
-        JAXWSDefinitionBuilder builder = new JAXWSDefinitionBuilder();
-        builder.setContext(env);
-        Definition def = builder.build(wsdlUrl);
-        assertNotNull(def);
-        
-        Map services = def.getServices();
-        assertNotNull(services);
-        assertEquals(8, services.size());
-        Service service = (Service)services.get(new QName(qname, "HelloWorldQueueBinMsgService"));
-        assertNotNull(service);
-        
-        Map ports = service.getPorts();
-        assertNotNull(ports);
-        assertEquals(1, ports.size());
-        Port port = service.getPort("HelloWorldQueueBinMsgPort");
-        assertNotNull(port);
-
-        assertEquals(3, port.getExtensibilityElements().size());
-        assertTrue(port.getExtensibilityElements().get(0) instanceof AddressType);
-    }
-
     public void testCustomization() {
-        env.put(ToolConstants.CFG_WSDLURL, getClass().getResource("./hello_world.wsdl").toString());
-        env.put(ToolConstants.CFG_BINDING, getClass().getResource("./binding2.xml").toString());
+        env.put(ToolConstants.CFG_WSDLURL, getClass().getResource("resources/hello_world.wsdl").toString());
+        env.put(ToolConstants.CFG_BINDING, getClass().getResource("resources/binding2.xml").toString());
         JAXWSDefinitionBuilder builder = new JAXWSDefinitionBuilder();
         builder.setContext(env);
         builder.build();
@@ -159,8 +88,8 @@
     
     
     public void testCustomizationWithDifferentNS() {
-        env.put(ToolConstants.CFG_WSDLURL, getClass().getResource("./hello_world.wsdl").toString());
-        env.put(ToolConstants.CFG_BINDING, getClass().getResource("./binding3.xml").toString());
+        env.put(ToolConstants.CFG_WSDLURL, getClass().getResource("resources/hello_world.wsdl").toString());
+        env.put(ToolConstants.CFG_BINDING, getClass().getResource("resources/binding3.xml").toString());
         JAXWSDefinitionBuilder builder = new JAXWSDefinitionBuilder();
         builder.setContext(env);
         builder.build();
@@ -206,9 +135,9 @@
         // set up a URI with ./../wsdl11/hello_world.wsdl instead of
         // ./hello_world.wsdl 
         env.put(ToolConstants.CFG_WSDLURL, 
-            getClass().getResource(".").toString() + "../wsdl11/hello_world.wsdl");
+            getClass().getResource(".").toString() + "../wsdl11/resources/hello_world.wsdl");
         env.put(ToolConstants.CFG_BINDING, 
-            getClass().getResource("./cxf556_binding.xml").toString());
+            getClass().getResource("resources/cxf556_binding.xml").toString());
 
         JAXWSDefinitionBuilder builder = new JAXWSDefinitionBuilder();
         builder.setContext(env);

Modified: incubator/cxf/trunk/tools/wsdlto/misc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/misc/pom.xml?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/misc/pom.xml (original)
+++ incubator/cxf/trunk/tools/wsdlto/misc/pom.xml Tue May 29 19:38:51 2007
@@ -94,6 +94,28 @@
             <artifactId>cxf-tools-validator</artifactId>
             <version>${project.version}</version>
         </dependency>
+
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-jms</artifactId>
+            <version>${project.version}</version>
+	    <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-bindings-xml</artifactId>
+            <version>${project.version}</version>
+	    <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-bindings-soap</artifactId>
+            <version>${project.version}</version>
+	    <scope>test</scope>
+        </dependency>
+
     </dependencies>
 
     <scm>

Modified: incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/WSDLToService.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/WSDLToService.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/WSDLToService.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/WSDLToService.java Tue May 29 19:38:51 2007
@@ -67,7 +67,7 @@
                 processor.process();
             }
         } catch (ToolException ex) {
-            System.err.println("Error : " + ex.getMessage());
+            System.err.println("Tools Error : " + ex.getMessage());
             if (ex.getCause() instanceof BadUsageException) {
                 printUsageException(TOOL_NAME, (BadUsageException)ex.getCause());
             }
@@ -76,7 +76,7 @@
                 ex.printStackTrace();
             }
         } catch (Exception ex) {
-            System.err.println("Error : " + ex.getMessage());
+            System.err.println("Unexpected Error : " + ex.getMessage());
             System.err.println();
             if (isVerboseOn()) {
                 ex.printStackTrace();

Modified: incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.java?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.java (original)
+++ incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/AbstractWSDLToProcessor.java Tue May 29 19:38:51 2007
@@ -22,14 +22,19 @@
 import java.io.IOException;
 import java.io.Writer;
 import java.util.ArrayList;
+import java.util.HashMap;
 import java.util.List;
+import java.util.Map;
+import java.util.logging.Level;
 import java.util.logging.Logger;
-
 import javax.wsdl.Definition;
 import javax.wsdl.extensions.schema.Schema;
 import javax.wsdl.factory.WSDLFactory;
 import javax.wsdl.xml.WSDLReader;
 
+import org.xml.sax.SAXParseException;
+
+import org.apache.cxf.common.i18n.Message;
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.tools.common.Processor;
 import org.apache.cxf.tools.common.ToolConstants;
@@ -38,6 +43,7 @@
 import org.apache.cxf.tools.util.ClassCollector;
 import org.apache.cxf.tools.util.FileWriterUtil;
 import org.apache.cxf.tools.validator.internal.WSDL11Validator;
+import org.apache.cxf.wsdl.WSDLExtensibilityPlugin;
 import org.apache.cxf.wsdl11.WSDLDefinitionBuilder;
 
 public class AbstractWSDLToProcessor implements Processor, com.sun.tools.xjc.api.ErrorListener {
@@ -52,6 +58,9 @@
 
     protected ClassCollector classColletor;
     List<Schema> schemaList = new ArrayList<Schema>();
+    
+    private final Map<String, WSDLExtensibilityPlugin> wsdlPlugins
+        = new HashMap<String, WSDLExtensibilityPlugin>();
 
     protected Writer getOutputWriter(String newNameExt) throws ToolException {
         Writer writer = null;
@@ -88,12 +97,11 @@
         try {
             writer = fw.getWriter("", newName);
         } catch (IOException ioe) {
-            org.apache.cxf.common.i18n.Message msg =
-                new org.apache.cxf.common.i18n.Message("FAIL_TO_WRITE_FILE",
-                                                             LOG,
-                                                             env.get(ToolConstants.CFG_OUTPUTDIR)
-                                                             + System.getProperty("file.seperator")
-                                                             + newName);
+            Message msg = new Message("FAIL_TO_WRITE_FILE",
+                                      LOG,
+                                      env.get(ToolConstants.CFG_OUTPUTDIR)
+                                      + System.getProperty("file.seperator")
+                                      + newName);
             throw new ToolException(msg, ioe);
         }
         return writer;
@@ -101,11 +109,26 @@
 
 
     protected void parseWSDL(String wsdlURL) throws ToolException {
-        WSDLDefinitionBuilder builder = new WSDLDefinitionBuilder();
+        WSDLDefinitionBuilder builder = new WSDLDefinitionBuilder(true);
         wsdlDefinition = builder.build(wsdlURL);
 
         wsdlReader = builder.getWSDLReader();
         wsdlFactory = builder.getWSDLFactory();
+        
+        wsdlPlugins.putAll(builder.getWSDLPlugins());
+        LOG.log(Level.INFO, "FOUND_WSDL_PLUGINS", wsdlPlugins.keySet());
+    }
+
+    public WSDLExtensibilityPlugin getWSDLPlugin(final String key, final Class clz) {
+        StringBuffer sb = new StringBuffer();
+        sb.append(key);
+        sb.append("-");
+        sb.append(clz.getName());
+        WSDLExtensibilityPlugin plugin = wsdlPlugins.get(sb.toString());
+        if (plugin == null) {
+            throw new ToolException(new Message("FOUND_NO_WSDL_PLUGIN", LOG, sb.toString(), clz));
+        }
+        return plugin;
     }
 
     protected void init() throws ToolException {
@@ -138,7 +161,7 @@
         return this.env;
     }
 
-    public void error(org.xml.sax.SAXParseException exception) {
+    public void error(SAXParseException exception) {
         if (this.env.isVerbose()) {
             exception.printStackTrace();
         } else {
@@ -146,7 +169,7 @@
         }
     }
 
-    public void fatalError(org.xml.sax.SAXParseException exception) {
+    public void fatalError(SAXParseException exception) {
         if (this.env.isVerbose()) {
             exception.printStackTrace();
         } else {
@@ -154,13 +177,13 @@
         }
     }
 
-    public void info(org.xml.sax.SAXParseException exception) {
+    public void info(SAXParseException exception) {
         if (this.env.isVerbose()) {
             System.err.println("Parsing schema info: " + exception.toString());
         }
     }
 
-    public void warning(org.xml.sax.SAXParseException exception) {
+    public void warning(SAXParseException exception) {
         if (this.env.isVerbose()) {
             System.err.println("Parsing schema warning " + exception.toString());
         }

Modified: incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/Messages.properties
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/Messages.properties?view=diff&rev=542728&r1=542727&r2=542728
==============================================================================
--- incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/Messages.properties (original)
+++ incubator/cxf/trunk/tools/wsdlto/misc/src/main/java/org/apache/cxf/tools/misc/processor/Messages.properties Tue May 29 19:38:51 2007
@@ -50,8 +50,5 @@
 
 RPC_PART_ILLEGAL = Message Part {0} does not use type reference not confirm to RPC style   
 
-
-
-
-
-
+FOUND_NO_WSDL_PLUGIN = Can not found wsdl plugin <{0}> for wsdl extension point {1}
+FOUND_WSDL_PLUGINS = Found wsdl plugins {0}
\ No newline at end of file



Mime
View raw message