servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r392282 [1/2] - in /incubator/servicemix/trunk/servicemix-common/src: main/java/org/apache/servicemix/common/ main/java/org/apache/servicemix/common/tools/ main/java/org/apache/servicemix/common/tools/wsdl/ test/java/org/ test/java/org/apac...
Date Fri, 07 Apr 2006 13:19:52 GMT
Author: gnodet
Date: Fri Apr  7 06:19:50 2006
New Revision: 392282

URL: http://svn.apache.org/viewcvs?rev=392282&view=rev
Log:
Add a wsdl flattener to create a standalone wsdl containing one port type definition from a non-standalone wsdl.
Minor change to registry to allow registering / unregistering endpoints directly.

Added:
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/Schema.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattener.java
    incubator/servicemix/trunk/servicemix-common/src/test/java/org/
    incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/
    incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/
    incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/
    incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/tools/
    incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/tools/wsdl/
    incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattenerTest.java
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/b-2.xsd
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/bf-2.xsd
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/br-2.xsd
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/brw-2.wsdl
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/bw-2.wsdl
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/r-2.xsd
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/rw-2.wsdl
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/t-1.xsd
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/ws-addr.xsd
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/wsn.wsdl
    incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/xml.xsd
Modified:
    incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java

Modified: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java?rev=392282&r1=392281&r2=392282&view=diff
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java (original)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/Registry.java Fri Apr  7 06:19:50 2006
@@ -40,12 +40,20 @@
         return (ServiceUnit) this.serviceUnits.get(name);
     }
     
+    public void registerEndpoint(Endpoint ep) {
+        this.endpoints.put(EndpointSupport.getKey(ep), ep);
+    }
+    
+    public void unregisterEndpoint(Endpoint ep) {
+        this.endpoints.remove(EndpointSupport.getKey(ep));
+    }
+    
     public void registerServiceUnit(ServiceUnit su) {
         this.serviceUnits.put(su.getName(), su);
         Collection endpoints = (Collection) su.getEndpoints();
         for (Iterator iter = endpoints.iterator(); iter.hasNext();) {
             Endpoint ep = (Endpoint) iter.next();
-            this.endpoints.put(EndpointSupport.getKey(ep), ep);
+            registerEndpoint(ep);
         }
     }
     
@@ -54,7 +62,7 @@
         Collection endpoints = (Collection) su.getEndpoints();
         for (Iterator iter = endpoints.iterator(); iter.hasNext();) {
             Endpoint ep = (Endpoint) iter.next();
-            this.endpoints.remove(EndpointSupport.getKey(ep));
+            unregisterEndpoint(ep);
         }
     }
     

