Author: mmao
Date: Mon Mar 26 01:29:05 2007
New Revision: 522452

URL: http://svn.apache.org/viewvc?view=rev&rev=522452
Log:
[CXF-451]jms_test wsdl has bunch of warnings

* Tools-Validator add WSI-BP Rule 2716
* Tools-Validator add WSI-BP Rule 2717
* Tools-Validator add WSI-BP Rule 2726
* Tools-Validator add WSI-BP Rule 2205
* Fix the jms_test wsdl warnings

Added:
    
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test.wsdl
    
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test2.wsdl
    
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/soapheader.wsdl
Modified:
    
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/jms_test.wsdl
    
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
    
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
    
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
    
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/doc_lit_bare.wsdl
    
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_mixed_style.wsdl
    
incubator/cxf/trunk/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java

Modified: 
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java?view=diff&rev=522452&r1=522451&r2=522452
==============================================================================
--- 
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java
 (original)
+++ 
incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jms/GreeterImplTwoWayJMS.java
 Mon Mar 26 01:29:05 2007
@@ -26,6 +26,7 @@
 import org.apache.cxf.hello_world_jms.BadRecordLitFault;
 import org.apache.cxf.hello_world_jms.HelloWorldPortType;
 import org.apache.cxf.hello_world_jms.NoSuchCodeLitFault;
+import org.apache.cxf.hello_world_jms.types.BadRecordLit;
 import org.apache.cxf.hello_world_jms.types.ErrorCode;
 import org.apache.cxf.hello_world_jms.types.NoSuchCodeLit;
 import org.apache.cxf.hello_world_jms.types.TestRpcLitFaultResponse;
