You are viewing a plain text version of this content. The canonical link for it is here.
Posted to woden-dev@ws.apache.org by jk...@apache.org on 2007/08/23 13:24:56 UTC

svn commit: r568937 [13/17] - in /incubator/woden/trunk/java/test: javax/xml/namespace/ org/apache/woden/ org/apache/woden/ant/ org/apache/woden/internal/ org/apache/woden/internal/wsdl20/validation/ org/apache/woden/resolver/ org/apache/woden/resolver...

Modified: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensionsTest.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensionsTest.java?rev=568937&r1=568936&r2=568937&view=diff
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensionsTest.java (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensionsTest.java Thu Aug 23 04:24:51 2007
@@ -1,157 +1,157 @@
-/**
+/**
  * 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.woden.wsdl20.extensions.soap;
-
-import java.net.URI;
-import java.net.URL;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.apache.woden.ErrorHandler;
-import org.apache.woden.WSDLFactory;
-import org.apache.woden.WSDLReader;
-import org.apache.woden.tests.TestErrorHandler;
-import org.apache.woden.wsdl20.Binding;
-import org.apache.woden.wsdl20.Description;
-import org.apache.woden.wsdl20.extensions.ComponentExtensions;
-
-/**
- * Functional verification test of SoapBindingExtensions.
- * Checks that the expected API behaviour is supported by the implementation.
- * 
- * @author John Kaputin (jkaputin@apache.org)
- */
-public class SOAPBindingExtensionsTest extends TestCase 
-{
-    private WSDLFactory fFactory = null;
-    private WSDLReader fReader = null;
-    private ErrorHandler fHandler = null;
-    private SOAPBindingExtensions fSoapBindExts = null;
-    private SOAPBindingExtensions fSoapBind2Exts = null;
-    
-    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingExtensions.wsdl";
-    
-    public static Test suite()
-    {
-        return new TestSuite(SOAPBindingExtensionsTest.class);
-    }
-    
-    protected void setUp() throws Exception 
-    {
-        fFactory = WSDLFactory.newInstance();
-        fReader = fFactory.newWSDLReader();
-        fHandler = new TestErrorHandler();
-        fReader.getErrorReporter().setErrorHandler(fHandler);
-        
-        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
-        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
-                wsdlURL);
-        
-        Description descComp = fReader.readWSDL(wsdlURL.toString());
-        assertNotNull("The reader did not return a WSDL description.", descComp);
-        
-        Binding binding = descComp.getBindings()[0];
-        assertNotNull("The Description does not contain a Binding.", binding);
-        
-        fSoapBindExts = (SOAPBindingExtensions)binding.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        assertNotNull("The Binding does not contain a SOAPBindingExtensions object.");
-        
-        Binding binding2 = descComp.getBindings()[1];
-        assertNotNull("The Description does not contain a second Binding.", binding2);
-        
-        fSoapBind2Exts = (SOAPBindingExtensions)binding2.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        assertNotNull("The second Binding does not contain a SOAPBindingExtensions object.");
-    }
-    
-    /**
-     * Test that the value for the {soap version} property returned by the <code>getSoapVersion</code> method
-     * matches the expected value parsed from the WSDL.
-     */
-    public void testGetSoapVersion()
-    {
-        String actual = fSoapBindExts.getSoapVersion();
-        assertNotNull("The value for soap version was null", actual);
-        assertEquals("Expected '1.2' for soap version but the actual value was '" + actual + "'.", 
-                "1.2",
-                actual);
-    }
-
-    /**
-     * Test that the value for the {soap underlying protocol} property returned by the <code>getSoapUnderlyingProtocol</code> method
-     * matches the expected value parsed from the WSDL.
-     */
-    public void testGetSoapUnderlyingProtocol()
-    {
-        URI actual = fSoapBindExts.getSoapUnderlyingProtocol();
-        assertNotNull("The value for soap underlying protocol was null", actual);
-        
-        URI expected = URI.create("http://www.w3.org/2003/05/soap/bindings/HTTP/");
-        assertEquals("Unexpected value for soap underlying protocol.", 
-                expected,
-                actual);
-    }
-    
-    /**
-     * Test that the value for the {soap mep default} property returned by the <code>getSoapMepDefault</code> method
-     * matches the expected value parsed from the WSDL.
-     */
-    public void testGetSoapMepDefault()
-    {
-        URI actual = fSoapBindExts.getSoapMepDefault();
-        assertNotNull("The value for soap mep default was null", actual);
-        
-        URI expected = URI.create("http://www.w3.org/2003/05/soap/mep/request-response");
-        assertEquals("Unexpected value for soap mep default.", 
-                expected,
-                actual);
-    }
-    
-    /**
-     * Test that the {soap modules} property returned by the <code>getSoapModules</code> method 
-     * contains the expected number of SOAPModule objects parsed from the WSDL.
-     */
-    public void testGetSoapModules()
-    {
-        SOAPModule[] actual = fSoapBindExts.getSoapModules();
-        assertEquals("Unexpected number of SOAPModule objects.",
-                2,
-                actual.length);
-    }
-    
-    /**
-     * Test that the {http query parameter separator default} property return by the
-     * <code>getHttpQueryParameterSeparatorDefault</code> method matches the value
-     * parsed from the WSDL or that it defaults to ampersand "&" if omitted from the WSDL.
-     */
-    public void testGetHttpQueryParameterSeparatorDefault()
-    {
-        String actual = fSoapBindExts.getHttpQueryParameterSeparatorDefault();
-        assertNotNull("The value for http query parameter separator default was null", actual);
-        assertEquals("Unexpected value for http query parameter separator default.", 
-                "$",
-                actual);
-        
-        String actual2 = fSoapBind2Exts.getHttpQueryParameterSeparatorDefault();
-        assertNotNull("The default value for http query parameter separator default was null", actual2);
-        assertEquals("Unexpected default value for http query parameter separator default.", 
-                "&",
-                actual2);
-    }
-
+ * 
+ *     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.woden.wsdl20.extensions.soap;
+
+import java.net.URI;
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.woden.ErrorHandler;
+import org.apache.woden.WSDLFactory;
+import org.apache.woden.WSDLReader;
+import org.apache.woden.tests.TestErrorHandler;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.Description;
+import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+
+/**
+ * Functional verification test of SoapBindingExtensions.
+ * Checks that the expected API behaviour is supported by the implementation.
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class SOAPBindingExtensionsTest extends TestCase 
+{
+    private WSDLFactory fFactory = null;
+    private WSDLReader fReader = null;
+    private ErrorHandler fHandler = null;
+    private SOAPBindingExtensions fSoapBindExts = null;
+    private SOAPBindingExtensions fSoapBind2Exts = null;
+    
+    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingExtensions.wsdl";
+    
+    public static Test suite()
+    {
+        return new TestSuite(SOAPBindingExtensionsTest.class);
+    }
+    
+    protected void setUp() throws Exception 
+    {
+        fFactory = WSDLFactory.newInstance();
+        fReader = fFactory.newWSDLReader();
+        fHandler = new TestErrorHandler();
+        fReader.getErrorReporter().setErrorHandler(fHandler);
+        
+        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
+        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
+                wsdlURL);
+        
+        Description descComp = fReader.readWSDL(wsdlURL.toString());
+        assertNotNull("The reader did not return a WSDL description.", descComp);
+        
+        Binding binding = descComp.getBindings()[0];
+        assertNotNull("The Description does not contain a Binding.", binding);
+        
+        fSoapBindExts = (SOAPBindingExtensions)binding.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        assertNotNull("The Binding does not contain a SOAPBindingExtensions object.");
+        
+        Binding binding2 = descComp.getBindings()[1];
+        assertNotNull("The Description does not contain a second Binding.", binding2);
+        
+        fSoapBind2Exts = (SOAPBindingExtensions)binding2.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        assertNotNull("The second Binding does not contain a SOAPBindingExtensions object.");
+    }
+    
+    /**
+     * Test that the value for the {soap version} property returned by the <code>getSoapVersion</code> method
+     * matches the expected value parsed from the WSDL.
+     */
+    public void testGetSoapVersion()
+    {
+        String actual = fSoapBindExts.getSoapVersion();
+        assertNotNull("The value for soap version was null", actual);
+        assertEquals("Expected '1.2' for soap version but the actual value was '" + actual + "'.", 
+                "1.2",
+                actual);
+    }
+
+    /**
+     * Test that the value for the {soap underlying protocol} property returned by the <code>getSoapUnderlyingProtocol</code> method
+     * matches the expected value parsed from the WSDL.
+     */
+    public void testGetSoapUnderlyingProtocol()
+    {
+        URI actual = fSoapBindExts.getSoapUnderlyingProtocol();
+        assertNotNull("The value for soap underlying protocol was null", actual);
+        
+        URI expected = URI.create("http://www.w3.org/2003/05/soap/bindings/HTTP/");
+        assertEquals("Unexpected value for soap underlying protocol.", 
+                expected,
+                actual);
+    }
+    
+    /**
+     * Test that the value for the {soap mep default} property returned by the <code>getSoapMepDefault</code> method
+     * matches the expected value parsed from the WSDL.
+     */
+    public void testGetSoapMepDefault()
+    {
+        URI actual = fSoapBindExts.getSoapMepDefault();
+        assertNotNull("The value for soap mep default was null", actual);
+        
+        URI expected = URI.create("http://www.w3.org/2003/05/soap/mep/request-response");
+        assertEquals("Unexpected value for soap mep default.", 
+                expected,
+                actual);
+    }
+    
+    /**
+     * Test that the {soap modules} property returned by the <code>getSoapModules</code> method 
+     * contains the expected number of SOAPModule objects parsed from the WSDL.
+     */
+    public void testGetSoapModules()
+    {
+        SOAPModule[] actual = fSoapBindExts.getSoapModules();
+        assertEquals("Unexpected number of SOAPModule objects.",
+                2,
+                actual.length);
+    }
+    
+    /**
+     * Test that the {http query parameter separator default} property return by the
+     * <code>getHttpQueryParameterSeparatorDefault</code> method matches the value
+     * parsed from the WSDL or that it defaults to ampersand "&" if omitted from the WSDL.
+     */
+    public void testGetHttpQueryParameterSeparatorDefault()
+    {
+        String actual = fSoapBindExts.getHttpQueryParameterSeparatorDefault();
+        assertNotNull("The value for http query parameter separator default was null", actual);
+        assertEquals("Unexpected value for http query parameter separator default.", 
+                "$",
+                actual);
+        
+        String actual2 = fSoapBind2Exts.getHttpQueryParameterSeparatorDefault();
+        assertNotNull("The default value for http query parameter separator default was null", actual2);
+        assertEquals("Unexpected default value for http query parameter separator default.", 
+                "&",
+                actual2);
+    }
+
 }

