You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by ff...@apache.org on 2010/03/30 08:55:37 UTC

svn commit: r929018 - in /servicemix/components/bindings/servicemix-cxf-bc/trunk/src: main/java/org/apache/servicemix/cxfbc/ test/resources/org/apache/servicemix/cxfbc/ws/security/

Author: ffang
Date: Tue Mar 30 06:55:37 2010
New Revision: 929018

URL: http://svn.apache.org/viewvc?rev=929018&view=rev
Log:
[SMXCOMP-730] cxf bc provider should support include xsd

Added:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/SchemaUtil.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_base_security.wsdl
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_security.wsdl
Modified:
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
    servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider.xml

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java?rev=929018&r1=929017&r2=929018&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/CxfBcProvider.java Tue Mar 30 06:55:37 2010
@@ -88,7 +88,6 @@ import org.apache.cxf.transport.Conduit;
 import org.apache.cxf.transport.ConduitInitiator;
 import org.apache.cxf.transport.ConduitInitiatorManager;
 import org.apache.cxf.wsdl.WSDLManager;
-import org.apache.cxf.wsdl11.SchemaUtil;
 import org.apache.cxf.wsdl11.ServiceWSDLBuilder;
 import org.apache.cxf.wsdl11.WSDLServiceBuilder;
 import org.apache.cxf.wsdl11.WSDLServiceFactory;