Added: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/Schema.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/Schema.java?rev=392282&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/Schema.java (added)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/Schema.java Fri Apr  7 06:19:50 2006
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.common.tools.wsdl;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.w3c.dom.Element;
+
+/**
+ * Contains informations related to a schema.
+ *  
+ * @author gnodet
+ */
+public class Schema {
+
+    private Element root;
+    private String namespace;
+    private List imports;
+    private URI sourceUri;
+    
+    /**
+     * Add a reference to an imported namespace.
+     * @param namespace the namespace to reference
+     */
+    public void addImport(String namespace) {
+        if (imports == null) {
+            imports = new ArrayList();
+        }
+        imports.add(namespace);
+    }
+    
+    /**
+     * @return Returns the imports.
+     */
+    public List getImports() {
+        return imports;
+    }
+
+    /**
+     * @param imports The imports to set.
+     */
+    public void setImports(List imports) {
+        this.imports = imports;
+    }
+
+    /**
+     * @return Returns the root.
+     */
+    public Element getRoot() {
+        return root;
+    }
+
+    /**
+     * @param root The root to set.
+     */
+    public void setRoot(Element root) {
+        this.root = root;
+    }
+
+    /**
+     * @return Returns the namespace.
+     */
+    public String getNamespace() {
+        return namespace;
+    }
+
+    /**
+     * @param namespace The namespace to set.
+     */
+    public void setNamespace(String namespace) {
+        this.namespace = namespace;
+    }
+
+    /**
+     * @return Returns the sourceUri.
+     */
+    public URI getSourceUri() {
+        return sourceUri;
+    }
+
+    /**
+     * @param sourceUri The sourceUri to set.
+     */
+    public void setSourceUri(URI sourceUri) {
+        this.sourceUri = sourceUri;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java?rev=392282&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java (added)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/SchemaCollection.java Fri Apr  7 06:19:50 2006
@@ -0,0 +1,118 @@
+/*
+ * Copyright 2005-2006 The Apache Software Foundation.
+ *
+ * Licensed 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.common.tools.wsdl;
+
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.InputSource;
+
+/**
+ * Collection of schemas.
+ *  
+ * @author gnodet
+ */
+public class SchemaCollection {
+
+    private Map schemas;
+    private URI baseUri;
+    
+    public SchemaCollection() {
+        this(null);
+    }
+    
+    public SchemaCollection(URI baseUri) {
+        this.baseUri = baseUri;
+        this.schemas = new HashMap();
+    }
+    
+    public Schema getSchema(String namespaceURI) {
+        return (Schema) schemas.get(namespaceURI);
+    }
+    
+    public void read(Element elem, URI sourceUri) throws Exception {
+        Schema schema = new Schema();
+        schema.setSourceUri(sourceUri);
+        schema.setRoot(elem);
+        schema.setNamespace(elem.getAttribute("targetNamespace"));
+        schemas.put(schema.getNamespace(), schema);
+        handleImports(schema);
+    }
+    
+    public void read(String location, URI baseUri) throws Exception {
+        if (baseUri == null) {
+            baseUri = this.baseUri;
+        }
+        URI loc;
+        if (baseUri != null) {
+            loc = baseUri.resolve(location);
+        } else {
+            loc = new URI(location);
+        }
+        InputSource inputSource = new InputSource();
+        inputSource.setByteStream(loc.toURL().openStream());
+        inputSource.setSystemId(loc.toString());
+        read(inputSource);
+    }
+    
+    public void read(InputSource inputSource) throws Exception {
+        DocumentBuilderFactory docFac = DocumentBuilderFactory.newInstance();
+        docFac.setNamespaceAware(true);
+        DocumentBuilder builder = docFac.newDocumentBuilder();
+        Document doc = builder.parse(inputSource);
+        read(doc.getDocumentElement(), 
+             inputSource.getSystemId() != null ? new URI(inputSource.getSystemId()) : null);
+    }
+    
+    protected void handleImports(Schema schema) throws Exception {
+        NodeList children = schema.getRoot().getChildNodes();
+        List imports = new ArrayList();
+        for (int i = 0; i < children.getLength(); i++) {
+            Node child = children.item(i);
+            if (child instanceof Element) {
+                Element ce = (Element) child;
+                if ("http://www.w3.org/2001/XMLSchema".equals(ce.getNamespaceURI()) &&
+                    "import".equals(ce.getLocalName())) {
+                    imports.add(ce);
+                }
+            }
+        }
+        for (Iterator iter = imports.iterator(); iter.hasNext();) {
+            Element ce = (Element) iter.next();
+            String namespace = ce.getAttribute("namespace");
+            if (schemas.get(namespace) == null) {
+                String location = ce.getAttribute("schemaLocation");
+                if (location != null && !"".equals(location)) {
+                    read(location, schema.getSourceUri());
+                }
+            }
+            schema.addImport(namespace);
+            schema.getRoot().removeChild(ce);
+        }
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattener.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattener.java?rev=392282&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattener.java (added)
+++ incubator/servicemix/trunk/servicemix-common/src/main/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattener.java Fri Apr  7 06:19:50 2006
@@ -0,0 +1,254 @@
+package org.apache.servicemix.common.tools.wsdl;
+
+import java.net.URI;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.wsdl.Definition;
+import javax.wsdl.Fault;
+import javax.wsdl.Import;
+import javax.wsdl.Input;
+import javax.wsdl.Message;
+import javax.wsdl.Operation;
+import javax.wsdl.Output;
+import javax.wsdl.Part;
+import javax.wsdl.PortType;
+import javax.wsdl.Types;
+import javax.wsdl.extensions.ExtensibilityElement;
+import javax.wsdl.extensions.schema.SchemaImport;
+import javax.wsdl.factory.WSDLFactory;
+import javax.xml.namespace.QName;
+
+import com.ibm.wsdl.extensions.schema.SchemaImpl;
+
+public class WSDLFlattener {
+
+    private Definition definition;
+    private SchemaCollection schemas;
+    private Map flattened;
+    private boolean initialized;
+    
+    public WSDLFlattener() {
+        this(null, null);
+    }
+        
+    public WSDLFlattener(Definition definition) {
+        this(definition, null);
+    }
+        
+    public WSDLFlattener(Definition definition, SchemaCollection schemas) {
+        this.definition = definition;
+        this.flattened = new HashMap();
+        this.schemas = schemas;
+    }
+    
+    /**
+     * Parse the schemas referenced by the definition.
+     * @throws Exception if an error occurs
+     */
+    public void initialize() throws Exception {
+        if (!initialized) {
+            if (schemas == null) {
+                URI uri = null;
+                if (this.definition.getDocumentBaseURI() != null) {
+                    uri = URI.create(this.definition.getDocumentBaseURI());
+                }
+                this.schemas = new SchemaCollection(uri);
+            }
+            parseSchemas(this.definition);
+            initialized = true;
+        }
+    }
+    
+    /**
+     * Retrieve a flattened definition for a given port type name.
+     * @param portType the port type to create a flat definition for
+     * @return a flat definition for the port type
+     * @throws Exception if an error occurs
+     */
+    public Definition getDefinition(QName portType) throws Exception {
+        Definition def = (Definition) flattened.get(portType);
+        if (def == null) {
+            def = flattenDefinition(portType);
+            flattened.put(portType, def);
+        }
+        return def;
+    }
+
+    /**
+     * @return Returns the definition.
+     */
+    public Definition getDefinition() {
+        return definition;
+    }
+
+    /**
+     * @param definition The definition to set.
+     */
+    public void setDefinition(Definition definition) {
+        this.definition = definition;
+    }
+
+    /**
+     * @return Returns the schemas.
+     */
+    public SchemaCollection getSchemas() throws Exception {
+        return schemas;
+    }
+
+    /**
+     * @param schemas The schemas to set.
+     */
+    public void setSchemas(SchemaCollection schemas) {
+        this.schemas = schemas;
+    }
+    
+    private Definition flattenDefinition(QName name) throws Exception {
+        // Check that schemas have been loaded
+        initialize();
+        // Create new definition
+        Definition flat = WSDLFactory.newInstance().newDefinition();
+        flat.setTargetNamespace(name.getNamespaceURI());
+        addNamespaces(flat, definition);
+        // Create port type
+        PortType defPort = definition.getPortType(name);
+        PortType flatPort = flat.createPortType();
+        flatPort.setQName(defPort.getQName());
+        flatPort.setUndefined(false);
+        // Import all operations and related messages
+        for (Iterator itOper = defPort.getOperations().iterator(); itOper.hasNext();) {
+            Operation defOper = (Operation) itOper.next();
+            Operation flatOper = flat.createOperation();
+            flatOper.setName(defOper.getName());
+            flatOper.setStyle(defOper.getStyle());
+            flatOper.setUndefined(false);
+            if (defOper.getInput() != null) {
+                Input flatInput = flat.createInput();
+                flatInput.setName(defOper.getInput().getName());
+                if (defOper.getInput().getMessage() != null) {
+                    Message flatInputMsg = copyMessage(defOper.getInput().getMessage(), flat);
+                    flatInput.setMessage(flatInputMsg);
+                    flat.addMessage(flatInputMsg);
+                }
+                flatOper.setInput(flatInput);
+            }
+            if (defOper.getOutput() != null) {
+                Output flatOutput = flat.createOutput();
+                flatOutput.setName(defOper.getOutput().getName());
+                if (defOper.getOutput().getMessage() != null) {
+                    Message flatOutputMsg = copyMessage(defOper.getOutput().getMessage(), flat);
+                    flatOutput.setMessage(flatOutputMsg);
+                    flat.addMessage(flatOutputMsg);
+                }
+                flatOper.setOutput(flatOutput);
+            }
+            for (Iterator itFault = defOper.getFaults().values().iterator(); itFault.hasNext();) {
+                Fault defFault = (Fault) itFault.next();
+                Fault flatFault = flat.createFault();
+                flatFault.setName(defFault.getName());
+                if (defFault.getMessage() != null) {
+                    Message flatFaultMsg = copyMessage(defFault.getMessage(), flat);
+                    flatFault.setMessage(flatFaultMsg);
+                    flat.addMessage(flatFaultMsg);
+                }
+                flatOper.addFault(flatFault);
+            }
+            flatPort.addOperation(flatOper);
+        }
+        // Get all needed direct schemas
+        Set namespaces = new HashSet();
+        for (Iterator itMsg = flat.getMessages().values().iterator(); itMsg.hasNext();) {
+            Message msg = (Message) itMsg.next();
+            for (Iterator itPart = msg.getParts().values().iterator(); itPart.hasNext();) {
+                Part part = (Part) itPart.next();
+                QName elemName = part.getElementName();
+                namespaces.add(elemName.getNamespaceURI());
+                Schema schema = schemas.getSchema(elemName.getNamespaceURI());
+                if (schema.getImports() != null) {
+                    for (Iterator iter = schema.getImports().iterator(); iter.hasNext();) {
+                        String ns = (String) iter.next();
+                        namespaces.add(ns);
+                    }
+                }
+            }
+        }
+        // Import schemas in definition
+        if (namespaces.size() > 0) {
+            Types types = flat.createTypes();
+            for (Iterator iter = namespaces.iterator(); iter.hasNext();) {
+                String ns = (String) iter.next();
+                javax.wsdl.extensions.schema.Schema imp = new SchemaImpl();
+                imp.setElement(schemas.getSchema(ns).getRoot());
+                imp.setElementType(new QName("http://www.w3.org/2001/XMLSchema", "schema"));
+                types.addExtensibilityElement(imp);
+            }
+            flat.setTypes(types);
+        }
+        flat.addPortType(flatPort);
+        return flat;
+    }
+    
+    private void parseSchemas(Definition def) throws Exception {
+        if (def.getTypes() != null && def.getTypes().getExtensibilityElements() != null) {
+            for (Iterator iter = def.getTypes().getExtensibilityElements().iterator(); iter.hasNext();) {
+                ExtensibilityElement element = (ExtensibilityElement) iter.next();
+                if (element instanceof javax.wsdl.extensions.schema.Schema) {
+                    javax.wsdl.extensions.schema.Schema schema = (javax.wsdl.extensions.schema.Schema) element;
+                    for (Iterator itImp = schema.getImports().values().iterator(); itImp.hasNext();) {
+                        Collection imps = (Collection) itImp.next();
+                        for (Iterator itSi = imps.iterator(); itSi.hasNext();) {
+                            SchemaImport imp = (SchemaImport) itSi.next();
+                            schemas.read(imp.getSchemaLocationURI(), null);
+                        }
+                    }
+                }
+            }
+        }
+        if (def.getImports() != null) {
+            for (Iterator itImp = def.getImports().values().iterator(); itImp.hasNext();) {
+                Collection imps = (Collection) itImp.next();
+                for (Iterator iter = imps.iterator(); iter.hasNext();) {
+                    Import imp = (Import) iter.next();
+                    parseSchemas(imp.getDefinition());
+                }
+            }
+        }
+    }
+
+    private void addNamespaces(Definition flat, Definition def) {
+        for (Iterator itNs = def.getNamespaces().keySet().iterator(); itNs.hasNext();) {
+            String key = (String) itNs.next();
+            String val = def.getNamespace(key);
+            flat.addNamespace(key, val);
+        }
+        for (Iterator itImport = def.getImports().values().iterator(); itImport.hasNext();) {
+            List defImports = (List) itImport.next();
+            for (Iterator iter = defImports.iterator(); iter.hasNext();) {
+                Import defImport = (Import) iter.next();
+                addNamespaces(flat, defImport.getDefinition());
+            }
+        }
+    }
+    
+    private Message copyMessage(Message defMessage, Definition flat) {
+        Message flatMsg = flat.createMessage();
+        flatMsg.setUndefined(false);
+        if (defMessage.getQName() != null) {
+            flatMsg.setQName(new QName(flat.getTargetNamespace(), defMessage.getQName().getLocalPart()));
+        }
+        for (Iterator itPart = defMessage.getParts().values().iterator(); itPart.hasNext();) {
+            Part defPart = (Part) itPart.next();
+            Part flatPart = flat.createPart();
+            flatPart.setName(defPart.getName());
+            flatPart.setElementName(defPart.getElementName());
+            flatMsg.addPart(flatPart);
+        }
+        return flatMsg;
+    }
+
+}

Added: incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattenerTest.java
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattenerTest.java?rev=392282&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattenerTest.java (added)
+++ incubator/servicemix/trunk/servicemix-common/src/test/java/org/apache/servicemix/common/tools/wsdl/WSDLFlattenerTest.java Fri Apr  7 06:19:50 2006
@@ -0,0 +1,47 @@
+package org.apache.servicemix.common.tools.wsdl;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.net.URL;
+
+import javax.wsdl.Definition;
+import javax.wsdl.PortType;
+import javax.wsdl.factory.WSDLFactory;
+import javax.wsdl.xml.WSDLReader;
+import javax.wsdl.xml.WSDLWriter;
+import javax.xml.namespace.QName;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+
+import junit.framework.TestCase;
+
+public class WSDLFlattenerTest extends TestCase {
+
+    public void test() throws Exception {
+        URL resource = getClass().getClassLoader().getResource("wsn/wsn.wsdl");
+        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
+        Definition definition = reader.readWSDL(null, resource.toString());
+        WSDLFlattener flattener = new WSDLFlattener(definition);
+        
+        Definition flat = flattener.getDefinition(new QName("http://docs.oasis-open.org/wsn/brw-2", "NotificationBroker"));
+        assertNotNull(flat);
+        
+        // Check that the definition is really standalone
+        ByteArrayOutputStream baos = new ByteArrayOutputStream();
+        WSDLWriter writer = WSDLFactory.newInstance().newWSDLWriter();
+        writer.writeWSDL(flat, baos);
+        
+        System.err.println(baos.toString());
+        
+        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
+        factory.setNamespaceAware(true);
+        Document description = factory.newDocumentBuilder().parse(new ByteArrayInputStream(baos.toByteArray()));
+        Definition newFlat = WSDLFactory.newInstance().newWSDLReader().readWSDL(null, description);
+        assertNotNull(newFlat);
+        assertEquals(1, newFlat.getPortTypes().size());
+        PortType portType = (PortType) newFlat.getPortTypes().values().iterator().next();
+        assertNotNull(portType);
+    }
+    
+}

Added: incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/b-2.xsd
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/b-2.xsd?rev=392282&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/b-2.xsd (added)
+++ incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/b-2.xsd Fri Apr  7 06:19:50 2006
@@ -0,0 +1,569 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
+
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
+
+Copyright (C) OASIS Open (2004-2005). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. 
+
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. 
+
+This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+-->
+
+<xsd:schema 
+  targetNamespace="http://docs.oasis-open.org/wsn/b-2"   
+  xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
+  xmlns:wsa="http://www.w3.org/2005/08/addressing"
+  xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2"
+  xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
+xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+  elementFormDefault="qualified"  attributeFormDefault="unqualified">
+
+<!-- ======================== Imports  ============================ -->
+  
+  <xsd:import namespace="http://www.w3.org/2005/08/addressing"
+              schemaLocation="ws-addr.xsd" 
+  />
+
+  <xsd:import namespace="http://docs.oasis-open.org/wsrf/bf-2"
+              schemaLocation="bf-2.xsd" 
+  />
+  <xsd:import namespace="http://docs.oasis-open.org/wsn/t-1"
+              schemaLocation="t-1.xsd" 
+  />
+  
+<!-- ===================== Misc. Helper Types ===================== -->
+
+  <xsd:complexType name="QueryExpressionType" mixed="true">
+    <xsd:sequence>
+      <xsd:any minOccurs="0" maxOccurs="1" processContents="lax" />
+    </xsd:sequence>
+    <xsd:attribute name="Dialect" type="xsd:anyURI" use="required"/>
+  </xsd:complexType>
+
+  <xsd:complexType name="TopicExpressionType" mixed="true">
+    <xsd:sequence>
+      <xsd:any minOccurs="0" maxOccurs="1" processContents="lax" />
+    </xsd:sequence>
+    <xsd:attribute name="Dialect" type="xsd:anyURI" use="required" />
+    <xsd:anyAttribute/>
+  </xsd:complexType>
+
+  <xsd:complexType name="FilterType">
+    <xsd:sequence>
+      <xsd:any minOccurs="0" maxOccurs="unbounded"/>
+    </xsd:sequence>
+  </xsd:complexType>
+
+  <xsd:complexType name="SubscriptionPolicyType">
+    <xsd:sequence>
+      <xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/>
+    </xsd:sequence>
+  </xsd:complexType>
+
+<!-- =============== Resource Property Related  =================== -->
+<!-- ======== Resource Properties for NotificationProducer ======== -->
+  <xsd:element name="TopicExpression" type="wsnt:TopicExpressionType"/>
+  <xsd:element name="FixedTopicSet" type="xsd:boolean" default="true"/>
+  <xsd:element name="TopicExpressionDialect" type="xsd:anyURI"/>
+              
+  <xsd:element name="NotificationProducerRP">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="wsnt:TopicExpression"        
+                     minOccurs="0" maxOccurs="unbounded" />
+        <xsd:element ref="wsnt:FixedTopicSet"        
+                     minOccurs="0" maxOccurs="1" />
+        <xsd:element ref="wsnt:TopicExpressionDialect"
+                     minOccurs="0" maxOccurs="unbounded" />
+        <xsd:element ref="wstop:TopicSet"
+                     minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+<!-- ======== Resource Properties for SubscriptionManager ========= -->       
+  <xsd:element name="ConsumerReference" 
+               type="wsa:EndpointReferenceType" />
+  <xsd:element name="Filter" type="wsnt:FilterType" />
+  <xsd:element name="SubscriptionPolicy"                                                                                                                                                                   		      type="wsnt:SubscriptionPolicyType" />
+
+
+  <xsd:element name="CreationTime" type="xsd:dateTime" />
+  
+  <xsd:element name="SubscriptionManagerRP" >
+    <xsd:complexType>
+      <xsd:sequence>
+         <xsd:element ref="wsnt:ConsumerReference"        
+                      minOccurs="1" maxOccurs="1" />
+         <xsd:element ref="wsnt:Filter"
+                      minOccurs="0" maxOccurs="1" />
+         <xsd:element ref="wsnt:SubscriptionPolicy" 
+                      minOccurs="0" maxOccurs="1" />
+         <xsd:element ref="wsnt:CreationTime" 
+                      minOccurs="0" maxOccurs="1" />
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+<!-- ================= Notification Metadata  ===================== -->
+  <xsd:element name="SubscriptionReference" 
+               type="wsa:EndpointReferenceType" />
+  <xsd:element name="Topic" 
+               type="wsnt:TopicExpressionType" />
+  <xsd:element name="ProducerReference" 
+               type="wsa:EndpointReferenceType" />
+
+<!-- ================== Message Helper Types  ===================== -->
+  <xsd:complexType name="NotificationMessageHolderType" >
+    <xsd:sequence>
+      <xsd:element ref="wsnt:SubscriptionReference" 
+                   minOccurs="0" maxOccurs="1" />
+      <xsd:element ref="wsnt:Topic" 
+                   minOccurs="0" maxOccurs="1" />
+      <xsd:element ref="wsnt:ProducerReference" 
+                   minOccurs="0" maxOccurs="1" />
+      <xsd:element name="Message">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:any namespace="##any" processContents="lax"
+                     minOccurs="1" maxOccurs="1"/>
+          </xsd:sequence>
+        </xsd:complexType>
+      </xsd:element>
+    </xsd:sequence>
+  </xsd:complexType>
+  <xsd:element name="NotificationMessage"
+               type="wsnt:NotificationMessageHolderType"/>
+
+<!-- ========== Message Types for NotificationConsumer  =========== -->
+  <xsd:element name="Notify" >
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="wsnt:NotificationMessage"
+                     minOccurs="1" maxOccurs="unbounded" />
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+<!-- ========== Message Types for NotificationProducer  =========== -->
+
+  <xsd:simpleType name="AbsoluteOrRelativeTimeType">
+    <xsd:union memberTypes="xsd:dateTime xsd:duration" />
+  </xsd:simpleType>
+
+  <xsd:element name="CurrentTime" type="xsd:dateTime" />
+
+  <xsd:element name="TerminationTime" 
+               nillable="true" type="xsd:dateTime" />
+
+  <xsd:element name="ProducerProperties"
+               type="wsnt:QueryExpressionType" />
+
+  <xsd:element name="MessageContent"
+               type="wsnt:QueryExpressionType" />
+
+  <xsd:element name="UseRaw"><xsd:complexType/></xsd:element>
+
+  <xsd:element name="Subscribe" >
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element name="ConsumerReference" 
+                     type="wsa:EndpointReferenceType"
+                     minOccurs="1" maxOccurs="1" />
+        <xsd:element name="Filter" 
+                     type="wsnt:FilterType" 
+                     minOccurs="0" maxOccurs="1" />
+        <xsd:element name="InitialTerminationTime" 
+                     type="wsnt:AbsoluteOrRelativeTimeType"
+                     nillable="true"
+                     minOccurs="0" maxOccurs="1" />
+        <xsd:element name="SubscriptionPolicy"
+                     minOccurs="0" maxOccurs="1">
+          <xsd:complexType>
+            <xsd:sequence>
+              <xsd:any namespace="##any" processContents="lax"
+                       minOccurs="0" maxOccurs="unbounded"/>
+            </xsd:sequence>
+          </xsd:complexType>
+        </xsd:element>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+        
+  <xsd:element name="SubscribeResponse">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element name="SubscriptionReference" 
+                     type="wsa:EndpointReferenceType"
+                     minOccurs="1" maxOccurs="1" />
+        <xsd:element ref="wsnt:CurrentTime"
+                     minOccurs="0" maxOccurs="1" />
+        <xsd:element ref="wsnt:TerminationTime"
+                     minOccurs="0" maxOccurs="1" />
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+                  
+  <xsd:element name="GetCurrentMessage">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element name="Topic" 
+                     type="wsnt:TopicExpressionType" />
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="GetCurrentMessageResponse">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:complexType name="SubscribeCreationFailedFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="SubscribeCreationFailedFault" 
+               type="wsnt:SubscribeCreationFailedFaultType"/>
+
+  <xsd:complexType name="InvalidFilterFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType">
+        <xsd:sequence>
+          <xsd:element name="UnknownFilter" type="xsd:QName"
+                       minOccurs="1" maxOccurs="unbounded"/>
+        </xsd:sequence>
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="InvalidFilterFault"
+               type="wsnt:InvalidFilterFaultType"/>
+
+  <xsd:complexType name="TopicExpressionDialectUnknownFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="TopicExpressionDialectUnknownFault" 
+               type="wsnt:TopicExpressionDialectUnknownFaultType"/>
+
+  <xsd:complexType name="InvalidTopicExpressionFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="InvalidTopicExpressionFault" 
+               type="wsnt:InvalidTopicExpressionFaultType"/>
+
+  <xsd:complexType name="TopicNotSupportedFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="TopicNotSupportedFault" 
+               type="wsnt:TopicNotSupportedFaultType"/>
+
+  <xsd:complexType name="MultipleTopicsSpecifiedFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="MultipleTopicsSpecifiedFault" 
+               type="wsnt:MultipleTopicsSpecifiedFaultType"/>
+
+  <xsd:complexType name="InvalidProducerPropertiesExpressionFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="InvalidProducerPropertiesExpressionFault" 
+             type="wsnt:InvalidProducerPropertiesExpressionFaultType"/>
+
+  <xsd:complexType name="InvalidMessageContentExpressionFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="InvalidMessageContentExpressionFault" 
+             type="wsnt:InvalidMessageContentExpressionFaultType"/>
+
+  <xsd:complexType name="UnrecognizedPolicyRequestFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType">
+		<xsd:sequence>
+             <xsd:element name="UnrecognizedPolicy" type="xsd:QName"
+                           minOccurs="0" maxOccurs="unbounded"/>
+         </xsd:sequence>
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="UnrecognizedPolicyRequestFault" 
+             type="wsnt:UnrecognizedPolicyRequestFaultType"/>
+
+  <xsd:complexType name="UnsupportedPolicyRequestFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType">
+		<xsd:sequence>
+             <xsd:element name="UnsupportedPolicy" type="xsd:QName"
+                           minOccurs="0" maxOccurs="unbounded"/>
+         </xsd:sequence>
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="UnsupportedPolicyRequestFault" 
+             type="wsnt:UnsupportedPolicyRequestFaultType"/>
+
+  <xsd:complexType name="NotifyMessageNotSupportedFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="NotifyMessageNotSupportedFault" 
+             type="wsnt:NotifyMessageNotSupportedFaultType"/>
+
+  <xsd:complexType name="UnacceptableInitialTerminationTimeFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType">
+        <xsd:sequence>
+          <xsd:element name="MinimumTime" type="xsd:dateTime"/>
+          <xsd:element name="MaximumTime" type="xsd:dateTime"
+              minOccurs="0"/>
+        </xsd:sequence>
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="UnacceptableInitialTerminationTimeFault"
+              type="wsnt:UnacceptableInitialTerminationTimeFaultType"/>
+
+  <xsd:complexType name="NoCurrentMessageOnTopicFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="NoCurrentMessageOnTopicFault" 
+               type="wsnt:NoCurrentMessageOnTopicFaultType"/>
+
+<!-- ======== Message Types for PullPoint  ======================== -->
+  <xsd:element name="GetMessages">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element name="MaximumNumber" 
+                     type="xsd:nonNegativeInteger"/>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+      <xsd:anyAttribute/>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="GetMessagesResponse">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="wsnt:NotificationMessage" 
+                     minOccurs="0" maxOccurs="unbounded" />
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+      <xsd:anyAttribute/>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="DestroyPullPoint">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+      <xsd:anyAttribute/>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="DestroyPullPointResponse">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+      <xsd:anyAttribute/>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:complexType name="UnableToDestroyPullPointFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="UnableToDestroyPullPointFault" 
+               type="wsnt:UnableToDestroyPullPointFaultType"/>
+
+<!-- ======== Message Types for Create PullPoint  ================= -->
+  <xsd:element name="CreatePullPoint">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+      <xsd:anyAttribute/>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="CreatePullPointResponse">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element name="PullPoint"
+                     type="wsa:EndpointReferenceType"/>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+      <xsd:anyAttribute/>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:complexType name="UnableToCreatePullPointFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="UnableToCreatePullPointFault" 
+               type="wsnt:UnableToCreatePullPointFaultType"/>
+
+<!-- ======== Message Types for Base SubscriptionManager  ========= -->
+  <xsd:element name="Renew">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element name="TerminationTime" 
+                     type="wsnt:AbsoluteOrRelativeTimeType"
+                     nillable="true"
+                     minOccurs="1" maxOccurs="1" />
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="RenewResponse">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:element ref="wsnt:TerminationTime" 
+                      minOccurs="1" maxOccurs="1" />
+        <xsd:element ref="wsnt:CurrentTime" 
+                      minOccurs="0" maxOccurs="1" />
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:complexType name="UnacceptableTerminationTimeFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType">
+        <xsd:sequence>
+          <xsd:element name="MinimumTime" type="xsd:dateTime"/>
+          <xsd:element name="MaximumTime" type="xsd:dateTime"
+              minOccurs="0"/>
+        </xsd:sequence>
+      </xsd:extension>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="UnacceptableTerminationTimeFault"
+              type="wsnt:UnacceptableTerminationTimeFaultType"/>
+
+  <xsd:element name="Unsubscribe">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="UnsubscribeResponse">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:complexType name="UnableToDestroySubscriptionFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="UnableToDestroySubscriptionFault" 
+               type="wsnt:UnableToDestroySubscriptionFaultType"/>
+
+<!-- ====== Message Types for Pausable SubscriptionManager  ======= -->
+
+  <xsd:element name="PauseSubscription">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="PauseSubscriptionResponse" >
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="ResumeSubscription">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="ResumeSubscriptionResponse">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:complexType name="PauseFailedFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="PauseFailedFault" 
+               type="wsnt:PauseFailedFaultType"/>
+
+  <xsd:complexType name="ResumeFailedFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="ResumeFailedFault" 
+               type="wsnt:ResumeFailedFaultType"/>
+
+</xsd:schema>
\ No newline at end of file

Added: incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/bf-2.xsd
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/bf-2.xsd?rev=392282&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/bf-2.xsd (added)
+++ incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/bf-2.xsd Fri Apr  7 06:19:50 2006
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+   OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification, can be obtained from the OASIS Executive Director. 
+
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director. 
+
+Copyright (C) OASIS Open (2005). All Rights Reserved. 
+
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. 
+
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. 
+
+This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 
+-->
+
+<xsd:schema 
+  xmlns="http://www.w3.org/2001/XMLSchema" 
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:wsa="http://www.w3.org/2005/08/addressing"
+  xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2" 
+  elementFormDefault="qualified" attributeFormDefault="unqualified" 
+  targetNamespace=
+    "http://docs.oasis-open.org/wsrf/bf-2">
+  <xsd:import
+     namespace="http://www.w3.org/2005/08/addressing" 
+     schemaLocation="ws-addr.xsd"/>
+              
+  <xsd:import namespace="http://www.w3.org/XML/1998/namespace" 
+              schemaLocation="xml.xsd">
+    <xsd:annotation>
+      <xsd:documentation>
+        Get access to the xml: attribute groups for xml:lang as declared on 'schema'
+        and 'documentation' below
+      </xsd:documentation> 
+    </xsd:annotation>
+  </xsd:import>
+<!-- ====================== BaseFault Types ======================= -->
+      
+  <xsd:element name="BaseFault" type="wsrf-bf:BaseFaultType"/>
+  
+  <xsd:complexType name="BaseFaultType">
+    <xsd:sequence>
+      <xsd:any namespace="##other" processContents="lax"
+              minOccurs="0" maxOccurs="unbounded"/>
+      <xsd:element name="Timestamp" type="xsd:dateTime" 
+               minOccurs="1" maxOccurs="1"/>
+      <xsd:element name="Originator" type="wsa:EndpointReferenceType" 
+               minOccurs="0" maxOccurs="1"/>
+      <xsd:element name="ErrorCode" 
+               minOccurs="0" maxOccurs="1">
+        <xsd:complexType>
+          <xsd:complexContent mixed="true">
+            <xsd:extension base="xsd:anyType">
+              <xsd:attribute name="dialect" type="xsd:anyURI"
+                         use="required"/>
+            </xsd:extension>
+          </xsd:complexContent>
+        </xsd:complexType>      
+      </xsd:element>
+
+      <xsd:element name="Description" 
+               minOccurs="0" maxOccurs="unbounded">
+        <xsd:complexType>
+          <xsd:simpleContent>
+            <xsd:extension base="xsd:string">
+              <xsd:attribute ref="xml:lang" use="optional"/>
+            </xsd:extension>
+          </xsd:simpleContent>
+        </xsd:complexType>
+      </xsd:element>
+      <xsd:element name="FaultCause" minOccurs="0" maxOccurs="1">
+        <xsd:complexType>
+          <xsd:sequence>
+            <xsd:any namespace="##other" processContents="lax" 
+                     minOccurs="1" maxOccurs="1"/>
+          </xsd:sequence>
+        </xsd:complexType> 
+      </xsd:element>
+    </xsd:sequence>
+    <xsd:anyAttribute namespace="##other" processContents="lax"/>
+ </xsd:complexType>
+</xsd:schema>

Added: incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/br-2.xsd
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/br-2.xsd?rev=392282&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/br-2.xsd (added)
+++ incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/br-2.xsd Fri Apr  7 06:19:50 2006
@@ -0,0 +1,180 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
+
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
+
+Copyright (C) OASIS Open (2005). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. 
+
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. 
+
+This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+-->
+
+<xsd:schema 
+  xmlns="http://www.w3.org/2001/XMLSchema" 
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+  xmlns:wsa="http://www.w3.org/2005/08/addressing"
+  xmlns:wsn-br="http://docs.oasis-open.org/wsn/br-2"
+  xmlns:wsn-b="http://docs.oasis-open.org/wsn/b-2"
+  xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2"      
+  xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
+  targetNamespace="http://docs.oasis-open.org/wsn/br-2"   
+  elementFormDefault="qualified"  
+  attributeFormDefault="unqualified">
+
+<!-- ======================== Imports  ============================ -->
+  
+  <xsd:import namespace="http://www.w3.org/2005/08/addressing"
+              schemaLocation="ws-addr.xsd"/>
+
+  <xsd:import namespace="http://docs.oasis-open.org/wsrf/bf-2"
+              schemaLocation="bf-2.xsd"/>
+
+  <xsd:import namespace="http://docs.oasis-open.org/wsn/b-2"
+              schemaLocation="b-2.xsd"/>
+
+	<xsd:import namespace="http://docs.oasis-open.org/wsn/t-1"
+              schemaLocation="t-1.xsd"/>
+
+<!-- ======== Resource Properties for NotificationBroker ========== -->
+   <xsd:element name="RequiresRegistration" type="xsd:boolean"/>         
+
+<!-- ====== Resource Properties for PublisherRegistration ========= -->
+   <xsd:element name="PublisherReference" 
+                      type="wsa:EndpointReferenceType"/>
+	<xsd:element name="ConsumerReference" 
+                      type="wsa:EndpointReferenceType"/>
+   <xsd:element name="Topic"
+                      type="wsn-b:TopicExpressionType"/>
+   <xsd:element name="Demand" 
+                      type="xsd:boolean"/>
+   <xsd:element name="CreationTime" 
+                      type="xsd:dateTime"/>
+<xsd:element name="NotificationBrokerRP">
+            <xsd:complexType>
+               <xsd:sequence>
+         <!-- From NotificationProducer -->
+                  <xsd:element ref="wsn-b:TopicExpression"        
+                     minOccurs="0" maxOccurs="unbounded" />
+        		  <xsd:element ref="wsn-b:FixedTopicSet"        
+                     minOccurs="0" maxOccurs="1" />
+        		  <xsd:element ref="wsn-b:TopicExpressionDialect"
+                     minOccurs="0" maxOccurs="unbounded" />
+                  <xsd:element ref="wstop:TopicSet"
+                     minOccurs="0" maxOccurs="1" />
+         <!-- NotificationBroker specific  -->
+                  <xsd:element ref="wsn-br:RequiresRegistration"        
+                               minOccurs="1" maxOccurs="1" />        
+               </xsd:sequence>
+            </xsd:complexType>
+   </xsd:element>
+ 
+<!-- ====== Resource Properties for PublisherRegistration ========= -->
+   <xsd:element name="PublisherRegistrationRP">
+            <xsd:complexType>
+               <xsd:sequence>
+         <!-- From WS-ResourceLifetime ScheduledResourceTermination -->
+                  <xsd:element ref="wsn-b:CurrentTime"
+                     minOccurs="0" maxOccurs="1" /> 
+                  <xsd:element ref="wsn-b:TerminationTime" 
+                               minOccurs="1" maxOccurs="1" />
+                               
+         <!-- PublisherRegistration specific  -->
+                  <xsd:element ref="wsn-br:PublisherReference"        
+                               minOccurs="0" maxOccurs="1" />
+                  <xsd:element ref="wsn-br:Topic"        
+                               minOccurs="0" maxOccurs="unbounded" />
+                  <xsd:element ref="wsn-br:Demand"        
+                               minOccurs="1" maxOccurs="1" />
+                  <xsd:element ref="wsn-br:CreationTime"        
+                               minOccurs="0" maxOccurs="1" />
+               </xsd:sequence>
+            </xsd:complexType>
+   </xsd:element>
+
+<!-- ========== Message Types for NotificationBroker  ============ -->
+   <xsd:element name="RegisterPublisher">
+            <xsd:complexType>
+               <xsd:sequence>
+                  <xsd:element name="PublisherReference" 
+                               type="wsa:EndpointReferenceType" 
+                               minOccurs="0" maxOccurs="1" />
+                  <xsd:element name="Topic" 
+                               type="wsn-b:TopicExpressionType"
+                               minOccurs="0" maxOccurs="unbounded" />
+                  <xsd:element name="Demand" 
+                               type="xsd:boolean" default="false" 
+                               minOccurs="0" maxOccurs="1" />
+                  <xsd:element name="InitialTerminationTime" 
+                               type="xsd:dateTime"
+                               minOccurs="0" maxOccurs="1" />
+                  <xsd:any namespace="##other" processContents="lax"
+                       minOccurs="0" maxOccurs="unbounded"/>
+               </xsd:sequence>
+            </xsd:complexType>
+   </xsd:element>
+
+   <xsd:element name="RegisterPublisherResponse"> 
+            <xsd:complexType>
+               <xsd:sequence>
+                  <xsd:element name="PublisherRegistrationReference" 
+                               type="wsa:EndpointReferenceType"
+                               minOccurs="1" maxOccurs="1" />
+			  <xsd:element name="ConsumerReference" 
+                               type="wsa:EndpointReferenceType"
+                               minOccurs="0" maxOccurs="1" />
+
+               </xsd:sequence>
+            </xsd:complexType>
+   </xsd:element>
+     
+   <xsd:complexType name="PublisherRegistrationRejectedFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsrf-bf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+   <xsd:element name="PublisherRegistrationRejectedFault" 
+                type="wsn-br:PublisherRegistrationRejectedFaultType"/>
+   
+   <xsd:complexType name="PublisherRegistrationFailedFaultType">
+            <xsd:complexContent>
+               <xsd:extension base="wsrf-bf:BaseFaultType"/>
+            </xsd:complexContent>
+         </xsd:complexType>
+   <xsd:element name="PublisherRegistrationFailedFault" 
+                type="wsn-br:PublisherRegistrationFailedFaultType"/>
+
+  
+
+   <xsd:element name="DestroyRegistration">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+      <xsd:anyAttribute/>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:element name="DestroyRegistrationResponse">
+    <xsd:complexType>
+      <xsd:sequence>
+        <xsd:any namespace="##other" processContents="lax"
+                 minOccurs="0" maxOccurs="unbounded"/>
+      </xsd:sequence>
+      <xsd:anyAttribute/>
+    </xsd:complexType>
+  </xsd:element>
+
+  <xsd:complexType name="ResourceNotDestroyedFaultType">
+    <xsd:complexContent>
+      <xsd:extension base="wsrf-bf:BaseFaultType"/>
+    </xsd:complexContent>
+  </xsd:complexType>
+  <xsd:element name="ResourceNotDestroyedFault" 
+               type="wsn-br:ResourceNotDestroyedFaultType"/>
+
+ </xsd:schema>
\ No newline at end of file

Added: incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/brw-2.wsdl
URL: http://svn.apache.org/viewcvs/incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/brw-2.wsdl?rev=392282&view=auto
==============================================================================
--- incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/brw-2.wsdl (added)
+++ incubator/servicemix/trunk/servicemix-common/src/test/resources/wsn/brw-2.wsdl Fri Apr  7 06:19:50 2006
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- 
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
+
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
+
+Copyright (C) OASIS Open (2005). All Rights Reserved.
+
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English. 
+
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns. 
+
+This document and the information contained herein is provided on an "AS IS" basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+-->
+
+<wsdl:definitions name="WS-BrokeredNotification"
+  xmlns="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:wsa="http://www.w3.org/2005/08/addressing"
+  xmlns:wsn-br="http://docs.oasis-open.org/wsn/br-2" 
+  xmlns:wsn-brw="http://docs.oasis-open.org/wsn/brw-2"
+  xmlns:wsn-b="http://docs.oasis-open.org/wsn/b-2"
+  xmlns:wsn-bw="http://docs.oasis-open.org/wsn/bw-2"
+  xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2"   
+  xmlns:wsrf-rw="http://docs.oasis-open.org/wsrf/rw-2" 
+  targetNamespace="http://docs.oasis-open.org/wsn/brw-2">
+
+<!-- ========================== Imports =========================== -->
+<wsdl:import namespace="http://docs.oasis-open.org/wsrf/rw-2" 
+       location="rw-2.wsdl"/>
+       
+   <wsdl:import namespace="http://docs.oasis-open.org/wsn/bw-2" 
+       location="bw-2.wsdl"/>
+
+<!-- ===================== Types Definitions ====================== -->
+   <wsdl:types>
+     <xsd:schema>
+       <xsd:import
+         namespace="http://docs.oasis-open.org/wsn/br-2" 
+         schemaLocation="br-2.xsd"/>
+     </xsd:schema>
+   </wsdl:types>
+
+<!-- ========== NotificationBroker::RegisterPublisher =============
+   RegisterPublisher(PublisherReference, TopicExpression* ,
+                     [Demand], [InitialTerminationTime])
+   returns: WS-Resource qualified EPR to a PublisherRegistration --> 
+   <wsdl:message name="RegisterPublisherRequest">
+      <wsdl:part name="RegisterPublisherRequest" 
+                 element="wsn-br:RegisterPublisher"/>
+   </wsdl:message>
+
+   <wsdl:message name="RegisterPublisherResponse">
+      <wsdl:part name="RegisterPublisherResponse" 
+                 element="wsn-br:RegisterPublisherResponse"/>
+   </wsdl:message>
+      
+   <wsdl:message name="PublisherRegistrationRejectedFault">
+      <wsdl:part name="PublisherRegistrationRejectedFault"             
+            element="wsn-br:PublisherRegistrationRejectedFault"/>
+   </wsdl:message> 
+
+   <wsdl:message name="PublisherRegistrationFailedFault">
+      <wsdl:part name="PublisherRegistrationFailedFault"
+            element="wsn-br:PublisherRegistrationFailedFault"/>
+   </wsdl:message> 
+
+   <wsdl:message name="DestroyRegistrationRequest">
+      <wsdl:part name="DestroyRegistrationRequest" 
+            element="wsn-br:DestroyRegistration"/>
+   </wsdl:message>
+
+   <wsdl:message name="DestroyRegistrationResponse">
+      <wsdl:part name="DestroyRegistrationResponse"
+            element="wsn-br:DestroyRegistrationResponse"/>
+   </wsdl:message>
+
+   <wsdl:message name="ResourceNotDestroyedFault">
+      <wsdl:part name="ResourceNotDestroyedFault"
+            element="wsn-br:ResourceNotDestroyedFault"/>
+   </wsdl:message> 
+
+<!-- =================== PortType Definitions ===================== -->
+
+<!-- ========== RegisterPublisher ============ -->
+<wsdl:portType name="RegisterPublisher">
+    <wsdl:operation name="RegisterPublisher">
+         <wsdl:input  message="wsn-brw:RegisterPublisherRequest"/>
+         <wsdl:output message="wsn-brw:RegisterPublisherResponse"/>
+         <wsdl:fault  name="ResourceUnknownFault"
+                      message="wsrf-rw:ResourceUnknownFault"/>
+         <wsdl:fault  name="InvalidTopicExpressionFault" 
+                      message="wsn-bw:InvalidTopicExpressionFault"/>
+         <wsdl:fault  name="TopicNotSupportedFault" 
+                      message="wsn-bw:TopicNotSupportedFault"/>
+         <wsdl:fault  name="PublisherRegistrationRejectedFault" 
+                 message="wsn-brw:PublisherRegistrationRejectedFault"/>
+	     <wsdl:fault  name="PublisherRegistrationFailedFault" 
+                 message="wsn-brw:PublisherRegistrationFailedFault"/>
+		<wsdl:fault  name="UnacceptableInitialTerminationTimeFault" 
+             message="wsn-bw:UnacceptableInitialTerminationTimeFault"/>
+    </wsdl:operation>
+  </wsdl:portType>
+
+<!-- ========== NotificationBroker PortType Definition ============ -->
+   <wsdl:portType name="NotificationBroker">
+      <!-- ============= extends NotificationConsumer ============= -->
+      <wsdl:operation name="Notify">
+         <wsdl:input message="wsn-bw:Notify" />
+      </wsdl:operation>
+      
+      <!-- ============= extends NotificationProducer ============= -->
+      <wsdl:operation name="Subscribe">
+         <wsdl:input  message="wsn-bw:SubscribeRequest" />
+         <wsdl:output message="wsn-bw:SubscribeResponse" />
+         <wsdl:fault  name="ResourceUnknownFault" 
+                      message="wsrf-rw:ResourceUnknownFault" />
+         <wsdl:fault  name="InvalidFilterFault" 
+                   message="wsn-bw:InvalidFilterFault"/>
+         <wsdl:fault  name="TopicExpressionDialectUnknownFault" 
+                   message="wsn-bw:TopicExpressionDialectUnknownFault"/>
+         <wsdl:fault  name="InvalidTopicExpressionFault" 
+                      message="wsn-bw:InvalidTopicExpressionFault" />
+         <wsdl:fault  name="TopicNotSupportedFault" 
+                      message="wsn-bw:TopicNotSupportedFault" />
+         <wsdl:fault  name="InvalidProducerPropertiesExpressionFault" 
+             message="wsn-bw:InvalidProducerPropertiesExpressionFault"/>
+         <wsdl:fault  name="InvalidMessageContentExpressionFault" 
+             message="wsn-bw:InvalidMessageContentExpressionFault"/>
+         <wsdl:fault  name="UnacceptableInitialTerminationTimeFault" 
+             message="wsn-bw:UnacceptableInitialTerminationTimeFault"/>
+	      <wsdl:fault  name="UnrecognizedPolicyRequestFault" 
+             message="wsn-bw:UnrecognizedPolicyRequestFault"/>
+         <wsdl:fault  name="UnsupportedPolicyRequestFault" 
+             message="wsn-bw:UnsupportedPolicyRequestFault"/>
+         <wsdl:fault  name="NotifyMessageNotSupportedFault" 
+             message="wsn-bw:NotifyMessageNotSupportedFault"/>
+         <wsdl:fault  name="SubscribeCreationFailedFault" 
+                      message="wsn-bw:SubscribeCreationFailedFault"/>
+      </wsdl:operation>
+      <wsdl:operation name="GetCurrentMessage">
+         <wsdl:input  message="wsn-bw:GetCurrentMessageRequest"/>
+         <wsdl:output message="wsn-bw:GetCurrentMessageResponse"/>
+         <wsdl:fault  name="ResourceUnknownFault" 
+                      message="wsrf-rw:ResourceUnknownFault"/>
+         <wsdl:fault  name="TopicExpressionDialectUnknownFault" 
+                  message="wsn-bw:TopicExpressionDialectUnknownFault"/>
+         <wsdl:fault  name="InvalidTopicExpressionFault" 
+                      message="wsn-bw:InvalidTopicExpressionFault"/>
+         <wsdl:fault  name="TopicNotSupportedFault" 
+                      message="wsn-bw:TopicNotSupportedFault"/>
+         <wsdl:fault  name="NoCurrentMessageOnTopicFault" 
+                      message="wsn-bw:NoCurrentMessageOnTopicFault"/>
+         <wsdl:fault  name="MultipleTopicsSpecifiedFault" 
+                      message="wsn-bw:MultipleTopicsSpecifiedFault"/>
+      </wsdl:operation>
+      
+      <!-- ========= extends RegisterPublisher ======= -->      
+      <wsdl:operation name="RegisterPublisher">
+         <wsdl:input  message="wsn-brw:RegisterPublisherRequest"/>
+         <wsdl:output message="wsn-brw:RegisterPublisherResponse"/>
+         <wsdl:fault  name="ResourceUnknownFault" 
+                      message="wsrf-rw:ResourceUnknownFault"/>
+         <wsdl:fault  name="InvalidTopicExpressionFault" 
+                      message="wsn-bw:InvalidTopicExpressionFault"/>
+         <wsdl:fault  name="TopicNotSupportedFault" 
+                      message="wsn-bw:TopicNotSupportedFault"/>
+         <wsdl:fault  name="PublisherRegistrationRejectedFault" 
+                 message="wsn-brw:PublisherRegistrationRejectedFault"/>
+         <wsdl:fault  name="PublisherRegistrationFailedFault" 
+                   message="wsn-brw:PublisherRegistrationFailedFault"/>
+         <wsdl:fault  name="UnacceptableInitialTerminationTimeFault" 
+             message="wsn-bw:UnacceptableInitialTerminationTimeFault"/>
+      </wsdl:operation>
+
+   </wsdl:portType>
+
+<!-- ===== PublisherRegistrationManager PortType Definition ====== -->
+   <wsdl:portType name="PublisherRegistrationManager">
+      
+   <!--===DestroyRegistration:ImmediateResourceTermination==========-->
+      <wsdl:operation name="DestroyRegistration">
+         <wsdl:input  name="DestroyRegistrationRequest" 
+                      message="wsn-brw:DestroyRegistrationRequest" />
+         <wsdl:output name="DestroyRegistrationResponse" 
+                      message="wsn-brw:DestroyRegistrationResponse" />
+      <wsdl:fault name="ResourceUnknownFault"
+                message="wsrf-rw:ResourceUnknownFault" />
+         <wsdl:fault  name="ResourceNotDestroyedFault" 
+                      message="wsn-brw:ResourceNotDestroyedFault" />
+      </wsdl:operation>
+   </wsdl:portType>
+</wsdl:definitions>
\ No newline at end of file



Mime
View raw message