Propchange: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingExtensionsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensionsTest.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensionsTest.java?rev=568937&r1=568936&r2=568937&view=diff
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensionsTest.java (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensionsTest.java Thu Aug 23 04:24:51 2007
@@ -1,222 +1,222 @@
-/**
+/**
  * 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.woden.wsdl20.extensions.soap;
-
-import java.net.URL;
-import java.util.Arrays;
-
-import javax.xml.namespace.QName;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.apache.woden.ErrorHandler;
-import org.apache.woden.WSDLFactory;
-import org.apache.woden.WSDLReader;
-import org.apache.woden.tests.TestErrorHandler;
-import org.apache.woden.wsdl20.Binding;
-import org.apache.woden.wsdl20.BindingFault;
-import org.apache.woden.wsdl20.Description;
-import org.apache.woden.wsdl20.extensions.ComponentExtensions;
-
-/**
- * Functional verification test of SoapBindingFaultExtensions.
- * Checks that the expected API behaviour is supported by the implementation.
- * 
- * @author John Kaputin (jkaputin@apache.org)
- */
-public class SOAPBindingFaultExtensionsTest extends TestCase 
-{
-    private WSDLFactory fFactory = null;
-    private WSDLReader fReader = null;
-    private ErrorHandler fHandler = null;
-    
-    private Binding fBinding = null;
-    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingFaultExtensions.wsdl";
-    
-    public static Test suite()
-    {
-        return new TestSuite(SOAPBindingFaultExtensionsTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception 
-    {
-        super.setUp();
-        fFactory = WSDLFactory.newInstance();
-        fReader = fFactory.newWSDLReader();
-        fHandler = new TestErrorHandler();
-        fReader.getErrorReporter().setErrorHandler(fHandler);
-        
-        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
-        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
-                wsdlURL);
-        
-        Description descComp = fReader.readWSDL(wsdlURL.toString());
-        assertNotNull("The reader did not return a WSDL description.", descComp);
-        
-        fBinding = descComp.getBindings()[0];
-        assertNotNull("The Description does not contain a Binding.", fBinding);
-        assertEquals("The Binding contains an unexpected number of BindingFaults.", 3, fBinding.getBindingFaults().length);
-    }
-
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-    
-    /**
-     * Test that a <code>wsoap:code</code> extension attribute with a value of type xs:QName is represented 
-     * in the Component model extensions by the expected QName. 
-     */
-    public void testSoapFaultCode_QName()
-    {
-        BindingFault bindFault = fBinding.getBindingFaults()[0];
-        SOAPBindingFaultExtensions soapBindFaultExts = 
-            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
-        
-        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
-        assertTrue("The SOAPFaultCode does not represent a QName.", soapFaultCode.isQName());
-        assertEquals("The QName represented by the SOAPFaultCode is not the expected one.",
-                new QName("http://www.w3.org/2003/05/soap-envelope","fault1"),
-                soapFaultCode.getQName());
-    }
-        
-    /**
-     * Test that a <code>wsoap:code</code> extension attribute with a value of type xs:token "#any" is 
-     * represented in the Component model extensions by SOAPFaultCode.ANY. 
-     */
-    public void testSoapFaultCode_TokenAny()
-    {
-        BindingFault bindFault = fBinding.getBindingFaults()[1];
-        SOAPBindingFaultExtensions soapBindFaultExts = 
-            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
-        
-        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
-        assertEquals("The SOAPFaultCode does not represent the xs:token #any.", 
-                SOAPFaultCode.ANY,
-                soapFaultCode);
-    }
-        
-    /**
-     * Test that if the <code>wsoap:code</code> extension attribute is omitted from the WSDL, the {soap fault code}
-     * property for the corresponding binding fault defaults to token "#any". 
-     * This should be represented in the Component model extensions by SOAPFaultCode.ANY. 
-     */
-    public void testSoapFaultCode_Default()
-    {
-        BindingFault bindFault = fBinding.getBindingFaults()[2];
-        SOAPBindingFaultExtensions soapBindFaultExts = 
-            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
-        
-        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
-        assertEquals("The wsoap:code extension attribute was omitted, so SOAPFaultCode.ANY was expected by default.", 
-                SOAPFaultCode.ANY,
-                soapFaultCode);
-    }
-
-    /**
-     * Test that a <code>wsoap:subcodes</code> extension attribute with a value of type list of xs:QName is represented 
-     * in the Component model extensions by an array of the expected QNames. 
-     */
-    public void testSoapFaultSubcodes_QNames()
-    {
-        BindingFault bindFault = fBinding.getBindingFaults()[0];
-        SOAPBindingFaultExtensions soapBindFaultExts = 
-            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
-        
-        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
-        assertTrue("The SOAPFaultSubcodes does not represent a QName.", soapFaultSubcodes.isQNames());
-        assertTrue("The QNames represented by the SOAPFaultSubcodes are not the expected ones.",
-                   Arrays.equals( soapFaultSubcodes.getQNames(),
-                                  new QName[] {new QName("http://www.w3.org/2003/05/soap-envelope","ABC"),
-                                               new QName("http://www.w3.org/2003/05/soap-envelope","JKL"),
-                                               new QName("http://www.w3.org/2003/05/soap-envelope","XYZ")} )
-                  );
-    }
-
-    /**
-     * Test that a <code>wsoap:subcodes</code> extension attribute with a value of type xs:token "#any" is 
-     * represented in the Component model extensions by SOAPFaultSubcodes.ANY. 
-     */
-    public void testSoapFaultSubcodes_TokenAny()
-    {
-        BindingFault bindFault = fBinding.getBindingFaults()[1];
-        SOAPBindingFaultExtensions soapBindFaultExts = 
-            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
-        
-        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
-        assertEquals("The SOAPFaultSubcodes does not represent the xs:token #any.", 
-                SOAPFaultSubcodes.ANY,
-                soapFaultSubcodes);
-    }
-    
-    /**
-     * Test that if the <code>wsoap:subcodes</code> extension attribute is omitted from the WSDL, the {soap fault subcodes}
-     * property for the corresponding binding fault defaults to token "#any". 
-     * This should be represented in the Component model extensions by SOAPFaultSubcodes.ANY. 
-     */
-    public void testSoapFaultSubcodes_Default()
-    {
-        BindingFault bindFault = fBinding.getBindingFaults()[2];
-        SOAPBindingFaultExtensions soapBindFaultExts = 
-            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
-        
-        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
-        assertEquals("The SOAPFaultSubcodes does not represent the xs:token #any.", 
-                SOAPFaultSubcodes.ANY,
-                soapFaultSubcodes);
-    }
-    
-    /**
-     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
-     * parsed from &lt;wsoap:module&gt; elements within a binding &lt;fault&gt; element.
-     */
-    public void testGetSoapModules()
-    {
-        BindingFault bindFault = fBinding.getBindingFaults()[1];
-        SOAPBindingFaultExtensions soapBindFaultExts = 
-            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPModule[] actual = soapBindFaultExts.getSoapModules();
-        assertEquals("Unexpected number of SOAPModule objects.", 3, actual.length);
-    }
-
-    /**
-     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeaderBlock 
-     * objects parsed from &lt;wsoap:header&lt; elements within a binding &lt;fault&gt; element.
-     */
-    public void testGetSoapHeaders()
-    {
-        BindingFault bindFault = fBinding.getBindingFaults()[2];
-        SOAPBindingFaultExtensions soapBindFaultExts = 
-            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPHeaderBlock[] actual = soapBindFaultExts.getSoapHeaders();
-        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 2, actual.length);
-    }
-
-}
+ * 
+ *     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.woden.wsdl20.extensions.soap;
+
+import java.net.URL;
+import java.util.Arrays;
+
+import javax.xml.namespace.QName;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.woden.ErrorHandler;
+import org.apache.woden.WSDLFactory;
+import org.apache.woden.WSDLReader;
+import org.apache.woden.tests.TestErrorHandler;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.BindingFault;
+import org.apache.woden.wsdl20.Description;
+import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+
+/**
+ * Functional verification test of SoapBindingFaultExtensions.
+ * Checks that the expected API behaviour is supported by the implementation.
+ * 
+ * @author John Kaputin (jkaputin@apache.org)
+ */
+public class SOAPBindingFaultExtensionsTest extends TestCase 
+{
+    private WSDLFactory fFactory = null;
+    private WSDLReader fReader = null;
+    private ErrorHandler fHandler = null;
+    
+    private Binding fBinding = null;
+    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingFaultExtensions.wsdl";
+    
+    public static Test suite()
+    {
+        return new TestSuite(SOAPBindingFaultExtensionsTest.class);
+    }
+
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception 
+    {
+        super.setUp();
+        fFactory = WSDLFactory.newInstance();
+        fReader = fFactory.newWSDLReader();
+        fHandler = new TestErrorHandler();
+        fReader.getErrorReporter().setErrorHandler(fHandler);
+        
+        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
+        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
+                wsdlURL);
+        
+        Description descComp = fReader.readWSDL(wsdlURL.toString());
+        assertNotNull("The reader did not return a WSDL description.", descComp);
+        
+        fBinding = descComp.getBindings()[0];
+        assertNotNull("The Description does not contain a Binding.", fBinding);
+        assertEquals("The Binding contains an unexpected number of BindingFaults.", 3, fBinding.getBindingFaults().length);
+    }
+
+    /*
+     * @see TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+    
+    /**
+     * Test that a <code>wsoap:code</code> extension attribute with a value of type xs:QName is represented 
+     * in the Component model extensions by the expected QName. 
+     */
+    public void testSoapFaultCode_QName()
+    {
+        BindingFault bindFault = fBinding.getBindingFaults()[0];
+        SOAPBindingFaultExtensions soapBindFaultExts = 
+            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
+        
+        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
+        assertTrue("The SOAPFaultCode does not represent a QName.", soapFaultCode.isQName());
+        assertEquals("The QName represented by the SOAPFaultCode is not the expected one.",
+                new QName("http://www.w3.org/2003/05/soap-envelope","fault1"),
+                soapFaultCode.getQName());
+    }
+        
+    /**
+     * Test that a <code>wsoap:code</code> extension attribute with a value of type xs:token "#any" is 
+     * represented in the Component model extensions by SOAPFaultCode.ANY. 
+     */
+    public void testSoapFaultCode_TokenAny()
+    {
+        BindingFault bindFault = fBinding.getBindingFaults()[1];
+        SOAPBindingFaultExtensions soapBindFaultExts = 
+            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
+        
+        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
+        assertEquals("The SOAPFaultCode does not represent the xs:token #any.", 
+                SOAPFaultCode.ANY,
+                soapFaultCode);
+    }
+        
+    /**
+     * Test that if the <code>wsoap:code</code> extension attribute is omitted from the WSDL, the {soap fault code}
+     * property for the corresponding binding fault defaults to token "#any". 
+     * This should be represented in the Component model extensions by SOAPFaultCode.ANY. 
+     */
+    public void testSoapFaultCode_Default()
+    {
+        BindingFault bindFault = fBinding.getBindingFaults()[2];
+        SOAPBindingFaultExtensions soapBindFaultExts = 
+            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPFaultCode soapFaultCode = soapBindFaultExts.getSoapFaultCode();
+        
+        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultCode.", soapFaultCode);
+        assertEquals("The wsoap:code extension attribute was omitted, so SOAPFaultCode.ANY was expected by default.", 
+                SOAPFaultCode.ANY,
+                soapFaultCode);
+    }
+
+    /**
+     * Test that a <code>wsoap:subcodes</code> extension attribute with a value of type list of xs:QName is represented 
+     * in the Component model extensions by an array of the expected QNames. 
+     */
+    public void testSoapFaultSubcodes_QNames()
+    {
+        BindingFault bindFault = fBinding.getBindingFaults()[0];
+        SOAPBindingFaultExtensions soapBindFaultExts = 
+            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
+        
+        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
+        assertTrue("The SOAPFaultSubcodes does not represent a QName.", soapFaultSubcodes.isQNames());
+        assertTrue("The QNames represented by the SOAPFaultSubcodes are not the expected ones.",
+                   Arrays.equals( soapFaultSubcodes.getQNames(),
+                                  new QName[] {new QName("http://www.w3.org/2003/05/soap-envelope","ABC"),
+                                               new QName("http://www.w3.org/2003/05/soap-envelope","JKL"),
+                                               new QName("http://www.w3.org/2003/05/soap-envelope","XYZ")} )
+                  );
+    }
+
+    /**
+     * Test that a <code>wsoap:subcodes</code> extension attribute with a value of type xs:token "#any" is 
+     * represented in the Component model extensions by SOAPFaultSubcodes.ANY. 
+     */
+    public void testSoapFaultSubcodes_TokenAny()
+    {
+        BindingFault bindFault = fBinding.getBindingFaults()[1];
+        SOAPBindingFaultExtensions soapBindFaultExts = 
+            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
+        
+        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
+        assertEquals("The SOAPFaultSubcodes does not represent the xs:token #any.", 
+                SOAPFaultSubcodes.ANY,
+                soapFaultSubcodes);
+    }
+    
+    /**
+     * Test that if the <code>wsoap:subcodes</code> extension attribute is omitted from the WSDL, the {soap fault subcodes}
+     * property for the corresponding binding fault defaults to token "#any". 
+     * This should be represented in the Component model extensions by SOAPFaultSubcodes.ANY. 
+     */
+    public void testSoapFaultSubcodes_Default()
+    {
+        BindingFault bindFault = fBinding.getBindingFaults()[2];
+        SOAPBindingFaultExtensions soapBindFaultExts = 
+            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPFaultSubcodes soapFaultSubcodes = soapBindFaultExts.getSoapFaultSubcodes();
+        
+        assertNotNull("The SOAPBindingFaultExtensions did not return a SOAPFaultSubcodes.", soapFaultSubcodes);
+        assertEquals("The SOAPFaultSubcodes does not represent the xs:token #any.", 
+                SOAPFaultSubcodes.ANY,
+                soapFaultSubcodes);
+    }
+    
+    /**
+     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
+     * parsed from &lt;wsoap:module&gt; elements within a binding &lt;fault&gt; element.
+     */
+    public void testGetSoapModules()
+    {
+        BindingFault bindFault = fBinding.getBindingFaults()[1];
+        SOAPBindingFaultExtensions soapBindFaultExts = 
+            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPModule[] actual = soapBindFaultExts.getSoapModules();
+        assertEquals("Unexpected number of SOAPModule objects.", 3, actual.length);
+    }
+
+    /**
+     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeaderBlock 
+     * objects parsed from &lt;wsoap:header&lt; elements within a binding &lt;fault&gt; element.
+     */
+    public void testGetSoapHeaders()
+    {
+        BindingFault bindFault = fBinding.getBindingFaults()[2];
+        SOAPBindingFaultExtensions soapBindFaultExts = 
+            (SOAPBindingFaultExtensions) bindFault.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPHeaderBlock[] actual = soapBindFaultExts.getSoapHeaders();
+        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 2, actual.length);
+    }
+
+}