@@ -445,11 +444,15 @@ public class CxfBcProvider extends Provi
                 ServiceWSDLBuilder swBuilder = new ServiceWSDLBuilder(getBus(),
                         serviceInfos);
                 for (String key : schemaList.keySet()) {
+                    if (!key.endsWith(".xsd")) {
+                        continue;
+                    }
                     Element ele = schemaList.get(key);
                     for (SchemaInfo sInfo : serInfo.getSchemas()) {
                         Node nl = sInfo.getElement().getElementsByTagNameNS(
                                 "http://www.w3.org/2001/XMLSchema", "import")
                                 .item(0);
+                        
                         if (sInfo.getNamespaceURI() == null // it's import
                                                             // schema
                                 && nl != null
@@ -462,6 +465,17 @@ public class CxfBcProvider extends Provi
                             sInfo.setElement(ele);
                         }
                     }
+                    for (SchemaInfo sInfo : serInfo.getSchemas()) {
+                        Node nl = sInfo.getElement().getElementsByTagNameNS(
+                                "http://www.w3.org/2001/XMLSchema", "include")
+                                .item(0);
+                        if (nl != null
+                                && sInfo.getNamespaceURI()
+                                        .equals(ele.getAttribute("targetNamespace"))) {
+
+                            sInfo.setElement(ele);
+                        }
+                    }
                 }
                 serInfo.setProperty(WSDLServiceBuilder.WSDL_DEFINITION, null);
                 serInfo.getInterface().setProperty(WSDLServiceBuilder.WSDL_PORTTYPE, null);

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/SchemaUtil.java
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/SchemaUtil.java?rev=929018&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/SchemaUtil.java (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/SchemaUtil.java Tue Mar 30 06:55:37 2010
@@ -0,0 +1,253 @@
+/*
+ * 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.servicemix.cxfbc;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.IdentityHashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import javax.wsdl.Definition;
+import javax.wsdl.Import;
+import javax.wsdl.Types;
+import javax.wsdl.extensions.UnknownExtensibilityElement;
+import javax.wsdl.extensions.schema.Schema;
+import javax.wsdl.extensions.schema.SchemaImport;
+import javax.wsdl.extensions.schema.SchemaReference;
+
+import org.w3c.dom.Attr;
+import org.w3c.dom.Element;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.catalog.CatalogXmlSchemaURIResolver;
+import org.apache.cxf.common.xmlschema.SchemaCollection;
+import org.apache.cxf.helpers.CastUtils;
+import org.apache.cxf.service.model.SchemaInfo;
+import org.apache.cxf.service.model.ServiceInfo;
+import org.apache.ws.commons.schema.XmlSchema;
+
+import static org.apache.cxf.helpers.CastUtils.cast;
+
+public final class SchemaUtil {
+    private final Map<String, Element> schemaList;
+    private final Map<String, String> catalogResolved = new HashMap<String, String>();
+    private final Bus bus;
+
+    public SchemaUtil(final Bus b, final Map<String, Element> s) {
+        this.bus = b;
+        this.schemaList = s;
+    }
+    public void getSchemas(final Definition def, final ServiceInfo serviceInfo) {
+        SchemaCollection schemaCol = serviceInfo.getXmlSchemaCollection();
+        getSchemas(def, schemaCol, serviceInfo);
+    }
+    public void getSchemas(final Definition def, 
+                           SchemaCollection schemaCol, 
+                           ServiceInfo serviceInfo) {
+        getSchemas(def, schemaCol, serviceInfo.getSchemas());
+    }
+
+    public void getSchemas(final Definition def, 
+                           final SchemaCollection schemaCol,
+                           List<SchemaInfo> schemas) {
+        List<Definition> defList = new ArrayList<Definition>();
+        parseImports(def, defList);
+        extractSchema(def, schemaCol, schemas);
+        // added
+        getSchemaList(def);
+        
+        Map<Definition, Definition> done = new IdentityHashMap<Definition, Definition>();
+        done.put(def, def);
+        for (Definition def2 : defList) {
+            if (!done.containsKey(def2)) {
+                extractSchema(def2, schemaCol, schemas);
+                // added
+                getSchemaList(def2);
+                done.put(def2, def2);
+            }
+        }
+    }
+
+    private void extractSchema(Definition def, SchemaCollection schemaCol, List<SchemaInfo> schemaInfos) {
+        Types typesElement = def.getTypes();
+        if (typesElement != null) {
+            int schemaCount = 1;
+            for (Object obj : typesElement.getExtensibilityElements()) {
+                org.w3c.dom.Element schemaElem = null;
+                if (obj instanceof Schema) {
+                    Schema schema = (Schema)obj;
+                    schemaElem = schema.getElement();
+                } else if (obj instanceof UnknownExtensibilityElement) {
+                    org.w3c.dom.Element elem = ((UnknownExtensibilityElement)obj).getElement();
+                    if (elem.getLocalName().equals("schema")) {
+                        schemaElem = elem;
+                    }
+                }
+                if (schemaElem != null) {
+                    synchronized (schemaElem.getOwnerDocument()) {
+                        for (Object prefix : def.getNamespaces().keySet()) {
+                            String ns = (String)def.getNamespaces().get(prefix);
+                            if ("".equals(prefix)) {
+                                if (!schemaElem.hasAttribute("xmlns")) {
+                                    Attr attr = 
+                                        schemaElem.getOwnerDocument()
+                                            .createAttributeNS(javax.xml.XMLConstants.XMLNS_ATTRIBUTE_NS_URI, 
+                                                               "xmlns");
+                                    attr.setValue(ns);
+                                    schemaElem.setAttributeNodeNS(attr);
+                                }
+                            } else if (!schemaElem.hasAttribute("xmlns:" + prefix)) {
+                                String namespace = javax.xml.XMLConstants.XMLNS_ATTRIBUTE_NS_URI;
+                                Attr attr = 
+                                    schemaElem.getOwnerDocument().createAttributeNS(namespace, 
+                                                                                    "xmlns:" + prefix);
+                                attr.setValue(ns);
+                                schemaElem.setAttributeNodeNS(attr);
+                            }
+                        }
+                        String systemId = def.getDocumentBaseURI() + "#types" + schemaCount;
+    
+                        schemaCol.setBaseUri(def.getDocumentBaseURI());
+                        CatalogXmlSchemaURIResolver schemaResolver =
+                            new CatalogXmlSchemaURIResolver(bus);
+                        schemaCol.setSchemaResolver(schemaResolver);
+                        
+                        XmlSchema xmlSchema = schemaCol.read(schemaElem, systemId);
+                        catalogResolved.putAll(schemaResolver.getResolvedMap());
+                        SchemaInfo schemaInfo = new SchemaInfo(xmlSchema.getTargetNamespace());
+                        schemaInfo.setSchema(xmlSchema);
+                        schemaInfo.setSystemId(systemId);
+                        schemaInfo.setElement(schemaElem);
+                        schemaInfos.add(schemaInfo);
+                        schemaCount++;
+                    }
+                }
+            }
+        }
+    }
+
+    private void parseImports(Definition def, List<Definition> defList) {
+        List<Import> importList = new ArrayList<Import>();
+
+        Collection<List<Import>> ilist = cast(def.getImports().values());
+        for (List<Import> list : ilist) {
+            importList.addAll(list);
+        }
+        for (Import impt : importList) {
+            if (!defList.contains(impt.getDefinition())) {
+                defList.add(impt.getDefinition());
+                parseImports(impt.getDefinition(), defList);
+            }
+        }
+    }
+
+    // Workaround for getting the elements
+    private void getSchemaList(Definition def) {
+        Types typesElement = def.getTypes();
+        if (typesElement != null) {
+            Iterator ite = typesElement.getExtensibilityElements().iterator();
+            while (ite.hasNext()) {
+                Object obj = ite.next();
+                if (obj instanceof Schema) {
+                    Schema schema = (Schema)obj;
+                    addSchema(schema.getDocumentBaseURI(), schema);
+                }
+            }
+        }
+    }
+
+    private void addSchema(String docBaseURI, Schema schema) {
+        //String docBaseURI = schema.getDocumentBaseURI();
+        Element schemaEle = schema.getElement();
+        if (schemaList.get(docBaseURI) == null) {
+            schemaList.put(docBaseURI, schemaEle);
+        } else if (schemaList.get(docBaseURI) != null && schemaList.containsValue(schemaEle)) {
+            // do nothing
+        } else {
+            String tns = schema.getDocumentBaseURI() + "#"
+                         + schema.getElement().getAttribute("targetNamespace");
+            if (schemaList.get(tns) == null) {
+                schemaList.put(tns, schema.getElement());
+            }
+        }
+
+        //handle imports
+        Map<String, List> imports = CastUtils.cast(schema.getImports());
+        if (imports != null && imports.size() > 0) {
+            Collection<String> importKeys = imports.keySet();
+            for (String importNamespace : importKeys) {
+
+                List<SchemaImport> schemaImports = CastUtils.cast(imports.get(importNamespace));
+                
+                for (SchemaImport schemaImport : schemaImports) {
+                    Schema tempImport = schemaImport.getReferencedSchema();                   
+                    String key = schemaImport.getSchemaLocationURI();
+                    if (importNamespace == null && tempImport != null) {
+                        importNamespace = tempImport.getDocumentBaseURI();
+                    }
+                    
+                    if (tempImport != null && !catalogResolved.containsKey(key)) {                 
+                        key = tempImport.getDocumentBaseURI();
+                    }
+                    
+                    if (tempImport != null
+                        && !isSchemaParsed(key, importNamespace)
+                        && !schemaList.containsValue(tempImport.getElement())) {
+                        addSchema(key, tempImport);
+                    }
+                }
+
+            }
+        }
+        //handle includes
+        List<SchemaReference> includes = CastUtils.cast(schema.getIncludes());
+        if (includes != null && includes.size() > 0) {
+            String includeNamespace = schema.getElement().getAttribute("targetNamespace");
+
+            for (SchemaReference schemaInclude : includes) {
+                Schema tempInclude = schemaInclude.getReferencedSchema();
+                String key = tempInclude.getDocumentBaseURI();
+                if (includeNamespace == null && tempInclude != null) {
+                    includeNamespace = tempInclude.getDocumentBaseURI();
+                }
+
+                if (tempInclude != null && !catalogResolved.containsKey(key)) {
+                    key = tempInclude.getDocumentBaseURI();
+                }
+
+                if (tempInclude != null && !isSchemaParsed(key, includeNamespace)
+                        && !schemaList.containsValue(tempInclude.getElement())) {
+                    addSchema(key, tempInclude);
+                }
+            }
+
+        }
+    }
+
+    private boolean isSchemaParsed(String baseUri, String ns) {
+        if (schemaList.get(baseUri) != null) {
+            Element ele = schemaList.get(baseUri);
+            String tns = ele.getAttribute("targetNamespace");
+            if (ns.equals(tns)) {
+                return true;
+            }
+        }
+        return false;
+    }
+}

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_base_security.wsdl
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_base_security.wsdl?rev=929018&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_base_security.wsdl (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_base_security.wsdl Tue Mar 30 06:55:37 2010
@@ -0,0 +1,272 @@
+<?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>
+        <xsd:schema targetNamespace="http://apache.org/hello_world_soap_http/types">
+            <xsd:include schemaLocation="base.xsd"/>
+        </xsd:schema>
+    </wsdl:types>
+    <wsdl:message name="sayHiRequest">
+        <wsdl:part name="in" element="x1:sayHi"/>
+    </wsdl:message>
+    <wsdl:message name="sayHiResponse">
+        <wsdl:part name="out" element="x1:sayHiResponse"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeRequest">
+        <wsdl:part name="in" element="x1:greetMe"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeResponse">
+        <wsdl:part name="out" element="x1:greetMeResponse"/>
+    </wsdl:message>
+    <wsdl:message name="testNillableRequest">
+        <wsdl:part name="in" element="x1:testNillable"/>
+    </wsdl:message>
+    <wsdl:message name="testNillableResponse">
+        <wsdl:part name="out" element="x1:testNillableResponse"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeLaterRequest">
+        <wsdl:part name="in" element="x1:greetMeLater"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeLaterResponse">
+        <wsdl:part name="out" element="x1:greetMeLaterResponse"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeSometimeRequest">
+        <wsdl:part name="in" element="x1:greetMeSometime"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeSometimeResponse">
+        <wsdl:part name="out" element="x1:greetMeSometimeResponse"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeOneWayRequest">
+        <wsdl:part name="in" element="x1:greetMeOneWay"/>
+    </wsdl:message>
+    <wsdl:message name="testDocLitFaultRequest">
+        <wsdl:part name="in" element="x1:testDocLitFault"/>
+    </wsdl:message>
+    <wsdl:message name="testDocLitFaultResponse">
+        <wsdl:part name="out" element="x1:testDocLitFaultResponse"/>
+    </wsdl:message>
+    <wsdl:message name="NoSuchCodeLitFault">
+        <wsdl:part name="NoSuchCodeLit" element="x1:NoSuchCodeLit"/>
+    </wsdl:message>
+    <wsdl:message name="BadRecordLitFault">
+        <wsdl:part name="BadRecordLit" element="x1:BadRecordLit"/>
+    </wsdl:message>
+    <wsdl:message name="testDocLitBareRequest">
+        <wsdl:part name="in" element="x1:BareDocument"/>
+    </wsdl:message>
+    <wsdl:message name="testDocLitBareResponse">
+        <wsdl:part name="out" element="x1:BareDocumentResponse"/>
+    </wsdl:message> 
+    <wsdl:portType name="Greeter">
+        <wsdl:operation name="sayHi">
+            <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/>
+            <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="greetMe">
+            <wsdl:input name="greetMeRequest" message="tns:greetMeRequest"/>
+            <wsdl:output name="greetMeResponse" message="tns:greetMeResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="testNillable">
+            <wsdl:input name="testNillableRequest" message="tns:testNillableRequest"/>
+            <wsdl:output name="testNillableResponse" message="tns:testNillableResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="greetMeLater">
+            <wsdl:input name="greetMeLaterRequest" message="tns:greetMeLaterRequest"/>
+            <wsdl:output name="greetMeLaterResponse" message="tns:greetMeLaterResponse"/>
+        </wsdl:operation>
+       <wsdl:operation name="greetMeSometime">
+            <wsdl:input name="greetMeSometimeRequest" message="tns:greetMeSometimeRequest"/>
+            <wsdl:output name="greetMeSometimeResponse" message="tns:greetMeSometimeResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="greetMeOneWay">
+            <wsdl:input name="greetMeOneWayRequest" message="tns:greetMeOneWayRequest"/>
+        </wsdl:operation>
+        <wsdl:operation name="testDocLitFault">
+            <wsdl:input name="testDocLitFaultRequest" message="tns:testDocLitFaultRequest"/>
+            <wsdl:output name="testDocLitFaultResponse" message="tns:testDocLitFaultResponse"/>
+            <wsdl:fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/>
+            <wsdl:fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/>
+        </wsdl:operation>
+
+    </wsdl:portType>
+
+    <wsdl:portType name="DocLitBare">
+        <wsdl:operation name="testDocLitBare">
+            <wsdl:input name="testDocLitBareRequest" message="tns:testDocLitBareRequest"/>
+            <wsdl:output name="testDocLitBareResponse" message="tns:testDocLitBareResponse"/>
+        </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="sayHi">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="greetMe">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="testNillable">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="greetMeLater">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="greetMeSometime">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        <wsdl:operation name="greetMeOneWay">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+        <wsdl:operation name="testDocLitFault">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+            <wsdl:fault name="NoSuchCodeLitFault">
+                <soap:fault name="NoSuchCodeLitFault" use="literal"/>
+            </wsdl:fault>
+            <wsdl:fault name="BadRecordLitFault">
+                <soap:fault name="BadRecordLitFault" use="literal"/>
+            </wsdl:fault>
+        </wsdl:operation>
+
+    </wsdl:binding>
+    <wsdl:binding name="Doc_Lit_Bare_SOAPBinding" type="tns:DocLitBare">
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="testDocLitBare">
+            <soap:operation style="document" soapAction="http://apache.org/hello_world_soap_http/testDocLitBare"/>
+            <wsdl:input name="testDocLitBareRequest">
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="testDocLitBareResponse">
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+    </wsdl:binding>
+
+
+    <wsdl:service name="SOAPService">
+	<wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:19000/SoapContext/SoapPort"/>
+        </wsdl:port>
+
+	<wsdl:port name="SoapPort1" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:7000/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+
+    <wsdl:service name="SOAPProviderService">
+        <wsdl:port name="SoapProviderPort" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:9003/SoapContext/SoapProviderPort"/>
+        </wsdl:port>
+    </wsdl:service>
+
+        <wsdl:service name="SOAPDispatchService">
+        <wsdl:port name="SoapDispatchPort" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:9006/SOAPDispatchService/SoapDispatchPort"/>
+        </wsdl:port>
+    </wsdl:service>
+
+    <wsdl:service name="SOAPService_DocLitBare">
+        <wsdl:port name="SoapPort2" binding="tns:Doc_Lit_Bare_SOAPBinding">
+            <soap:address location="http://localhost:7600/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+    <wsdl:service name="SOAPServiceAddressingDocLitBare">
+        <wsdl:port name="SoapPort" binding="tns:Doc_Lit_Bare_SOAPBinding">
+            <soap:address location="http://localhost:7600/SoapContext/SoapPort"/>
+            <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/>
+        </wsdl:port>
+    </wsdl:service>
+    <wsdl:service name="SOAPService_Test1">
+        <wsdl:port name="SoapPort_Test1" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:9100"/>
+        </wsdl:port>
+        <wsdl:port name="SoapPort_Test2" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:9101"/>
+        </wsdl:port>
+    </wsdl:service>
+    <wsdl:service name="SOAPServiceAddressing">
+        <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:9008/SoapContext/SoapPort"/>
+            <wswa:UsingAddressing xmlns:wswa="http://www.w3.org/2005/02/addressing/wsdl"/>
+        </wsdl:port>
+    </wsdl:service>
+    <wsdl:service name="SOAPServiceConcurrencyTest">
+        <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:9009/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+    <wsdl:service name="SOAPServiceBogusAddressTest">
+        <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="FOO"/>
+        </wsdl:port>
+    </wsdl:service>
+    <wsdl:service name="SOAPServiceMultiPortTypeTest">
+		<wsdl:port name="GreeterPort" binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:9020/MultiPort/GreeterPort"/>
+        </wsdl:port>
+        <wsdl:port name="DocLitBarePort" binding="tns:Doc_Lit_Bare_SOAPBinding">
+            <soap:address location="http://localhost:9021/MultiPort/DocBarePort"/>
+        </wsdl:port>        
+    </wsdl:service>
+</wsdl:definitions>
+

Added: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_security.wsdl
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_security.wsdl?rev=929018&view=auto
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_security.wsdl (added)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/hello_world_security.wsdl Tue Mar 30 06:55:37 2010
@@ -0,0 +1,82 @@
+<?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:wsdl="http://schemas.xmlsoap.org/wsdl/"
+    xmlns:jms="http://cxf.apache.org/transports/jms"
+    targetNamespace="http://apache.org/hello_world_soap_http" 
+    name="WSSecurity"
+    >
+
+    <wsdl:import 
+        namespace="http://apache.org/hello_world_soap_http"
+        location="hello_world_base_security.wsdl"
+    />
+
+    <wsdl:service name="SOAPServiceWSSecurity">
+        <wsdl:port 
+            name="TimestampSignEncrypt" 
+            binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:19000/SOAPServiceWSSecurity/TimestampSignEncrypt"/>
+        </wsdl:port>
+        <wsdl:port 
+            name="TimestampSignEncryptPolicy" 
+            binding="tns:Greeter_SOAPBinding">
+            <soap:address location="http://localhost:19000/SOAPServiceWSSecurity/TimestampSignEncryptPolicy"/>
+        </wsdl:port>
+    </wsdl:service>
+    <service name="HelloWorldService">
+           <port binding="tns:Greeter_SOAPBinding" name="HelloWorldPort">
+               <jms:address
+                   jndiConnectionFactoryName="ConnectionFactory"
+                   jndiDestinationName="dynamicQueues/test.jmstransport.text">                    <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61616"/>
+               </jms:address>
+
+               <jms:server durableSubscriberName="CXF_subscriber"/>
+           </port>
+           <port binding="tns:Greeter_SOAPBinding" name="HelloWorldPortProxy">
+               <jms:address
+                   jndiConnectionFactoryName="ConnectionFactory"                    jndiDestinationName="dynamicQueues/test.jmstransport.text.provider">                    <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61616"/>
+               </jms:address>
+
+               <jms:server durableSubscriberName="CXF_subscriber"/>
+           </port>
+           
+    </service>
+    
+   <service name="HelloWorldService1">
+
+           <port binding="tns:Greeter_SOAPBinding" name="HelloWorldPortProxy1">
+               <jms:address
+                   jndiConnectionFactoryName="ConnectionFactory"                    jndiDestinationName="dynamicQueues/test.jmstransport.text.provider">                    <jms:JMSNamingProperty name="java.naming.factory.initial" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>
+                   <jms:JMSNamingProperty name="java.naming.provider.url" value="tcp://localhost:61616"/>
+               </jms:address>
+
+               <jms:server durableSubscriberName="CXF_subscriber"/>
+           </port>
+
+    </service>   
+
+</wsdl:definitions>
+

Modified: servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider.xml
URL: http://svn.apache.org/viewvc/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider.xml?rev=929018&r1=929017&r2=929018&view=diff
==============================================================================
--- servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider.xml (original)
+++ servicemix/components/bindings/servicemix-cxf-bc/trunk/src/test/resources/org/apache/servicemix/cxfbc/ws/security/provider.xml Tue Mar 30 06:55:37 2010
@@ -33,7 +33,7 @@
     
     <sm:endpoints>
       
-      <cxfbc:provider wsdl="org/apache/servicemix/cxfbc/ws/security/hello_world.wsdl"
+      <cxfbc:provider wsdl="org/apache/servicemix/cxfbc/ws/security/hello_world_security.wsdl"
                       locationURI="https://localhost:9001/SoapContext/SoapPort"
                       endpoint="TimestampSignEncrypt"
                       service="greeter:SOAPServiceWSSecurity"