@@ -74,8 +75,10 @@
     
     public TestRpcLitFaultResponse testRpcLitFault(String faultType) 
         throws BadRecordLitFault, NoSuchCodeLitFault {
+        BadRecordLit badRecord = new BadRecordLit();
+        badRecord.setReason("BadRecordLitFault");
         if (faultType.equals(BadRecordLitFault.class.getSimpleName())) {
-            throw new BadRecordLitFault("TestBadRecordLit", 
"BadRecordLitFault");
+            throw new BadRecordLitFault("TestBadRecordLit", badRecord);
         }
         if (faultType.equals(NoSuchCodeLitFault.class.getSimpleName())) {
             ErrorCode ec = new ErrorCode();

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/jms_test.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/jms_test.wsdl?view=diff&rev=522452&r1=522451&r2=522452
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/jms_test.wsdl 
(original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/jms_test.wsdl Mon Mar 
26 01:29:05 2007
@@ -27,33 +27,36 @@
     xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
     <types>
         <schema targetNamespace="http://cxf.apache.org/hello_world_jms/types";  
    xmlns="http://www.w3.org/2001/XMLSchema"; 
xmlns:x1="http://cxf.apache.org/hello_world_jms/types"; 
elementFormDefault="qualified">
-            <complexType name="ErrorCode">
-                 <sequence>
-                    <element name="minor" type="short"/>
-                    <element name="major" type="short"/>
-                </sequence>
-            </complexType>
-                <complexType name="testRpcLitFault">
-                    <sequence>
-                        <element name="faultType" type="string"/>
-                    </sequence>
-                </complexType>
-                <complexType name="testRpcLitFaultResponse">
-                    <sequence/>
-                </complexType>
+           <complexType name="ErrorCode">
+               <sequence>
+                   <element name="minor" type="short"/>
+                   <element name="major" type="short"/>
+               </sequence>
+           </complexType>
+           <complexType name="testRpcLitFault">
+               <sequence>
+                   <element name="faultType" type="string"/>
+               </sequence>
+           </complexType>
+           <complexType name="testRpcLitFaultResponse">
+               <sequence/>
+           </complexType>
+           
+           <element name="NoSuchCodeLit" type="x1:NoSuchCodeLit"/>
+           <complexType name="NoSuchCodeLit">
+               <sequence>
+                   <element name="code" type="x1:ErrorCode"/>
+               </sequence>
+           </complexType>
 
-                <complexType name="NoSuchCodeLit">
-                    <sequence>
-                        <element name="code" type="x1:ErrorCode"/>
-                    </sequence>
-                </complexType>
-            <complexType name="BadRecord">
-                <sequence>
-                    <element name="reason" type="string"/>
-                    <element name="code" type="short"/>
-                </sequence>
-            </complexType>
-        </schema>
+           <element name="BadRecordLit" type="x1:BadRecordLit"/>
+           <complexType name="BadRecordLit">
+               <sequence>
+                   <element name="reason" type="string"/>
+                   <element name="code" type="short"/>
+               </sequence>
+           </complexType>
+       </schema>
     </types>
 
     <message name="greetMe">
@@ -77,10 +80,10 @@
         <part name="out" type="x1:testRpcLitFaultResponse"/>
     </message>
     <message name="NoSuchCodeLitFault">
-        <part name="NoSuchCodeLit" type="x1:NoSuchCodeLit"/>
+        <part name="NoSuchCodeLit" element="x1:NoSuchCodeLit"/>
     </message>
     <message name="BadRecordLitFault">
-        <part name="BadRecordLit" type="xsd:string"/>
+        <part name="BadRecordLit" element="x1:BadRecordLit"/>
     </message>
     
     <portType name="HelloWorldPortType">
@@ -156,10 +159,10 @@
                 <soap:body namespace="http://cxf.apache.org/hello_world_jms";  
use="literal"/>
             </output>
             <fault name="NoSuchCodeLitFault">
-                <soap:fault name="NoSuchCodeLitFault" 
namespace="http://cxf.apache.org/hello_world_jms"; use="literal"/>
+                <soap:fault name="NoSuchCodeLitFault" use="literal"/>
             </fault>
             <fault name="BadRecordLitFault">
-                <soap:fault name="BadRecordLitFault" 
namespace="http://cxf.apache.org/hello_world_jms"; use="literal"/>
+                <soap:fault name="BadRecordLitFault" use="literal"/>
             </fault>
         </operation>
     </binding>

Modified: 
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java?view=diff&rev=522452&r1=522451&r2=522452
==============================================================================
--- 
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
 (original)
+++ 
incubator/cxf/trunk/tools/common/src/main/java/org/apache/cxf/tools/util/SOAPBindingUtil.java
 Mon Mar 26 01:29:05 2007
@@ -47,6 +47,7 @@
 import javax.wsdl.extensions.soap12.SOAP12Operation;
 import javax.xml.namespace.QName;
 
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.tools.common.ExtensionInvocationHandler;
 import org.apache.cxf.tools.common.WSDLConstants;
 import org.apache.cxf.tools.common.extensions.soap.SoapAddress;
@@ -81,6 +82,17 @@
         return cls.cast(proxy);
     }
 
+    public static boolean isSOAPBinding(Binding binding) {
+        Iterator ite = binding.getExtensibilityElements().iterator();
+        while (ite.hasNext()) {
+            Object obj = ite.next();
+            if (isSOAPBinding(obj)) {
+                return true;
+            }
+        }
+        return false;
+    }
+    
     public static String getBindingStyle(Binding binding) {
         Iterator ite = binding.getExtensibilityElements().iterator();
         while (ite.hasNext()) {
@@ -257,6 +269,26 @@
         return obj instanceof SOAPBinding || obj instanceof SOAP12Binding;
     }
 
+    @SuppressWarnings("unchecked")
+    public static List<SoapFault> 
getBindingOperationSoapFaults(BindingOperation bop) {
+        List<SoapFault> faults = new ArrayList<SoapFault>();
+        Map bindingFaults = bop.getBindingFaults();
+        for (Object obj : bindingFaults.values()) {
+            if (!(obj instanceof BindingFault)) {
+                continue;
+            }
+            BindingFault faultElement = (BindingFault) obj;
+            Iterator ite = faultElement.getExtensibilityElements().iterator();
+            while (ite.hasNext()) {
+                SoapFault fault = getSoapFault(ite.next());
+                if (fault != null) {
+                    faults.add(fault);
+                }
+            }
+        }
+        return faults;
+    }
+
     public static SoapFault getSoapFault(Object obj) {
         if (isSOAPFault(obj)) {
             return getProxy(SoapFault.class, obj);
@@ -319,7 +351,7 @@
 
     public static String getCanonicalBindingStyle(Binding binding) {
         String bindingStyle = getBindingStyle(binding);
-        if (bindingStyle != null && !("".equals(bindingStyle))) {
+        if (!StringUtils.isEmpty(bindingStyle)) {
             return bindingStyle;
         }
         for (Iterator ite2 = binding.getBindingOperations().iterator(); 
ite2.hasNext();) {

Modified: 
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java?view=diff&rev=522452&r1=522451&r2=522452
==============================================================================
--- 
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
 (original)
+++ 
incubator/cxf/trunk/tools/validator/src/main/java/org/apache/cxf/tools/validator/internal/WSIBPValidator.java
 Mon Mar 26 01:29:05 2007
@@ -19,8 +19,10 @@
 
 package org.apache.cxf.tools.validator.internal;
 
+import java.lang.reflect.Member;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
+import java.util.Collection;
 import java.util.Iterator;
 import java.util.List;
 
@@ -28,14 +30,18 @@
 import javax.wsdl.Binding;
 import javax.wsdl.BindingOperation;
 import javax.wsdl.Definition;
+import javax.wsdl.Fault;
 import javax.wsdl.Message;
 import javax.wsdl.Operation;
 import javax.wsdl.Part;
 import javax.wsdl.PortType;
 
+import org.apache.cxf.common.util.CollectionUtils;
+import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.WSDLHelper;
 import org.apache.cxf.tools.common.ToolException;
 import org.apache.cxf.tools.common.extensions.soap.SoapBody;
+import org.apache.cxf.tools.common.extensions.soap.SoapFault;
 import org.apache.cxf.tools.common.extensions.soap.SoapHeader;
 import org.apache.cxf.tools.util.SOAPBindingUtil;
 
@@ -51,8 +57,9 @@
         for (Method m : getClass().getMethods()) {
             Boolean res = Boolean.TRUE;
 
-            if (m.getName().startsWith("check")) {
+            if (m.getName().startsWith("check") || m.getModifiers() == 
Member.PUBLIC) {
                 try {
+                    System.err.println("invoking" + m.getName());
                     res = (Boolean)m.invoke(this, new Object[] {});
                 } catch (Exception e) {
                     e.printStackTrace();
@@ -67,9 +74,68 @@
 
     }
 
+    private boolean checkR2716(final BindingOperation bop) {
+        SoapBody inSoapBody = SOAPBindingUtil.getBindingInputSOAPBody(bop);
+        SoapBody outSoapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop);
+        if (inSoapBody != null && 
!StringUtils.isEmpty(inSoapBody.getNamespaceURI())
+            || outSoapBody != null && 
!StringUtils.isEmpty(outSoapBody.getNamespaceURI())) {
+            addErrorMessage("Violate WSI-BP-1.0 R2716 operation '"
+                            + bop.getName() + "' soapBody MUST NOT have 
namespace attribute");
+            return false;
+        }
+
+        SoapHeader inSoapHeader = 
SOAPBindingUtil.getBindingInputSOAPHeader(bop);
+        SoapHeader outSoapHeader = 
SOAPBindingUtil.getBindingOutputSOAPHeader(bop);
+        if (inSoapHeader != null && 
!StringUtils.isEmpty(inSoapHeader.getNamespaceURI())
+            || outSoapHeader != null && 
!StringUtils.isEmpty(outSoapHeader.getNamespaceURI())) {
+            addErrorMessage("Violate WSI-BP-1.0 R2716 operation '"
+                            + bop.getName() + "' soapHeader MUST NOT have 
namespace attribute");
+            return false;
+        }
+
+        List<SoapFault> soapFaults = 
SOAPBindingUtil.getBindingOperationSoapFaults(bop);
+        for (SoapFault fault : soapFaults) {
+            if (!StringUtils.isEmpty(fault.getNamespaceURI())) {
+                addErrorMessage("Violate WSI-BP-1.0 R2716 operation '"
+                                + bop.getName() + "' soapFault MUST NOT have 
namespace attribute");
+                return false;
+            }
+        }
+        return true;
+    }
+
+    private boolean checkR2717AndR2726(final BindingOperation bop) {
+        SoapBody inSoapBody = SOAPBindingUtil.getBindingInputSOAPBody(bop);
+        SoapBody outSoapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop);
+        if (inSoapBody != null && 
StringUtils.isEmpty(inSoapBody.getNamespaceURI())
+            || outSoapBody != null && 
StringUtils.isEmpty(outSoapBody.getNamespaceURI())) {
+            addErrorMessage("Violate WSI-BP-1.0 R2717 operation '"
+                            + bop.getName() + "' soapBody MUST have namespace 
attribute");
+            return false;
+        }
+
+        SoapHeader inSoapHeader = 
SOAPBindingUtil.getBindingInputSOAPHeader(bop);
+        SoapHeader outSoapHeader = 
SOAPBindingUtil.getBindingOutputSOAPHeader(bop);
+        if (inSoapHeader != null && 
!StringUtils.isEmpty(inSoapHeader.getNamespaceURI())
+            || outSoapHeader != null && 
!StringUtils.isEmpty(outSoapHeader.getNamespaceURI())) {
+            addErrorMessage("Violate WSI-BP-1.0 R2726 operation '"
+                            + bop.getName() + "' soapHeader MUST NOT have 
namespace attribute");
+            return false;
+        }
+
+        List<SoapFault> soapFaults = 
SOAPBindingUtil.getBindingOperationSoapFaults(bop);
+        for (SoapFault fault : soapFaults) {
+            if (!StringUtils.isEmpty(fault.getNamespaceURI())) {
+                addErrorMessage("Violate WSI-BP-1.0 R2726 operation '"
+                                + bop.getName() + "' soapFault MUST NOT have 
namespace attribute");
+                return false;
+            }
+        }
+        return true;
+    }
+
     private boolean checkR2201Input(final Operation operation,
-                                    final BindingOperation bop,
-                                    final Binding binding) {
+                                    final BindingOperation bop) {
         List<Part> partsList = wsdlHelper.getInMessageParts(operation);
         int inmessagePartsCount = partsList.size();
         SoapBody soapBody = SOAPBindingUtil.getBindingInputSOAPBody(bop);
@@ -120,8 +186,7 @@
     }
 
     private boolean checkR2201Output(final Operation operation,
-                                     final BindingOperation bop,
-                                     final Binding binding) {
+                                     final BindingOperation bop) {
         int outmessagePartsCount = 
wsdlHelper.getOutMessageParts(operation).size();
         SoapBody soapBody = SOAPBindingUtil.getBindingOutputSOAPBody(bop);
         if (soapBody != null) {
@@ -169,7 +234,7 @@
         return true;
     }
     
-    public boolean checkR2201() {
+    public boolean checkBinding() {
         for (PortType portType : wsdlHelper.getPortTypes(def)) {
             Iterator ite = portType.getOperations().iterator();
             while (ite.hasNext()) {
@@ -183,12 +248,15 @@
 
                 String style = 
"".equals(SOAPBindingUtil.getSOAPOperationStyle(bop))
                     ? bindingStyle : 
SOAPBindingUtil.getSOAPOperationStyle(bop);
-
                 if ("DOCUMENT".equalsIgnoreCase(style)) {
-                    if (!checkR2201Input(operation, bop, binding)) {
+                    boolean passed = checkR2201Input(operation, bop)
+                        && checkR2201Output(operation, bop)
+                        && checkR2716(bop);
+                    if (!passed) {
                         return false;
                     }
-                    if (!checkR2201Output(operation, bop, binding)) {
+                } else {
+                    if (!checkR2717AndR2726(bop)) {
                         return false;
                     }
                 }
@@ -257,6 +325,45 @@
                 }
             }
 
+        }
+        return true;
+    }
+
+    // TODO: Should also check SoapHeader/SoapHeaderFault
+    @SuppressWarnings("unchecked")
+    public boolean checkR2205() {
+        for (Iterator ite = def.getBindings().values().iterator(); 
ite.hasNext();) {
+            Binding binding = (Binding)ite.next();
+
+            if (!SOAPBindingUtil.isSOAPBinding(binding)) {
+                System.err.println("NOT SOAPBINDING");
+                continue;
+            }
+
+            String style = SOAPBindingUtil.getCanonicalBindingStyle(binding);
+
+            for (Iterator ite2 = 
binding.getPortType().getOperations().iterator(); ite2.hasNext();) {
+                Operation operation = (Operation)ite2.next();
+                Collection<Fault> faults = operation.getFaults().values();
+                if (CollectionUtils.isEmpty(faults)) {
+                    continue;
+                }
+
+                for (Fault fault : faults) {
+                    Message message = fault.getMessage();
+                    System.err.println("message:" + message.getQName());       
             
+                    Collection<Part> parts = message.getParts().values();
+                    for (Part part : parts) {
+                        System.err.println("Part: " + part.getElementName());
+                        if (part.getElementName() == null) {
+                            addErrorMessage("Violate WSI-BP-1.0 R2205: In 
Message " + message.getQName()
+                                            + ", part " + part.getName()
+                                            + " must specify a 'element' 
attribute");
+                            return false;
+                        }
+                    }
+                }
+            }
         }
         return true;
     }

Modified: 
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java?view=diff&rev=522452&r1=522451&r2=522452
==============================================================================
--- 
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
 (original)
+++ 
incubator/cxf/trunk/tools/validator/src/test/java/org/apache/cxf/tools/validator/WSDLValidationTest.java
 Mon Mar 26 01:29:05 2007
@@ -54,7 +54,7 @@
             e.printStackTrace();
         }
     }
-
+    
     public void testValidateTypeElement() {
         try {
 
@@ -149,7 +149,28 @@
         } catch (Exception e) {
             e.printStackTrace();
         }
+    }
 
+    public void testWSIBPR2726() throws Exception {
+        try {
+            String[] args = new String[] {"-verbose",
+                                          
getLocation("/validator_wsdl/jms_test.wsdl")};
+            WSDLValidator.main(args);
+            assertTrue(getStdErr().indexOf("WSI-BP-1.0 R2726") > -1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+
+    public void testWSIBPR2205() throws Exception {
+        try {
+            String[] args = new String[] {"-verbose",
+                                          
getLocation("/validator_wsdl/jms_test2.wsdl")};
+            WSDLValidator.main(args);
+            assertTrue(getStdErr().indexOf("WSI-BP-1.0 R2205") > -1);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
     }
 
     protected String getLocation(String wsdlFile) throws Exception {

Modified: 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/doc_lit_bare.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/doc_lit_bare.wsdl?view=diff&rev=522452&r1=522451&r2=522452
==============================================================================
--- 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/doc_lit_bare.wsdl
 (original)
+++ 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/doc_lit_bare.wsdl
 Mon Mar 26 01:29:05 2007
@@ -17,89 +17,99 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:tns="http://apache.org/hello_world_doc_lit_bare"; 
xmlns:x1="http://apache.org/hello_world_doc_lit_bare/types"; 
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
targetNamespace="http://apache.org/hello_world_doc_lit_bare"; name="DocLitBare">
+<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"; 
+                 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
+                 xmlns:tns="http://apache.org/hello_world_doc_lit_bare"; 
+                 xmlns:x1="http://apache.org/hello_world_doc_lit_bare/types"; 
+                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
+                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
+                 targetNamespace="http://apache.org/hello_world_doc_lit_bare"; 
+                 name="DocLitBare">
        <wsdl:types>
-               <schema 
targetNamespace="http://apache.org/hello_world_doc_lit_bare/types"; 
xmlns:tns="http://apache.org/hello_world_doc_lit_bare/types"; 
xmlns="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified">
-                       <complexType name="TradePriceData">
-                               <sequence>
-                                       <element name="tickerSymbol" 
type="xsd:string"/>
-                                       <element name="tickerPrice" 
type="xsd:float"/>
-                               </sequence>
-                       </complexType>
-                       <element name="in" type="tns:TradePriceData"/>
-                       <element name="inout" type="tns:TradePriceData"/>
+               <schema 
targetNamespace="http://apache.org/hello_world_doc_lit_bare/types"; 
+                       
xmlns:tns="http://apache.org/hello_world_doc_lit_bare/types"; 
+                       xmlns="http://www.w3.org/2001/XMLSchema"; 
+                       elementFormDefault="qualified">
+                   <complexType name="TradePriceData">
+                       <sequence>
+                           <element name="tickerSymbol" type="xsd:string"/>
+                           <element name="tickerPrice" type="xsd:float"/>
+                       </sequence>
+                   </complexType>
+                   <element name="in" type="tns:TradePriceData"/>
+                   <element name="inout" type="tns:TradePriceData"/>
                </schema>
        </wsdl:types>
        <message name="PutLastTradedPriceInput">
-               <part name="body" element="x1:in"/>
+           <part name="body" element="x1:in"/>
        </message>
        <message name="PutLastTradedPriceOutput"/>
-
+       
        <message name="SayHiInput">
-               <part name="body" element="x1:inout"/>
+           <part name="body" element="x1:inout"/>
        </message>
        <message name="SayHiOutput">
-               <part name="body" element="x1:inout"/>
+           <part name="body" element="x1:inout"/>
        </message>
-
+       
        <message name="GreetMeInput">
-               <part name="body1" element="x1:inout"/>         
-               <part name="body2" element="x1:in"/>
+           <part name="body1" element="x1:inout"/>             
+           <part name="body2" element="x1:in"/>
        </message>
        <message name="GreetMeOutput">
-               <part name="body1" element="x1:inout"/>
+           <part name="body1" element="x1:inout"/>
        </message>
        
        <portType name="PutLastTradedPricePortType">
-
-               <operation name="GreetMe">
-                       <input message="tns:GreetMeInput"/>
-                       <output message="tns:GreetMeOutput"/>
-               </operation>
-
-               <operation name="SayHi">
-                       <input message="tns:SayHiInput"/>
-                       <output message="tns:SayHiOutput"/>
-               </operation>
-       
-               <operation name="PutLastTradedPrice">
-                       <input message="tns:PutLastTradedPriceInput"/>
-                       <output message="tns:PutLastTradedPriceOutput"/>
-               </operation>
+           
+           <operation name="GreetMe">
+               <input message="tns:GreetMeInput"/>
+               <output message="tns:GreetMeOutput"/>
+           </operation>
+           
+           <operation name="SayHi">
+               <input message="tns:SayHiInput"/>
+               <output message="tns:SayHiOutput"/>
+           </operation>
+           
+           <operation name="PutLastTradedPrice">
+               <input message="tns:PutLastTradedPriceInput"/>
+               <output message="tns:PutLastTradedPriceOutput"/>
+           </operation>
        </portType>
        <binding name="PutLastTradedPriceSoapBinding" 
type="tns:PutLastTradedPricePortType">
-               <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
-
-               <operation name="GreetMe">
-                       <input>
-                               <soap:body use="literal"/>
-                       </input>
-                       <output>
-                               <soap:body use="literal"/>
-                       </output>
-               </operation>
-
-               <operation name="SayHi">
-                       <input>
-                               <soap:body use="literal"/>
-                       </input>
-                       <output>
-                               <soap:body use="literal"/>
-                       </output>
-               </operation>
-               
-               <operation name="PutLastTradedPrice">
-                       <input>
-                               <soap:body use="literal"/>
-                       </input>
-                       <output>
-                               <soap:body use="literal"/>
-                       </output>
-               </operation>
+           <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
+           
+           <operation name="GreetMe">
+               <input>
+                   <soap:body 
namespace="http://apache.org/hello_world_doc_lit_bare"; use="literal"/>
+               </input>
+               <output>
+                   <soap:body 
namespace="http://apache.org/hello_world_doc_lit_bare"; use="literal"/>
+               </output>
+           </operation>
+           
+           <operation name="SayHi">
+               <input>
+                   <soap:body 
namespace="http://apache.org/hello_world_doc_lit_bare"; use="literal"/>
+               </input>
+               <output>
+                   <soap:body 
namespace="http://apache.org/hello_world_doc_lit_bare"; use="literal"/>
+               </output>
+           </operation>
+           
+           <operation name="PutLastTradedPrice">
+               <input>
+                   <soap:body 
namespace="http://apache.org/hello_world_doc_lit_bare"; use="literal"/>
+               </input>
+               <output>
+                   <soap:body 
namespace="http://apache.org/hello_world_doc_lit_bare"; use="literal"/>
+               </output>
+           </operation>
        </binding>
        <wsdl:service name="SOAPService">
-               <wsdl:port name="SoapPort" 
binding="tns:PutLastTradedPriceSoapBinding">
-                       <soap:address 
location="http://localhost:9003/SOAPDocLitBareService/SoapPort"/>
-               </wsdl:port>
+           <wsdl:port name="SoapPort" 
binding="tns:PutLastTradedPriceSoapBinding">
+               <soap:address 
location="http://localhost:9003/SOAPDocLitBareService/SoapPort"/>
+           </wsdl:port>
        </wsdl:service>
 </wsdl:definitions>

Modified: 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_mixed_style.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_mixed_style.wsdl?view=diff&rev=522452&r1=522451&r2=522452
==============================================================================
--- 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_mixed_style.wsdl
 (original)
+++ 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/hello_world_mixed_style.wsdl
 Mon Mar 26 01:29:05 2007
@@ -207,10 +207,10 @@
         <wsdl:operation name="greetMe">
             <soap:operation style="rpc"/>
             <wsdl:input>
-                <soap:body use="literal"/>
+                <soap:body use="literal" 
namespace="http://apache.org/hello_world_soap_http"/>
             </wsdl:input>
             <wsdl:output>
-                <soap:body use="literal"/>
+                <soap:body use="literal" 
namespace="http://apache.org/hello_world_soap_http"/>
             </wsdl:output>
         </wsdl:operation>
         <wsdl:operation name="greetMeSometime">

Added: 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test.wsdl?view=auto&rev=522452
==============================================================================
--- 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test.wsdl
 (added)
+++ 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test.wsdl
 Mon Mar 26 01:29:05 2007
@@ -0,0 +1,172 @@
+<?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.

+-->

+<definitions name="HelloWorldService" 

+    targetNamespace="http://cxf.apache.org/hello_world_jms"; 

+    xmlns="http://schemas.xmlsoap.org/wsdl/"; 

+    xmlns:jms="http://cxf.apache.org/transports/jms"; 

+    xmlns:x1="http://cxf.apache.org/hello_world_jms/types";

+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 

+    xmlns:tns="http://cxf.apache.org/hello_world_jms"; 

+    xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

+    <types>

+        <schema targetNamespace="http://cxf.apache.org/hello_world_jms/types";  
    

+               xmlns="http://www.w3.org/2001/XMLSchema"; 

+               xmlns:x1="http://cxf.apache.org/hello_world_jms/types"; 

+               elementFormDefault="qualified">

+            <complexType name="ErrorCode">

+                 <sequence>

+                    <element name="minor" type="short"/>

+                    <element name="major" type="short"/>

+                </sequence>

+            </complexType>

+                <complexType name="testRpcLitFault">

+                    <sequence>

+                        <element name="faultType" type="string"/>

+                    </sequence>

+                </complexType>

+                <complexType name="testRpcLitFaultResponse">

+                    <sequence/>

+                </complexType>

+

+                <complexType name="NoSuchCodeLit">

+                    <sequence>

+                        <element name="code" type="x1:ErrorCode"/>

+                    </sequence>

+                </complexType>

+            <complexType name="BadRecord">

+                <sequence>

+                    <element name="reason" type="string"/>

+                    <element name="code" type="short"/>

+                </sequence>

+            </complexType>

+        </schema>

+    </types>

+

+    <message name="greetMe">

+        <part name="stringParam0" type="xsd:string"/>

+    </message>

+    <message name="greetMeResponse">

+        <part name="return" type="xsd:string"/>

+    </message>

+    <message name="sayHi"/>

+    <message name="sayHiResponse">

+        <part name="return" type="xsd:string"/>

+    </message>

+    <message name="greetMeOneWay">

+        <part name="stringParam0" type="xsd:string"/>

+    </message>

+    

+    <message name="testRpcLitFaultRequest">

+        <part name="in" type="xsd:string"/>

+    </message>

+    <message name="testRpcLitFaultResponse">

+        <part name="out" type="x1:testRpcLitFaultResponse"/>

+    </message>

+    <message name="NoSuchCodeLitFault">

+        <part name="NoSuchCodeLit" type="x1:NoSuchCodeLit"/>

+    </message>

+    <message name="BadRecordLitFault">

+        <part name="BadRecordLit" type="xsd:string"/>

+    </message>

+    

+    <portType name="HelloWorldPortType">

+        <operation name="greetMe">

+            <input message="tns:greetMe" name="greetMe"/>

+            <output message="tns:greetMeResponse" name="greetMeResponse"/>

+        </operation>

+        <operation name="sayHi">

+            <input message="tns:sayHi" name="sayHi"/>

+            <output message="tns:sayHiResponse" name="sayHiResponse"/>

+        </operation>

+        <operation name="greetMeOneWay">

+            <input message="tns:greetMeOneWay" name="greetMeOneWay"/>

+        </operation>

+        <operation name="testRpcLitFault">

+            <input name="testRpcLitFaultRequest" 
message="tns:testRpcLitFaultRequest"/>

+            <output name="testRpcLitFaultResponse" 
message="tns:testRpcLitFaultResponse"/>

+            <fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/>

+            <fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/>

+        </operation>

+    </portType>

+

+    <binding name="HelloWorldPortBinding" type="tns:HelloWorldPortType">

+        <soap:binding style="rpc" 
transport="http://cxf.apache.org/transports/jms"/>

+        <operation name="greetMe">

+            <soap:operation soapAction="" style="rpc"/>

+            <input name="greetMe">

+                <soap:body 

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </input>

+            <output name="greetMeResponse">

+                <soap:body  

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </output>

+        </operation>

+        <operation name="sayHi">

+            <soap:operation soapAction="" style="rpc"/>

+            <input name="sayHi">

+                <soap:body 

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </input>

+            <output name="sayHiResponse">

+                <soap:body 

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </output>

+        </operation>

+        <operation name="greetMeOneWay">

+            <soap:operation style="rpc"/>

+            <input name="greetMeOneWay">

+                <soap:body 

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </input>

+        </operation>

+

+         <operation name="testRpcLitFault">

+            <soap:operation style="rpc"/>

+            <input>

+                <soap:body namespace="http://cxf.apache.org/hello_world_jms";  
use="literal"/>

+            </input>

+            <output>

+                <soap:body namespace="http://cxf.apache.org/hello_world_jms";  
use="literal"/>

+            </output>

+            <fault name="NoSuchCodeLitFault">

+                <soap:fault name="NoSuchCodeLitFault" 
namespace="http://cxf.apache.org/hello_world_jms"; use="literal"/>

+            </fault>

+            <fault name="BadRecordLitFault">

+                <soap:fault name="BadRecordLitFault" 
namespace="http://cxf.apache.org/hello_world_jms"; use="literal"/>

+            </fault>

+        </operation>

+    </binding>

+

+    <service name="HelloWorldService">

+           <port binding="tns:HelloWorldPortBinding" name="HelloWorldPort">

+               <jms:address

+                   jndiConnectionFactoryName="ConnectionFactory" 

+                   jndiDestinationName="dynamicQueues/test.jmstransport.text">

+                   <jms:JMSNamingProperty name="java.naming.factory.initial" 
value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>

+                   <jms:JMSNamingProperty name="java.naming.provider.url" 
value="tcp://localhost:61500"/>

+               </jms:address>

+            

+               <jms:server durableSubscriberName="CXF_subscriber"/>

+           </port>

+    </service>

+</definitions>

+

+


Added: 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test2.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test2.wsdl?view=auto&rev=522452
==============================================================================
--- 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test2.wsdl
 (added)
+++ 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/jms_test2.wsdl
 Mon Mar 26 01:29:05 2007
@@ -0,0 +1,172 @@
+<?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.

+-->

+<definitions name="HelloWorldService" 

+    targetNamespace="http://cxf.apache.org/hello_world_jms"; 

+    xmlns="http://schemas.xmlsoap.org/wsdl/"; 

+    xmlns:jms="http://cxf.apache.org/transports/jms"; 

+    xmlns:x1="http://cxf.apache.org/hello_world_jms/types";

+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 

+    xmlns:tns="http://cxf.apache.org/hello_world_jms"; 

+    xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

+    <types>

+        <schema targetNamespace="http://cxf.apache.org/hello_world_jms/types";  
    

+               xmlns="http://www.w3.org/2001/XMLSchema"; 

+               xmlns:x1="http://cxf.apache.org/hello_world_jms/types"; 

+               elementFormDefault="qualified">

+            <complexType name="ErrorCode">

+                 <sequence>

+                    <element name="minor" type="short"/>

+                    <element name="major" type="short"/>

+                </sequence>

+            </complexType>

+                <complexType name="testRpcLitFault">

+                    <sequence>

+                        <element name="faultType" type="string"/>

+                    </sequence>

+                </complexType>

+                <complexType name="testRpcLitFaultResponse">

+                    <sequence/>

+                </complexType>

+

+                <complexType name="NoSuchCodeLit">

+                    <sequence>

+                        <element name="code" type="x1:ErrorCode"/>

+                    </sequence>

+                </complexType>

+            <complexType name="BadRecord">

+                <sequence>

+                    <element name="reason" type="string"/>

+                    <element name="code" type="short"/>

+                </sequence>

+            </complexType>

+        </schema>

+    </types>

+

+    <message name="greetMe">

+        <part name="stringParam0" type="xsd:string"/>

+    </message>

+    <message name="greetMeResponse">

+        <part name="return" type="xsd:string"/>

+    </message>

+    <message name="sayHi"/>

+    <message name="sayHiResponse">

+        <part name="return" type="xsd:string"/>

+    </message>

+    <message name="greetMeOneWay">

+        <part name="stringParam0" type="xsd:string"/>

+    </message>

+    

+    <message name="testRpcLitFaultRequest">

+        <part name="in" type="xsd:string"/>

+    </message>

+    <message name="testRpcLitFaultResponse">

+        <part name="out" type="x1:testRpcLitFaultResponse"/>

+    </message>

+    <message name="NoSuchCodeLitFault">

+        <part name="NoSuchCodeLit" type="x1:NoSuchCodeLit"/>

+    </message>

+    <message name="BadRecordLitFault">

+        <part name="BadRecordLit" type="xsd:string"/>

+    </message>

+    

+    <portType name="HelloWorldPortType">

+        <operation name="greetMe">

+            <input message="tns:greetMe" name="greetMe"/>

+            <output message="tns:greetMeResponse" name="greetMeResponse"/>

+        </operation>

+        <operation name="sayHi">

+            <input message="tns:sayHi" name="sayHi"/>

+            <output message="tns:sayHiResponse" name="sayHiResponse"/>

+        </operation>

+        <operation name="greetMeOneWay">

+            <input message="tns:greetMeOneWay" name="greetMeOneWay"/>

+        </operation>

+        <operation name="testRpcLitFault">

+            <input name="testRpcLitFaultRequest" 
message="tns:testRpcLitFaultRequest"/>

+            <output name="testRpcLitFaultResponse" 
message="tns:testRpcLitFaultResponse"/>

+            <fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/>

+            <fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/>

+        </operation>

+    </portType>

+

+    <binding name="HelloWorldPortBinding" type="tns:HelloWorldPortType">

+        <soap:binding style="rpc" 
transport="http://cxf.apache.org/transports/jms"/>

+        <operation name="greetMe">

+            <soap:operation soapAction="" style="rpc"/>

+            <input name="greetMe">

+                <soap:body 

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </input>

+            <output name="greetMeResponse">

+                <soap:body  

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </output>

+        </operation>

+        <operation name="sayHi">

+            <soap:operation soapAction="" style="rpc"/>

+            <input name="sayHi">

+                <soap:body 

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </input>

+            <output name="sayHiResponse">

+                <soap:body 

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </output>

+        </operation>

+        <operation name="greetMeOneWay">

+            <soap:operation style="rpc"/>

+            <input name="greetMeOneWay">

+                <soap:body 

+                    namespace="http://cxf.apache.org/hello_world_jms"; 
use="literal"/>

+            </input>

+        </operation>

+

+         <operation name="testRpcLitFault">

+            <soap:operation style="rpc"/>

+            <input>

+                <soap:body namespace="http://cxf.apache.org/hello_world_jms";  
use="literal"/>

+            </input>

+            <output>

+                <soap:body namespace="http://cxf.apache.org/hello_world_jms";  
use="literal"/>

+            </output>

+            <fault name="NoSuchCodeLitFault">

+                <soap:fault name="NoSuchCodeLitFault" use="literal"/>

+            </fault>

+            <fault name="BadRecordLitFault">

+                <soap:fault name="BadRecordLitFault" use="literal"/>

+            </fault>

+        </operation>

+    </binding>

+

+    <service name="HelloWorldService">

+           <port binding="tns:HelloWorldPortBinding" name="HelloWorldPort">

+               <jms:address

+                   jndiConnectionFactoryName="ConnectionFactory" 

+                   jndiDestinationName="dynamicQueues/test.jmstransport.text">

+                   <jms:JMSNamingProperty name="java.naming.factory.initial" 
value="org.apache.activemq.jndi.ActiveMQInitialContextFactory"/>

+                   <jms:JMSNamingProperty name="java.naming.provider.url" 
value="tcp://localhost:61500"/>

+               </jms:address>

+            

+               <jms:server durableSubscriberName="CXF_subscriber"/>

+           </port>

+    </service>

+</definitions>

+

+


Added: 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/soapheader.wsdl
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/soapheader.wsdl?view=auto&rev=522452
==============================================================================
--- 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/soapheader.wsdl
 (added)
+++ 
incubator/cxf/trunk/tools/validator/src/test/resources/validator_wsdl/soapheader.wsdl
 Mon Mar 26 01:29:05 2007
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="UTF-8"?>

+<!--

+  Licensed to the Apache Software Foundation (ASF) under one

+  or more contributor license agreements. See the NOTICE file

+  distributed with this work for additional information

+  regarding copyright ownership. The ASF licenses this file

+  to you under the Apache License, Version 2.0 (the

+  "License"); you may not use this file except in compliance

+  with the License. You may obtain a copy of the License at

+ 

+  http://www.apache.org/licenses/LICENSE-2.0

+ 

+  Unless required by applicable law or agreed to in writing,

+  software distributed under the License is distributed on an

+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY

+  KIND, either express or implied. See the License for the

+  specific language governing permissions and limitations

+  under the License.

+-->

+<wsdl:definitions xmlns="http://schemas.xmlsoap.org/wsdl/"; 

+                 xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 

+                 xmlns:tns="http://apache.org/header_test"; 

+                 xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 

+                 xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 

+                 targetNamespace="http://apache.org/header_test"; 

+                 name="TestHeaderWSDL"

+                 xmlns:all="http://apache.org/tests/type_test/all";

+                 xmlns:chc="http://apache.org/tests/type_test/choice";

+                 xmlns:seq="http://apache.org/tests/type_test/sequence";>

+    <wsdl:types>

+        <schema xmlns="http://www.w3.org/2001/XMLSchema"; 

+            targetNamespace="http://apache.org/tests/type_test/all";>

+            <element name="test_all" type="all:SimpleAll"/>

+            <complexType name="SimpleAll">

+                <all>

+                    <element name="varFloat" type="float"/>

+                    <element name="varInt" type="int"/>

+                    <element name="varString" type="string"/>

+                </all>

+                <attribute name="varAttrString" type="string"/>

+            </complexType>

+        </schema>

+        <schema xmlns="http://www.w3.org/2001/XMLSchema"; 

+            targetNamespace="http://apache.org/tests/type_test/sequence";>

+            <element name="test_seq" type="seq:SimpleStruct"/>

+            <complexType name="SimpleStruct">

+                <sequence>

+                    <element name="varFloat" type="float"/>

+                    <element name="varInt" type="int"/>

+                    <element name="varString" type="string"/>

+                </sequence>

+                <attribute name="varAttrString" type="string"/>

+            </complexType>

+        </schema>

+        <schema xmlns="http://www.w3.org/2001/XMLSchema"; 

+            targetNamespace="http://apache.org/tests/type_test/choice";>

+            <element name="test_chc" type="chc:SimpleChoice"/>

+            <complexType name="SimpleChoice">

+                <choice>

+                    <element name="varFloat" type="float"/>

+                    <element name="varInt" type="int"/>

+                    <element name="varString" type="string"/>

+                </choice>

+            </complexType>

+        </schema>

+    </wsdl:types>

+    <message name="AnyTypeRequest">

+        <part name="x" element="all:test_all"/>

+        <part name="y" element="chc:test_chc"/>

+    </message>

+    <message name="AnyTypeResponse">

+        <part name="x" element="all:test_all"/>

+        <part name="return" element="seq:test_seq"/>

+    </message>

+    <wsdl:portType name="TestHeader">

+        <operation name="send_receive_any_type">

+            <input name="send_receive_any_type_request" 
message="tns:AnyTypeRequest"/>

+            <output name="send_receive_any_type_response" 
message="tns:AnyTypeResponse"/>

+        </operation>

+    </wsdl:portType>

+    <wsdl:binding name="TestHeader_SOAPBinding" type="tns:TestHeader">

+        <soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>

+        <operation name="send_receive_any_type">

+            <soap:operation soapAction="" style="document"/>

+            <input>

+                <soap:body use="literal"/>

+            </input>

+            <output>

+                <soap:body use="literal"/>

+            </output>

+        </operation>

+    </wsdl:binding>

+    <wsdl:service name="SOAPHeaderService">

+        <wsdl:port name="SoapHeaderPort" binding="tns:TestHeader_SOAPBinding">

+            <soap:address 
location="http://localhost:9104/SoapHeaderContext/SoapHeaderPort"/>

+        </wsdl:port>

+    </wsdl:service>

+</wsdl:definitions>


Modified: 
incubator/cxf/trunk/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java?view=diff&rev=522452&r1=522451&r2=522452
==============================================================================
--- 
incubator/cxf/trunk/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java
 (original)
+++ 
incubator/cxf/trunk/tools/wsdlto/misc/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java
 Mon Mar 26 01:29:05 2007
@@ -40,6 +40,7 @@
 import org.apache.cxf.tools.common.WSDLConstants;
 import org.apache.cxf.tools.common.extensions.soap.SoapBinding;
 import org.apache.cxf.tools.common.extensions.soap.SoapBody;
+import org.apache.cxf.tools.common.extensions.soap.SoapFault;
 import org.apache.cxf.tools.common.extensions.soap.SoapOperation;
 import org.apache.cxf.tools.misc.WSDLToSoap;
 import org.apache.cxf.tools.util.SOAPBindingUtil;
@@ -119,6 +120,9 @@
             if (!found) {
                 fail("Element soap:fault Missed!");
             }
+            List<SoapFault> faults = 
SOAPBindingUtil.getBindingOperationSoapFaults(bo);
+            assertEquals(1, faults.size());
+            assertEquals("pingMeFault", faults.get(0).getName());
         } catch (ToolException e) {
             fail("Exception Encountered when parsing wsdl, error: " + 
e.getMessage());
         }


Reply via email to