Propchange: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultExtensionsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsTest.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsTest.java?rev=568937&r1=568936&r2=568937&view=diff
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsTest.java (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsTest.java Thu Aug 23 04:24:51 2007
@@ -1,127 +1,127 @@
-/**
+/**
  * 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.woden.wsdl20.extensions.soap;
-
-import java.net.URL;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.apache.woden.ErrorHandler;
-import org.apache.woden.WSDLFactory;
-import org.apache.woden.WSDLReader;
-import org.apache.woden.tests.TestErrorHandler;
-import org.apache.woden.wsdl20.Binding;
-import org.apache.woden.wsdl20.BindingFaultReference;
-import org.apache.woden.wsdl20.BindingOperation;
-import org.apache.woden.wsdl20.Description;
-import org.apache.woden.wsdl20.InterfaceFaultReference;
-import org.apache.woden.wsdl20.enumeration.Direction;
-import org.apache.woden.wsdl20.extensions.ComponentExtensions;
-
-/**
- * Functional verification test of SoapBindingFaultReferenceExtensions.
- * Checks that the expected API behaviour is supported by the implementation.
- * 
- * @author jkaputin@apache.org
- */
-public class SOAPBindingFaultReferenceExtensionsTest extends TestCase 
-{
-    private WSDLFactory fFactory = null;
-    private WSDLReader fReader = null;
-    private ErrorHandler fHandler = null;
-    
-    private BindingOperation fBindOper = null;
-    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingFaultReferenceExtensions.wsdl";
-    
-    public static Test suite()
-    {
-        return new TestSuite(SOAPBindingFaultReferenceExtensionsTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception 
-    {
-        super.setUp();
-        fFactory = WSDLFactory.newInstance();
-        fReader = fFactory.newWSDLReader();
-        fHandler = new TestErrorHandler();
-        fReader.getErrorReporter().setErrorHandler(fHandler);
-        
-        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
-        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
-                wsdlURL);
-        
-        Description descComp = fReader.readWSDL(wsdlURL.toString());
-        assertNotNull("The reader did not return a WSDL description.", descComp);
-        
-        Binding binding = descComp.getBindings()[0];
-        assertNotNull("The Description does not contain a Binding.", binding);
-        fBindOper = binding.getBindingOperations()[0];
-        assertNotNull("The Binding does not contain a BindingOperation.", fBindOper);
-    }
-
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-    
-        
-    /**
-     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
-     * parsed from &lt;wsoap:module&gt; elements within an &lt;infault&gt; element.
-     */
-    public void testGetSoapModules_infault()
-    {
-        BindingFaultReference bindFaultRef = fBindOper.getBindingFaultReferences()[0];
-        assertNotNull("The BindingOperation does not contain a BindingFaultReference.", bindFaultRef);
-
-        InterfaceFaultReference intFaultRef = bindFaultRef.getInterfaceFaultReference();
-        Direction direction = intFaultRef.getDirection();
-        assertTrue("The BindingFaultReference does not represent an <infault> element.", Direction.IN.equals(direction));
-
-        SOAPBindingFaultReferenceExtensions soapBindFaultRefExts = 
-            (SOAPBindingFaultReferenceExtensions) bindFaultRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPModule[] actual = soapBindFaultRefExts.getSoapModules();
-        assertEquals("Unexpected number of SOAPModule objects.", 2, actual.length);
-    }
-
-    /**
-     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
-     * parsed from &lt;wsoap:module&gt; elements within an &lt;outfault&gt; element.
-     */
-    public void testGetSoapModules_outfault()
-    {
-        BindingFaultReference bindFaultRef = fBindOper.getBindingFaultReferences()[1];
-        assertNotNull("The BindingOperation does not contain a second BindingFaultReference.", bindFaultRef);
-
-        InterfaceFaultReference intFaultRef = bindFaultRef.getInterfaceFaultReference();
-        Direction direction = intFaultRef.getDirection();
-        assertTrue("The BindingFaultReference does not represent an <outfault> element.", Direction.OUT.equals(direction));
-
-        SOAPBindingFaultReferenceExtensions soapBindFaultRefExts = 
-            (SOAPBindingFaultReferenceExtensions) bindFaultRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPModule[] actual = soapBindFaultRefExts.getSoapModules();
-        assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
-    }
-
-}
+ * 
+ *     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.woden.wsdl20.extensions.soap;
+
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.woden.ErrorHandler;
+import org.apache.woden.WSDLFactory;
+import org.apache.woden.WSDLReader;
+import org.apache.woden.tests.TestErrorHandler;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.BindingFaultReference;
+import org.apache.woden.wsdl20.BindingOperation;
+import org.apache.woden.wsdl20.Description;
+import org.apache.woden.wsdl20.InterfaceFaultReference;
+import org.apache.woden.wsdl20.enumeration.Direction;
+import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+
+/**
+ * Functional verification test of SoapBindingFaultReferenceExtensions.
+ * Checks that the expected API behaviour is supported by the implementation.
+ * 
+ * @author jkaputin@apache.org
+ */
+public class SOAPBindingFaultReferenceExtensionsTest extends TestCase 
+{
+    private WSDLFactory fFactory = null;
+    private WSDLReader fReader = null;
+    private ErrorHandler fHandler = null;
+    
+    private BindingOperation fBindOper = null;
+    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingFaultReferenceExtensions.wsdl";
+    
+    public static Test suite()
+    {
+        return new TestSuite(SOAPBindingFaultReferenceExtensionsTest.class);
+    }
+
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception 
+    {
+        super.setUp();
+        fFactory = WSDLFactory.newInstance();
+        fReader = fFactory.newWSDLReader();
+        fHandler = new TestErrorHandler();
+        fReader.getErrorReporter().setErrorHandler(fHandler);
+        
+        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
+        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
+                wsdlURL);
+        
+        Description descComp = fReader.readWSDL(wsdlURL.toString());
+        assertNotNull("The reader did not return a WSDL description.", descComp);
+        
+        Binding binding = descComp.getBindings()[0];
+        assertNotNull("The Description does not contain a Binding.", binding);
+        fBindOper = binding.getBindingOperations()[0];
+        assertNotNull("The Binding does not contain a BindingOperation.", fBindOper);
+    }
+
+    /*
+     * @see TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+    
+        
+    /**
+     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
+     * parsed from &lt;wsoap:module&gt; elements within an &lt;infault&gt; element.
+     */
+    public void testGetSoapModules_infault()
+    {
+        BindingFaultReference bindFaultRef = fBindOper.getBindingFaultReferences()[0];
+        assertNotNull("The BindingOperation does not contain a BindingFaultReference.", bindFaultRef);
+
+        InterfaceFaultReference intFaultRef = bindFaultRef.getInterfaceFaultReference();
+        Direction direction = intFaultRef.getDirection();
+        assertTrue("The BindingFaultReference does not represent an <infault> element.", Direction.IN.equals(direction));
+
+        SOAPBindingFaultReferenceExtensions soapBindFaultRefExts = 
+            (SOAPBindingFaultReferenceExtensions) bindFaultRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPModule[] actual = soapBindFaultRefExts.getSoapModules();
+        assertEquals("Unexpected number of SOAPModule objects.", 2, actual.length);
+    }
+
+    /**
+     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
+     * parsed from &lt;wsoap:module&gt; elements within an &lt;outfault&gt; element.
+     */
+    public void testGetSoapModules_outfault()
+    {
+        BindingFaultReference bindFaultRef = fBindOper.getBindingFaultReferences()[1];
+        assertNotNull("The BindingOperation does not contain a second BindingFaultReference.", bindFaultRef);
+
+        InterfaceFaultReference intFaultRef = bindFaultRef.getInterfaceFaultReference();
+        Direction direction = intFaultRef.getDirection();
+        assertTrue("The BindingFaultReference does not represent an <outfault> element.", Direction.OUT.equals(direction));
+
+        SOAPBindingFaultReferenceExtensions soapBindFaultRefExts = 
+            (SOAPBindingFaultReferenceExtensions) bindFaultRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPModule[] actual = soapBindFaultRefExts.getSoapModules();
+        assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
+    }
+
+}

Propchange: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingFaultReferenceExtensionsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java?rev=568937&r1=568936&r2=568937&view=diff
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java Thu Aug 23 04:24:51 2007
@@ -1,157 +1,157 @@
-/**
+/**
  * 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.woden.wsdl20.extensions.soap;
-
-import java.net.URL;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.apache.woden.ErrorHandler;
-import org.apache.woden.WSDLFactory;
-import org.apache.woden.WSDLReader;
-import org.apache.woden.tests.TestErrorHandler;
-import org.apache.woden.wsdl20.Binding;
-import org.apache.woden.wsdl20.BindingMessageReference;
-import org.apache.woden.wsdl20.BindingOperation;
-import org.apache.woden.wsdl20.Description;
-import org.apache.woden.wsdl20.enumeration.Direction;
-import org.apache.woden.wsdl20.extensions.ComponentExtensions;
-import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
-
-/**
- * Functional verification test of SoapBindingMessageReferenceExtensions.
- * Checks that the expected API behaviour is supported by the implementation.
- * 
- * @author jkaputin@apache.org
- */
-public class SOAPBindingMessageReferenceExtensionsTest extends TestCase 
-{
-    private WSDLFactory fFactory = null;
-    private WSDLReader fReader = null;
-    private ErrorHandler fHandler = null;
-    
-    private BindingOperation fBindOper = null;
-    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingMessageReferenceExtensions.wsdl";
-    
-    public static Test suite()
-    {
-        return new TestSuite(SOAPBindingMessageReferenceExtensionsTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception 
-    {
-        super.setUp();
-        fFactory = WSDLFactory.newInstance();
-        fReader = fFactory.newWSDLReader();
-        fHandler = new TestErrorHandler();
-        fReader.getErrorReporter().setErrorHandler(fHandler);
-        
-        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
-        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
-                wsdlURL);
-        
-        Description descComp = fReader.readWSDL(wsdlURL.toString());
-        assertNotNull("The reader did not return a WSDL description.", descComp);
-        
-        Binding binding = descComp.getBindings()[0];
-        assertNotNull("The Description does not contain a Binding.", binding);
-        fBindOper = binding.getBindingOperations()[0];
-        assertNotNull("The Binding does not contain a BindingOperation.", fBindOper);
-    }
-
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-    
-        
-    /**
-     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
-     * parsed from &lt;wsoap:module&gt; elements within an &lt;input&gt; element.
-     */
-    public void testGetSoapModules_input()
-    {
-        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[0];
-        assertNotNull("The BindingOperation does not contain a BindingMessageReference.", bindMsgRef);
-
-        BindingMessageReferenceElement bindMsgRefEl = bindMsgRef.toElement();
-        Direction direction = bindMsgRefEl.getDirection();
-        assertTrue("The BindingMessageReference does not represent an <input> element.", Direction.IN.equals(direction));
-
-        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts = 
-            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPModule[] actual = soapBindMsgRefExts.getSoapModules();
-        assertEquals("Unexpected number of SOAPModule objects.", 2, actual.length);
-    }
-
-    /**
-     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
-     * parsed from &lt;wsoap:module&gt; elements within an &lt;output&gt; element.
-     */
-    public void testGetSoapModules_output()
-    {
-        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[1];
-        assertNotNull("The BindingOperation does not contain a second BindingMessageReference.", bindMsgRef);
-
-        BindingMessageReferenceElement bindMsgRefEl = bindMsgRef.toElement();
-        Direction direction = bindMsgRefEl.getDirection();
-        assertTrue("The BindingMessageReference does not represent an <output> element.", Direction.OUT.equals(direction));
-
-        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts = 
-            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPModule[] actual = soapBindMsgRefExts.getSoapModules();
-        assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
-    }
-
-    /**
-     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeader objects 
-     * parsed from &lt;wsoap:header&gt; elements within an &lt;input&gt; element.
-     */
-    public void testGetSoapHeaders_input()
-    {
-        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[0];
-        assertNotNull("The BindingOperation does not contain a BindingMessageReference.", bindMsgRef);
-
-        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts = 
-            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPHeaderBlock[] actual = soapBindMsgRefExts.getSoapHeaders();
-        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 2, actual.length);
-    }
-
-    /**
-     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeader objects 
-     * parsed from &lt;wsoap:header&gt; elements within an &lt;output&gt; element.
-     */
-    public void testGetSoapHeaders_output()
-    {
-        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[1];
-        assertNotNull("The BindingOperation does not contain the expected BindingMessageReference.", bindMsgRef);
-
-        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts = 
-            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPHeaderBlock[] actual = soapBindMsgRefExts.getSoapHeaders();
-        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 1, actual.length);
-    }
-
-}
+ * 
+ *     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.woden.wsdl20.extensions.soap;
+
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.woden.ErrorHandler;
+import org.apache.woden.WSDLFactory;
+import org.apache.woden.WSDLReader;
+import org.apache.woden.tests.TestErrorHandler;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.BindingMessageReference;
+import org.apache.woden.wsdl20.BindingOperation;
+import org.apache.woden.wsdl20.Description;
+import org.apache.woden.wsdl20.enumeration.Direction;
+import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+import org.apache.woden.wsdl20.xml.BindingMessageReferenceElement;
+
+/**
+ * Functional verification test of SoapBindingMessageReferenceExtensions.
+ * Checks that the expected API behaviour is supported by the implementation.
+ * 
+ * @author jkaputin@apache.org
+ */
+public class SOAPBindingMessageReferenceExtensionsTest extends TestCase 
+{
+    private WSDLFactory fFactory = null;
+    private WSDLReader fReader = null;
+    private ErrorHandler fHandler = null;
+    
+    private BindingOperation fBindOper = null;
+    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingMessageReferenceExtensions.wsdl";
+    
+    public static Test suite()
+    {
+        return new TestSuite(SOAPBindingMessageReferenceExtensionsTest.class);
+    }
+
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception 
+    {
+        super.setUp();
+        fFactory = WSDLFactory.newInstance();
+        fReader = fFactory.newWSDLReader();
+        fHandler = new TestErrorHandler();
+        fReader.getErrorReporter().setErrorHandler(fHandler);
+        
+        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
+        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
+                wsdlURL);
+        
+        Description descComp = fReader.readWSDL(wsdlURL.toString());
+        assertNotNull("The reader did not return a WSDL description.", descComp);
+        
+        Binding binding = descComp.getBindings()[0];
+        assertNotNull("The Description does not contain a Binding.", binding);
+        fBindOper = binding.getBindingOperations()[0];
+        assertNotNull("The Binding does not contain a BindingOperation.", fBindOper);
+    }
+
+    /*
+     * @see TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+    
+        
+    /**
+     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
+     * parsed from &lt;wsoap:module&gt; elements within an &lt;input&gt; element.
+     */
+    public void testGetSoapModules_input()
+    {
+        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[0];
+        assertNotNull("The BindingOperation does not contain a BindingMessageReference.", bindMsgRef);
+
+        BindingMessageReferenceElement bindMsgRefEl = bindMsgRef.toElement();
+        Direction direction = bindMsgRefEl.getDirection();
+        assertTrue("The BindingMessageReference does not represent an <input> element.", Direction.IN.equals(direction));
+
+        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts = 
+            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPModule[] actual = soapBindMsgRefExts.getSoapModules();
+        assertEquals("Unexpected number of SOAPModule objects.", 2, actual.length);
+    }
+
+    /**
+     * Test that the <code>getSoapModules</code> method returns the expected number of SOAPModule objects 
+     * parsed from &lt;wsoap:module&gt; elements within an &lt;output&gt; element.
+     */
+    public void testGetSoapModules_output()
+    {
+        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[1];
+        assertNotNull("The BindingOperation does not contain a second BindingMessageReference.", bindMsgRef);
+
+        BindingMessageReferenceElement bindMsgRefEl = bindMsgRef.toElement();
+        Direction direction = bindMsgRefEl.getDirection();
+        assertTrue("The BindingMessageReference does not represent an <output> element.", Direction.OUT.equals(direction));
+
+        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts = 
+            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPModule[] actual = soapBindMsgRefExts.getSoapModules();
+        assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
+    }
+
+    /**
+     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeader objects 
+     * parsed from &lt;wsoap:header&gt; elements within an &lt;input&gt; element.
+     */
+    public void testGetSoapHeaders_input()
+    {
+        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[0];
+        assertNotNull("The BindingOperation does not contain a BindingMessageReference.", bindMsgRef);
+
+        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts = 
+            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPHeaderBlock[] actual = soapBindMsgRefExts.getSoapHeaders();
+        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 2, actual.length);
+    }
+
+    /**
+     * Test that the <code>getSoapHeaders</code> method returns the expected number of SOAPHeader objects 
+     * parsed from &lt;wsoap:header&gt; elements within an &lt;output&gt; element.
+     */
+    public void testGetSoapHeaders_output()
+    {
+        BindingMessageReference bindMsgRef = fBindOper.getBindingMessageReferences()[1];
+        assertNotNull("The BindingOperation does not contain the expected BindingMessageReference.", bindMsgRef);
+
+        SOAPBindingMessageReferenceExtensions soapBindMsgRefExts = 
+            (SOAPBindingMessageReferenceExtensions) bindMsgRef.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPHeaderBlock[] actual = soapBindMsgRefExts.getSoapHeaders();
+        assertEquals("Unexpected number of SOAPHeaderBlock objects.", 1, actual.length);
+    }
+
+}

Propchange: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingMessageReferenceExtensionsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensionsTest.java
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensionsTest.java?rev=568937&r1=568936&r2=568937&view=diff
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensionsTest.java (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensionsTest.java Thu Aug 23 04:24:51 2007
@@ -1,154 +1,154 @@
-/**
+/**
  * 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.woden.wsdl20.extensions.soap;
-
-import java.net.URI;
-import java.net.URL;
-
-import junit.framework.Test;
-import junit.framework.TestCase;
-import junit.framework.TestSuite;
-
-import org.apache.woden.ErrorHandler;
-import org.apache.woden.WSDLFactory;
-import org.apache.woden.WSDLReader;
-import org.apache.woden.tests.TestErrorHandler;
-import org.apache.woden.wsdl20.Binding;
-import org.apache.woden.wsdl20.BindingOperation;
-import org.apache.woden.wsdl20.Description;
-import org.apache.woden.wsdl20.extensions.ComponentExtensions;
-
-/**
- * Functional verification test of SoapBindingOperationExtensions.
- * Checks that the expected API behaviour is supported by the implementation.
- * 
- * @author jkaputin@apache.org
- */
-public class SOAPBindingOperationExtensionsTest extends TestCase 
-{
-    private WSDLFactory fFactory = null;
-    private WSDLReader fReader = null;
-    private ErrorHandler fHandler = null;
-    private BindingOperation fBindOper = null;
-    private BindingOperation fBind2Oper = null;
-    
-    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingOperationExtensions.wsdl";
-    
-    public static Test suite()
-    {
-        return new TestSuite(SOAPBindingOperationExtensionsTest.class);
-    }
-
-    /*
-     * @see TestCase#setUp()
-     */
-    protected void setUp() throws Exception 
-    {
-        super.setUp();
-        fFactory = WSDLFactory.newInstance();
-        fReader = fFactory.newWSDLReader();
-        fHandler = new TestErrorHandler();
-        fReader.getErrorReporter().setErrorHandler(fHandler);
-        
-        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
-        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
-                wsdlURL);
-        
-        Description descComp = fReader.readWSDL(wsdlURL.toString());
-        assertNotNull("The reader did not return a WSDL description.", descComp);
-        
-        Binding binding = descComp.getBindings()[0];
-        assertNotNull("The Description does not contain a Binding.", binding);
-        fBindOper = binding.getBindingOperations()[0];
-        assertNotNull("The Binding does not a BindingOperation.", fBindOper);
-        
-        Binding binding2 = descComp.getBindings()[1];
-        assertNotNull("The Description does not contain a second Binding.", binding2);
-        
-        fBind2Oper = binding2.getBindingOperations()[0];
-        assertNotNull("The second Binding does not contain a BindingOperation.");
-    }
-
-    /*
-     * @see TestCase#tearDown()
-     */
-    protected void tearDown() throws Exception {
-        super.tearDown();
-    }
-    
-    /**
-     * Test that the <code>wsoap:mep</code> extension attribute is represented 
-     * in the Component model extensions by the expected URI. 
-     */
-    public void testGetSoapMep()
-    {
-        SOAPBindingOperationExtensions soapBindOperExts = 
-            (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        URI soapMep = soapBindOperExts.getSoapMep();
-        
-        assertNotNull("The SOAPBindingOperationExtensions did not return a value for {soap mep}.", soapMep);
-        assertEquals("Unexpected soap mep URI.", URI.create("urn:mep"), soapMep);
-    }
-        
-    /**
-     * Test that the <code>wsoap:action</code> extension attribute is represented 
-     * in the Component model extensions by the expected URI. 
-     */
-    public void testGetSoapAction()
-    {
-        SOAPBindingOperationExtensions soapBindOperExts = 
-            (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        URI soapAction = soapBindOperExts.getSoapAction();
-        
-        assertNotNull("The SOAPBindingOperationExtensions did not return a value for {soap action}.", soapAction);
-        assertEquals("Unexpected soap action URI.", URI.create("urn:action"), soapAction);
-    }
-        
-    /**
-     * Test that the {soap modules} property returned by the <code>getSoapModules</code> method 
-     * contains the expected number of SOAPModule objects parsed from the WSDL.
-     */
-    public void testGetSoapModules()
-    {
-        SOAPBindingOperationExtensions soapBindOperExts = 
-            (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        SOAPModule[] actual = soapBindOperExts.getSoapModules();
-        assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
-    }
-
-    /**
-     * Test that the {http query parameter separator} property returned by the 
-     * <code>getHttpParameterSeparator</code> method method matches the value
-     * parsed from the WSDL or that it defaults to null if omitted from the WSDL.
-     */
-    public void testGetHttpQueryParameterSeparator()
-    {
-        SOAPBindingOperationExtensions soapBindOperExts = 
-            (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        String actual = soapBindOperExts.getHttpQueryParameterSeparator();
-        
-        assertNotNull("The SOAPBindingOperationExtensions did not return a value for {http query parameter separator}.", actual);
-        assertEquals("Unexpected value for http query parameter separator.", "$", actual);
-        
-        SOAPBindingOperationExtensions soapBind2OperExts = 
-            (SOAPBindingOperationExtensions) fBind2Oper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
-        String actual2 = soapBind2OperExts.getHttpQueryParameterSeparator();
-        
-        assertNull("Non-null value for http query parameter separator.", actual2);
-        
-    }
-}
+ * 
+ *     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.woden.wsdl20.extensions.soap;
+
+import java.net.URI;
+import java.net.URL;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+import org.apache.woden.ErrorHandler;
+import org.apache.woden.WSDLFactory;
+import org.apache.woden.WSDLReader;
+import org.apache.woden.tests.TestErrorHandler;
+import org.apache.woden.wsdl20.Binding;
+import org.apache.woden.wsdl20.BindingOperation;
+import org.apache.woden.wsdl20.Description;
+import org.apache.woden.wsdl20.extensions.ComponentExtensions;
+
+/**
+ * Functional verification test of SoapBindingOperationExtensions.
+ * Checks that the expected API behaviour is supported by the implementation.
+ * 
+ * @author jkaputin@apache.org
+ */
+public class SOAPBindingOperationExtensionsTest extends TestCase 
+{
+    private WSDLFactory fFactory = null;
+    private WSDLReader fReader = null;
+    private ErrorHandler fHandler = null;
+    private BindingOperation fBindOper = null;
+    private BindingOperation fBind2Oper = null;
+    
+    private String fWsdlPath = "org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingOperationExtensions.wsdl";
+    
+    public static Test suite()
+    {
+        return new TestSuite(SOAPBindingOperationExtensionsTest.class);
+    }
+
+    /*
+     * @see TestCase#setUp()
+     */
+    protected void setUp() throws Exception 
+    {
+        super.setUp();
+        fFactory = WSDLFactory.newInstance();
+        fReader = fFactory.newWSDLReader();
+        fHandler = new TestErrorHandler();
+        fReader.getErrorReporter().setErrorHandler(fHandler);
+        
+        URL wsdlURL = getClass().getClassLoader().getResource(fWsdlPath);
+        assertNotNull("Failed to find the WSDL document on the classpath using the path: " + fWsdlPath + ".", 
+                wsdlURL);
+        
+        Description descComp = fReader.readWSDL(wsdlURL.toString());
+        assertNotNull("The reader did not return a WSDL description.", descComp);
+        
+        Binding binding = descComp.getBindings()[0];
+        assertNotNull("The Description does not contain a Binding.", binding);
+        fBindOper = binding.getBindingOperations()[0];
+        assertNotNull("The Binding does not a BindingOperation.", fBindOper);
+        
+        Binding binding2 = descComp.getBindings()[1];
+        assertNotNull("The Description does not contain a second Binding.", binding2);
+        
+        fBind2Oper = binding2.getBindingOperations()[0];
+        assertNotNull("The second Binding does not contain a BindingOperation.");
+    }
+
+    /*
+     * @see TestCase#tearDown()
+     */
+    protected void tearDown() throws Exception {
+        super.tearDown();
+    }
+    
+    /**
+     * Test that the <code>wsoap:mep</code> extension attribute is represented 
+     * in the Component model extensions by the expected URI. 
+     */
+    public void testGetSoapMep()
+    {
+        SOAPBindingOperationExtensions soapBindOperExts = 
+            (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        URI soapMep = soapBindOperExts.getSoapMep();
+        
+        assertNotNull("The SOAPBindingOperationExtensions did not return a value for {soap mep}.", soapMep);
+        assertEquals("Unexpected soap mep URI.", URI.create("urn:mep"), soapMep);
+    }
+        
+    /**
+     * Test that the <code>wsoap:action</code> extension attribute is represented 
+     * in the Component model extensions by the expected URI. 
+     */
+    public void testGetSoapAction()
+    {
+        SOAPBindingOperationExtensions soapBindOperExts = 
+            (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        URI soapAction = soapBindOperExts.getSoapAction();
+        
+        assertNotNull("The SOAPBindingOperationExtensions did not return a value for {soap action}.", soapAction);
+        assertEquals("Unexpected soap action URI.", URI.create("urn:action"), soapAction);
+    }
+        
+    /**
+     * Test that the {soap modules} property returned by the <code>getSoapModules</code> method 
+     * contains the expected number of SOAPModule objects parsed from the WSDL.
+     */
+    public void testGetSoapModules()
+    {
+        SOAPBindingOperationExtensions soapBindOperExts = 
+            (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        SOAPModule[] actual = soapBindOperExts.getSoapModules();
+        assertEquals("Unexpected number of SOAPModule objects.", 1, actual.length);
+    }
+
+    /**
+     * Test that the {http query parameter separator} property returned by the 
+     * <code>getHttpParameterSeparator</code> method method matches the value
+     * parsed from the WSDL or that it defaults to null if omitted from the WSDL.
+     */
+    public void testGetHttpQueryParameterSeparator()
+    {
+        SOAPBindingOperationExtensions soapBindOperExts = 
+            (SOAPBindingOperationExtensions) fBindOper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        String actual = soapBindOperExts.getHttpQueryParameterSeparator();
+        
+        assertNotNull("The SOAPBindingOperationExtensions did not return a value for {http query parameter separator}.", actual);
+        assertEquals("Unexpected value for http query parameter separator.", "$", actual);
+        
+        SOAPBindingOperationExtensions soapBind2OperExts = 
+            (SOAPBindingOperationExtensions) fBind2Oper.getComponentExtensionsForNamespace(ComponentExtensions.URI_NS_SOAP);
+        String actual2 = soapBind2OperExts.getHttpQueryParameterSeparator();
+        
+        assertNull("Non-null value for http query parameter separator.", actual2);
+        
+    }
+}

Propchange: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/SOAPBindingOperationExtensionsTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingExtensions.wsdl
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingExtensions.wsdl?rev=568937&r1=568936&r2=568937&view=diff
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingExtensions.wsdl (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingExtensions.wsdl Thu Aug 23 04:24:51 2007
@@ -1,73 +1,73 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!-- 
+<?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.
--->
-<description xmlns="http://www.w3.org/ns/wsdl"
-	targetNamespace="http://ws.apache.woden/endpoint"
-	xmlns:tns="http://ws.apache.woden/endpoint"
-	xmlns:xs="http://www.w3.org/2001/XMLSchema"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap"
-    xmlns:whttp= "http://www.w3.org/ns/wsdl/http"
-	xsi:schemaLocation=
-	    "http://www.w3.org/ns/wsdl http://www.w3.org/ns/wsdl/wsdl20.xsd 
-	    http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
-
-	<documentation>
-	    Used by SOAPBindingExtensionsTest to test the SOAPBindingExtensions implementation.
-	    (to be) Used by SOAPModuleTest to test the SOAPModule implementation.
-	    (to be) Used by SOAPHeaderBlockTest to test the SOAPHeaderBlock implementation.
-	</documentation>
-
-	<interface name="interface1" />
-	
-	<binding name="binding1"
-	  interface="tns:interface1"
-	  type="http://www.w3.org/ns/wsdl/soap"
-	  wsoap:version="1.2"
-	  wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/"
-	  wsoap:mepDefault="http://www.w3.org/2003/05/soap/mep/request-response"
-	  whttp:queryParameterSeparatorDefault="$">
-	  <documentation>
-	     {http query parameter separator default} should be "$" if whttp:queryParameterSeparatorDefault is "$"
-	  </documentation>
-
-        <wsoap:module ref="urn:ccc" required="true">
-            <documentation>A soap module the processor is required to handle</documentation>
-        </wsoap:module>
-    
-        <wsoap:module ref="urn:ddd" required="false">
-            <documentation>A soap module the processor is not required to handle</documentation>
-        </wsoap:module>
-        
-	</binding>
-	
-	
-	<binding name="binding2"
-	  type="http://www.w3.org/ns/wsdl/soap"
-	  wsoap:version="1.1"
-	  wsoap:protocol="http://www.w3.org/2006/01/soap11/bindings/HTTP/">
-	  
-	  <documentation>
-	     {http query parameter separator default} should default to ampersand if whttp:queryParameterSeparatorDefault is omitted
-	  </documentation>
-
-	</binding>
-	
-	
-	<service name="service1" interface="tns:interface1" />
-	
+ * 
+ *     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.
+-->
+<description xmlns="http://www.w3.org/ns/wsdl"
+	targetNamespace="http://ws.apache.woden/endpoint"
+	xmlns:tns="http://ws.apache.woden/endpoint"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap"
+    xmlns:whttp= "http://www.w3.org/ns/wsdl/http"
+	xsi:schemaLocation=
+	    "http://www.w3.org/ns/wsdl http://www.w3.org/ns/wsdl/wsdl20.xsd 
+	    http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
+
+	<documentation>
+	    Used by SOAPBindingExtensionsTest to test the SOAPBindingExtensions implementation.
+	    (to be) Used by SOAPModuleTest to test the SOAPModule implementation.
+	    (to be) Used by SOAPHeaderBlockTest to test the SOAPHeaderBlock implementation.
+	</documentation>
+
+	<interface name="interface1" />
+	
+	<binding name="binding1"
+	  interface="tns:interface1"
+	  type="http://www.w3.org/ns/wsdl/soap"
+	  wsoap:version="1.2"
+	  wsoap:protocol="http://www.w3.org/2003/05/soap/bindings/HTTP/"
+	  wsoap:mepDefault="http://www.w3.org/2003/05/soap/mep/request-response"
+	  whttp:queryParameterSeparatorDefault="$">
+	  <documentation>
+	     {http query parameter separator default} should be "$" if whttp:queryParameterSeparatorDefault is "$"
+	  </documentation>
+
+        <wsoap:module ref="urn:ccc" required="true">
+            <documentation>A soap module the processor is required to handle</documentation>
+        </wsoap:module>
+    
+        <wsoap:module ref="urn:ddd" required="false">
+            <documentation>A soap module the processor is not required to handle</documentation>
+        </wsoap:module>
+        
+	</binding>
+	
+	
+	<binding name="binding2"
+	  type="http://www.w3.org/ns/wsdl/soap"
+	  wsoap:version="1.1"
+	  wsoap:protocol="http://www.w3.org/2006/01/soap11/bindings/HTTP/">
+	  
+	  <documentation>
+	     {http query parameter separator default} should default to ampersand if whttp:queryParameterSeparatorDefault is omitted
+	  </documentation>
+
+	</binding>
+	
+	
+	<service name="service1" interface="tns:interface1" />
+	
 </description>

Propchange: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingExtensions.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingFaultExtensions.wsdl
URL: http://svn.apache.org/viewvc/incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingFaultExtensions.wsdl?rev=568937&r1=568936&r2=568937&view=diff
==============================================================================
--- incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingFaultExtensions.wsdl (original)
+++ incubator/woden/trunk/java/test/org/apache/woden/wsdl20/extensions/soap/resources/SOAPBindingFaultExtensions.wsdl Thu Aug 23 04:24:51 2007
@@ -1,68 +1,68 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<!-- 
+<?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.
--->
-<description xmlns="http://www.w3.org/ns/wsdl"
-	targetNamespace="http://ws.apache.woden/endpoint"
-	xmlns:tns="http://ws.apache.woden/endpoint"
-	xmlns:xs="http://www.w3.org/2001/XMLSchema"
-	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap"
-    xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"
-    xmlns:ghns = "urn:ghns"
-	xsi:schemaLocation=
-	    "http://www.w3.org/ns/wsdl http://www.w3.org/ns/wsdl/wsdl20.xsd 
-	    http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
-
-	<documentation>
-	    Used by SOAPBindingFaultExtensionsTest to test the SOAPBindingFaultExtensions implementation.
-	</documentation>
-
-	<interface name="interface1" />
-	
-	<binding name="binding1"
-	  interface="tns:interface1"
-	  type="http://www.w3.org/ns/wsdl/soap">
-
-        <fault 
-          wsoap:code="soap-env:fault1"
-          wsoap:subcodes="soap-env:ABC soap-env:JKL soap-env:XYZ">
-            <documentation>Test that code and subcode qnames are resolved correctly</documentation>
-        </fault>
-        
-        <fault 
-          wsoap:code="#any"
-          wsoap:subcodes="#any">
-            <documentation>Test that code and subcode tokens #any are handled correctly</documentation>
-            <documentation>Test that 3 SOAPModule objects are created</documentation>
-            <wsoap:module ref="urn:ccc" required="true" />
-            <wsoap:module ref="urn:ddd" required="false" />
-            <wsoap:module ref="urn:eee" required="true" />
-
-       </fault>
-        
-        <fault>
-            <documentation>Test that code and subcode default to token #any if omitted</documentation>
-            <documentation>Test that 2 SOAPHeaderBlock objects are created</documentation>
-            <wsoap:header element="ghns:checkAvailability" mustUnderstand="true" />
-            <wsoap:header element="ghns:checkPrice" mustUnderstand="true" />
-        </fault>
-        
-	</binding>
-	
-	<service name="service1" interface="tns:interface1" />
-	
+ * 
+ *     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.
+-->
+<description xmlns="http://www.w3.org/ns/wsdl"
+	targetNamespace="http://ws.apache.woden/endpoint"
+	xmlns:tns="http://ws.apache.woden/endpoint"
+	xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:wsoap= "http://www.w3.org/ns/wsdl/soap"
+    xmlns:soap-env="http://www.w3.org/2003/05/soap-envelope"
+    xmlns:ghns = "urn:ghns"
+	xsi:schemaLocation=
+	    "http://www.w3.org/ns/wsdl http://www.w3.org/ns/wsdl/wsdl20.xsd 
+	    http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/XMLSchema.xsd">
+
+	<documentation>
+	    Used by SOAPBindingFaultExtensionsTest to test the SOAPBindingFaultExtensions implementation.
+	</documentation>
+
+	<interface name="interface1" />
+	
+	<binding name="binding1"
+	  interface="tns:interface1"
+	  type="http://www.w3.org/ns/wsdl/soap">
+
+        <fault 
+          wsoap:code="soap-env:fault1"
+          wsoap:subcodes="soap-env:ABC soap-env:JKL soap-env:XYZ">
+            <documentation>Test that code and subcode qnames are resolved correctly</documentation>
+        </fault>
+        
+        <fault 
+          wsoap:code="#any"
+          wsoap:subcodes="#any">
+            <documentation>Test that code and subcode tokens #any are handled correctly</documentation>
+            <documentation>Test that 3 SOAPModule objects are created</documentation>
+            <wsoap:module ref="urn:ccc" required="true" />
+            <wsoap:module ref="urn:ddd" required="false" />
+            <wsoap:module ref="urn:eee" required="true" />
+
+       </fault>
+        
+        <fault>
+            <documentation>Test that code and subcode default to token #any if omitted</documentation>
+            <documentation>Test that 2 SOAPHeaderBlock objects are created</documentation>
+            <wsoap:header element="ghns:checkAvailability" mustUnderstand="true" />
+            <wsoap:header element="ghns:checkPrice" mustUnderstand="true" />
+        </fault>
+        
+	</binding>
+	
+	<service name="service1" interface="tns:interface1" />
+	
 </description>



---------------------------------------------------------------------
To unsubscribe, e-mail: woden-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: woden-dev-help@ws.apache.org