You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by mm...@apache.org on 2006/10/19 13:56:31 UTC

svn commit: r465588 - in /incubator/cxf/trunk: api/src/main/java/org/apache/cxf/service/model/ distribution/src/main/release/samples/hello_world/src/demo/hw/client/ distribution/src/main/release/samples/soap12/ distribution/src/main/release/samples/soa...

Author: mmao
Date: Thu Oct 19 04:56:29 2006
New Revision: 465588

URL: http://svn.apache.org/viewvc?view=rev&rev=465588
Log:
Added more soap1.2 test
Added soap1.2 demo
Fixed getFault in BindingOperationInfo, should use QName instead of String
Fault unit test check the fault details

Added:
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Client.java   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/GreeterImpl.java   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/Server.java   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/cxf-servlet.xml   (with props)
    incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/hello_world_soap12.wsdl   (with props)
Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/BindingOperationInfo.java
    incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/src/demo/hw/client/Client.java
    incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java
    incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java
    incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
    incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/GreeterImpl.java
    incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
    incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_soap12.wsdl
    incubator/cxf/trunk/tools/java2wsdl/src/test/resources/java2wsdl_wsdl/hello_world_soap12.wsdl
    incubator/cxf/trunk/tools/misctools/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java
    incubator/cxf/trunk/tools/misctools/src/test/resources/misctools_wsdl/hello_world_soap12.wsdl
    incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java
    incubator/cxf/trunk/tools/wsdl2java/src/test/resources/wsdl2java_wsdl/hello_world_soap12.wsdl

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/BindingOperationInfo.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/BindingOperationInfo.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/BindingOperationInfo.java (original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/service/model/BindingOperationInfo.java Thu Oct 19 04:56:29 2006
@@ -98,7 +98,7 @@
         return outputMessage;
     }
     
-    public BindingFaultInfo getFault(String name) {
+    public BindingFaultInfo getFault(QName name) {
         if (faults != null) {
             return faults.get(name);
         }

Modified: incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/src/demo/hw/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/src/demo/hw/client/Client.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/src/demo/hw/client/Client.java (original)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/hello_world/src/demo/hw/client/Client.java Thu Oct 19 04:56:29 2006
@@ -26,6 +26,7 @@
 import org.apache.hello_world_soap_http.Greeter;
 import org.apache.hello_world_soap_http.PingMeFault;
 import org.apache.hello_world_soap_http.SOAPService;
+import org.apache.hello_world_soap_http.types.FaultDetail;
 
 public final class Client {
 
@@ -85,7 +86,10 @@
             port.pingMe();
         } catch (PingMeFault ex) {
             System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
-        }
+            FaultDetail detail = ex.getFaultInfo();
+            System.out.println("FaultDetail major:" + detail.getMajor());
+            System.out.println("FaultDetail minor:" + detail.getMinor());            
+        }          
         System.exit(0); 
     }
 

Added: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt?view=auto&rev=465588
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt Thu Oct 19 04:56:29 2006
@@ -0,0 +1,153 @@
+Hello World SOAP12 Demo using Document/Literal Style
+=============================================
+
+This is exactly as same as Hello World demo but using SOAP 1.2
+
+Please review the README in the samples directory before
+continuing.
+
+
+
+Prerequisite
+------------
+
+If your environment already includes cxf.jar on the
+CLASSPATH, and the JDK and ant bin directories on the PATH
+it is not necessary to run the environment script described in
+the samples directory README.  If your environment is not
+properly configured, or if you are planning on using wsdl2java,
+javac, and java to build and run the demos, you must set the
+environment by running the script.
+
+
+
+Building and running the demo using ant
+---------------------------------------
+
+From the samples/hello_world directory, the ant build script
+can be used to build and run the demo.
+
+Using either UNIX or Windows:
+
+  ant build
+  ant server
+  ant client
+    
+
+To remove the code generated from the WSDL file and the .class
+files, run:
+
+  ant clean
+
+
+
+Buildng the demo using wsdl2java and javac
+------------------------------------------
+
+From the samples/hello_world directory, first create the target
+directory build/classes and then generate code from the WSDL file.
+
+For UNIX:
+  mkdir -p build/classes
+
+  wsdl2java -d build/classes -compile ./wsdl/hello_world_soap12.wsdl
+
+For Windows:
+  mkdir build\classes
+    Must use back slashes.
+
+  wsdl2java -d build\classes -compile .\wsdl\hello_world_soap12.wsdl
+    May use either forward or back slashes.
+
+Now compile the provided client and server applications with the commands:
+
+For UNIX:  
+  
+  export CLASSPATH=$CLASSPATH:$CXF_HOME/lib/cxf.jar:./build/classes
+  javac -d build/classes src/demo/hw/client/*.java
+  javac -d build/classes src/demo/hw/server/*.java
+
+For Windows:
+  set classpath=%classpath%;%CXF_HOME%\lib\cxf.jar;.\build\classes
+  javac -d build\classes src\demo\hw\client\*.java
+  javac -d build\classes src\demo\hw\server\*.java
+
+
+
+Running the demo using java
+---------------------------
+
+From the samples/hello_world directory run the commands, entered on a
+single command line:
+
+For UNIX (must use forward slashes):
+    java -Djava.util.logging.config.file=$CXF_HOME/etc/logging.properties
+         demo.hw.server.Server &
+
+    java -Djava.util.logging.config.file=$CXF_HOME/etc/logging.properties
+         demo.hw.client.Client ./wsdl/hello_world_soap12.wsdl
+
+The server process starts in the background.  After running the client,
+use the kill command to terminate the server process.
+
+For Windows (may use either forward or back slashes):
+  start 
+    java -Djava.util.logging.config.file=%CXF_HOME%\etc\logging.properties
+         demo.hw.server.Server
+
+    java -Djava.util.logging.config.file=%CXF_HOME%\etc\logging.properties
+       demo.hw.client.Client .\wsdl\hello_world_soap12.wsdl
+
+A new command windows opens for the server process.  After running the
+client, terminate the server process by issuing Ctrl-C in its command window.
+
+To remove the code generated from the WSDL file and the .class
+files, either delete the build directory and its contents or run:
+
+  ant clean
+
+
+
+Building and running the demo in a servlet container
+----------------------------------------------------
+
+From the samples/hello_world directory, the ant build script
+can be used to create the war file that is deployed into the
+servlet container.
+
+Build the war file with the command:
+
+  ant war
+    
+
+The war file will be included in the directory
+samples/hello_world/build/war.  Simply copy the war file into
+the servlet container's deployment directory.  For example,
+with Tomcat copy the war file into the directory
+<installationDirectory>/webapps.  The servlet container will
+extract the war and deploy the application.
+
+Make sure already copy all jars from CXF_HOME/lib to
+<TomcatInstallationDirectory>/shared/lib
+
+Using ant, run the client application with the command:
+
+  ant client-servlet -Dbase.url=http://localhost:#
+
+Where # is the TCP/IP port used by the servlet container,
+e.g., 8080.
+
+Using java, run the client application with the command:
+
+  For UNIX:
+    
+    java -Djava.util.logging.config.file=$CXF_HOME/etc/logging.properties
+         demo.hw.client.Client http://localhost:#/helloworld/cxf/hello_world
+
+  For Windows:
+
+    java -Djava.util.logging.config.file=%CXF_HOME%\etc\logging.properties
+       demo.hw.client.Client http://localhost:#/helloworld/cxf/hello_world
+
+Where # is the TCP/IP port used by the servlet container,
+e.g., 8080.

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/README.txt
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml?view=auto&rev=465588
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml Thu Oct 19 04:56:29 2006
@@ -0,0 +1,50 @@
+<?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.
+-->
+<project name="hello world demo" default="build" basedir=".">
+
+    <import file="../common_build.xml"/>        
+        
+    <target name="client" description="run demo client" depends="build">
+        <property name="param" value=""/>
+        <cxfrun classname="demo.hw.client.Client"
+            param1="${basedir}/wsdl/hello_world_soap12.wsdl" 
+            param2="${op}" 
+            param3="${param}"/>
+    </target> 
+        
+    <target name="server" description="run demo server" depends="build">
+        <cxfrun classname="demo.hw.server.Server" 
+            param1="${basedir}/wsdl/hello_world_soap12.wsdl"/>
+    </target>
+        
+    <target name="generate.code">
+        <echo level="info" message="Generating code using wsdl2java..."/>
+        <wsdl2java file="hello_world_soap12.wsdl"/>
+    </target>
+    
+    <target name="war" depends="build">
+        <cxfwar wsdl="hello_world_soap12.wsdl" filename="helloworld.war"/>
+	</target>
+
+    <target name="client-servlet" description="run demo client hitting servlet" depends="build">
+        <property name="param" value=""/>
+        <cxfrun classname="demo.hw.client.Client" param1="${base.url}/helloworld/cxf/hello_world" param2="${op}" param3="${param}"/>
+    </target> 
+</project>

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/build.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Client.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Client.java?view=auto&rev=465588
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Client.java (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Client.java Thu Oct 19 04:56:29 2006
@@ -0,0 +1,96 @@
+/**
+ * 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 demo.hw.client;
+
+import java.io.File;
+import java.net.URL;
+import javax.xml.namespace.QName;
+import javax.xml.ws.ProtocolException;
+import org.apache.hello_world_soap12_http.Greeter;
+import org.apache.hello_world_soap12_http.PingMeFault;
+import org.apache.hello_world_soap12_http.SOAPService;
+import org.apache.hello_world_soap12_http.types.FaultDetail;
+
+public final class Client {
+
+    private static final QName SERVICE_NAME 
+        = new QName("http://apache.org/hello_world_soap12_http", "SOAPService");
+
+
+    private Client() {
+    } 
+
+    public static void main(String args[]) throws Exception {
+        
+        if (args.length == 0) { 
+            System.out.println("please specify wsdl");
+            System.exit(1); 
+        }
+
+        URL wsdlURL;
+        File wsdlFile = new File(args[0]);
+        if (wsdlFile.exists()) {
+            wsdlURL = wsdlFile.toURL();
+        } else {
+            wsdlURL = new URL(args[0]);
+        }
+        
+        System.out.println(wsdlURL);
+        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
+        Greeter port = ss.getSoapPort();
+        String resp; 
+
+        System.out.println("Invoking sayHi...");
+        resp = port.sayHi();
+        System.out.println("Server responded with: " + resp);
+        System.out.println();
+
+        System.out.println("Invoking greetMe...");
+        resp = port.greetMe(System.getProperty("user.name"));
+        System.out.println("Server responded with: " + resp);
+        System.out.println();
+
+        System.out.println("Invoking greetMe with invalid length string, expecting exception...");
+        try {
+            resp = port.greetMe("Invoking greetMe with invalid length string, expecting exception...");
+        } catch (ProtocolException e) {
+            System.out.println("Expected exception has occurred: " + e.getClass().getName());
+        }
+
+        System.out.println();
+
+        System.out.println("Invoking greetMeOneWay...");
+        port.greetMeOneWay(System.getProperty("user.name"));
+        System.out.println("No response from server as method is OneWay");
+        System.out.println();
+
+        try {
+            System.out.println("Invoking pingMe, expecting exception...");
+            port.pingMe();
+        } catch (PingMeFault ex) {
+            System.out.println("Expected exception: PingMeFault has occurred: " + ex.getMessage());
+            FaultDetail detail = ex.getFaultInfo();
+            System.out.println("FaultDetail major:" + detail.getMajor());
+            System.out.println("FaultDetail minor:" + detail.getMinor());            
+        }          
+        System.exit(0); 
+    }
+
+}

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Client.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/client/Client.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/GreeterImpl.java?view=auto&rev=465588
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/GreeterImpl.java (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/GreeterImpl.java Thu Oct 19 04:56:29 2006
@@ -0,0 +1,65 @@
+/**
+ * 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 demo.hw.server;
+
+import java.util.logging.Logger;
+import org.apache.hello_world_soap12_http.Greeter;
+import org.apache.hello_world_soap12_http.PingMeFault;
+import org.apache.hello_world_soap12_http.types.FaultDetail;
+
+@javax.jws.WebService(portName = "SoapPort", serviceName = "SOAPService", 
+                      targetNamespace = "http://apache.org/hello_world_soap12_http", 
+                      endpointInterface = "org.apache.hello_world_soap12_http.Greeter")
+                  
+public class GreeterImpl implements Greeter {
+
+    private static final Logger LOG = 
+        Logger.getLogger(GreeterImpl.class.getPackage().getName());
+    
+    public String greetMe(String me) {
+        LOG.info("Executing operation greetMe");
+        System.out.println("Executing operation greetMe");
+        System.out.println("Message received: " + me + "\n");
+        return "Hello " + me;
+    }
+    
+    public void greetMeOneWay(String me) {
+        LOG.info("Executing operation greetMeOneWay");
+        System.out.println("Executing operation greetMeOneWay\n");
+        System.out.println("Hello there " + me);
+    }
+
+    public String sayHi() {
+        LOG.info("Executing operation sayHi");
+        System.out.println("Executing operation sayHi\n");
+        return "Bonjour";
+    }
+    
+    public void pingMe() throws PingMeFault {
+        FaultDetail faultDetail = new FaultDetail();
+        faultDetail.setMajor((short)2);
+        faultDetail.setMinor((short)1);
+        LOG.info("Executing operation pingMe, throwing PingMeFault exception");
+        System.out.println("Executing operation pingMe, throwing PingMeFault exception\n");
+        throw new PingMeFault("PingMeFault raised by server", faultDetail);
+    }
+
+    
+}

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/GreeterImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/GreeterImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/Server.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/Server.java?view=auto&rev=465588
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/Server.java (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/Server.java Thu Oct 19 04:56:29 2006
@@ -0,0 +1,42 @@
+/**
+ * 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 demo.hw.server;
+
+import javax.xml.ws.Endpoint;
+
+public class Server {
+
+    protected Server() throws Exception {
+        System.out.println("Starting Server");
+
+        Object implementor = new GreeterImpl();
+        String address = "http://localhost:9000/SoapContext/SoapPort";
+        Endpoint.publish(address, implementor);
+    }
+
+    public static void main(String args[]) throws Exception {
+        new Server();
+        System.out.println("Server ready...");
+
+        Thread.sleep(5 * 60 * 1000);
+        System.out.println("Server exiting");
+        System.exit(0);
+    }
+}

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/Server.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/src/demo/hw/server/Server.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/cxf-servlet.xml
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/cxf-servlet.xml?view=auto&rev=465588
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/cxf-servlet.xml (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/cxf-servlet.xml Thu Oct 19 04:56:29 2006
@@ -0,0 +1,31 @@
+<?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.
+-->
+<endpoints>
+
+    <endpoint
+        name="hello_world_soap12"
+        interface="org.apache.hello_world_soap12_http.Greeter"
+        implementation="demo.hw.server.GreeterImpl"
+        wsdl="WEB-INF/wsdl/hello_world_soap12.wsdl"
+        service="{http://apache.org/hello_world_soap12_http}SOAPService"
+        port="{http://apache.org/hello_world_soap12_http}SOAPPort"
+        url-pattern="/hello_world_soap12" />
+
+</endpoints>

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/cxf-servlet.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/hello_world_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/hello_world_soap12.wsdl?view=auto&rev=465588
==============================================================================
--- incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/hello_world_soap12.wsdl (added)
+++ incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/hello_world_soap12.wsdl Thu Oct 19 04:56:29 2006
@@ -0,0 +1,179 @@
+<?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="HelloWorld"
+	     xmlns="http://schemas.xmlsoap.org/wsdl/"
+	     xmlns:tns="http://apache.org/hello_world_soap12_http"
+	     xmlns:x1="http://apache.org/hello_world_soap12_http/types"
+	     xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+	     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	     targetNamespace="http://apache.org/hello_world_soap12_http"
+	     xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/">
+    <wsdl:types>
+	<schema targetNamespace="http://apache.org/hello_world_soap12_http/types" 
+		xmlns="http://www.w3.org/2001/XMLSchema" 
+		xmlns:x1="http://apache.org/hello_world_soap12_http/types" 
+		elementFormDefault="qualified">
+	    <simpleType name="MyStringType">
+		<restriction base="string">
+		    <maxLength value="30" />
+		</restriction>
+	    </simpleType>
+
+	    <element name="sayHi">
+		<complexType/>
+	    </element>
+	    <element name="sayHiResponse">
+		<complexType>
+		    <sequence>
+			<element name="responseType" type="string"/>
+		    </sequence>
+		</complexType>
+	    </element>
+            <element name="greetMe">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="x1:MyStringType"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeOneWay">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+	    <element name="pingMe">
+		<complexType/>
+	    </element>
+	    <element name="pingMeResponse">
+		<complexType/>
+	    </element>
+	    <element name="faultDetail">
+		<complexType>
+		    <sequence>
+			<element name="minor" type="short"/>
+			<element name="major" type="short"/>
+		    </sequence>
+                </complexType>
+	    </element>
+        </schema>
+    </wsdl:types>
+
+    <wsdl:message name="sayHiRequest">
+        <wsdl:part name="in" element="x1:sayHi"/>
+    </wsdl:message>
+    <wsdl:message name="sayHiResponse">
+        <wsdl:part name="out" element="x1:sayHiResponse"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeRequest">
+        <wsdl:part element="x1:greetMe" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeResponse">
+        <wsdl:part element="x1:greetMeResponse" name="out"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeOneWayRequest">
+        <wsdl:part element="x1:greetMeOneWay" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeRequest">
+	<wsdl:part name="in" element="x1:pingMe"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeResponse">
+        <wsdl:part name="out" element="x1:pingMeResponse"/>
+    </wsdl:message>		
+    <wsdl:message name="pingMeFault">
+	<wsdl:part name="faultDetail" element="x1:faultDetail"/>
+    </wsdl:message>
+
+    <wsdl:portType name="Greeter">
+        <wsdl:operation name="sayHi">
+            <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/>
+            <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/>
+        </wsdl:operation>
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <wsdl:input message="tns:greetMeOneWayRequest" name="greetMeOneWayRequest"/>
+        </wsdl:operation>
+	<wsdl:operation name="pingMe">
+	    <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+	    <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+	    <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+        </wsdl:operation> 
+    </wsdl:portType>
+
+    <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+	<soap12:binding transport="http://www.w3.org/2003/05/soap/bindings/HTTP/" style="document" />
+	<operation name="sayHi">
+	    <soap12:operation style="document" soapAction=""/>
+	    <input>
+		<soap12:body use="literal" />
+	    </input>
+	    <output>
+		<soap12:body use="literal" />
+	    </output>
+	</operation>
+        <wsdl:operation name="greetMe">
+            <soap12:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeRequest">
+                <soap12:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output name="greetMeResponse">
+                <soap12:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
+        
+        <wsdl:operation name="greetMeOneWay">
+            <soap12:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeOneWayRequest">
+                <soap12:body use="literal"/>
+            </wsdl:input>
+        </wsdl:operation>
+	<operation name="pingMe">
+	    <soap12:operation style="document"/>
+	    <input>
+                <soap12:body use="literal"/>
+            </input>
+            <output>
+                <soap12:body use="literal"/>
+            </output>
+            <fault name="pingMeFault">
+                <soap12:fault name="pingMeFault" use="literal"/>
+            </fault>
+        </operation>
+    </wsdl:binding>
+
+    <wsdl:service name="SOAPService">
+        <wsdl:port name="SoapPort" binding="tns:Greeter_SOAPBinding">
+            <soap12:address location="http://localhost:9000/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+</definitions>

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/hello_world_soap12.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/hello_world_soap12.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/cxf/trunk/distribution/src/main/release/samples/soap12/wsdl/hello_world_soap12.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/main/java/org/apache/cxf/binding/soap/interceptor/Soap12FaultInInterceptor.java Thu Oct 19 04:56:29 2006
@@ -37,11 +37,19 @@
 import org.apache.cxf.common.util.StringUtils;
 import org.apache.cxf.helpers.XMLUtils;
 import org.apache.cxf.helpers.XPathUtils;
+import org.apache.cxf.interceptor.ClientFaultConverter;
 import org.apache.cxf.interceptor.Fault;
+import org.apache.cxf.phase.Phase;
 import org.apache.cxf.staxutils.FragmentStreamReader;
 import org.apache.cxf.staxutils.StaxUtils;
 
 public class Soap12FaultInInterceptor extends AbstractSoapInterceptor {
+    
+    public Soap12FaultInInterceptor() {
+        super();
+        setPhase(Phase.MARSHAL);
+        addBefore(ClientFaultConverter.class.getName());
+    }
 
     public void handleMessage(SoapMessage message) throws Fault {
         String exMessage = null;

Modified: incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java (original)
+++ incubator/cxf/trunk/rt/bindings/soap/src/test/java/org/apache/cxf/binding/soap/SoapBindingFactoryTest.java Thu Oct 19 04:56:29 2006
@@ -20,6 +20,7 @@
 package org.apache.cxf.binding.soap;
 
 import java.net.URL;
+import java.util.Collection;
 import java.util.List;
 
 import javax.wsdl.Definition;
@@ -37,6 +38,7 @@
 import org.apache.cxf.binding.soap.model.SoapBindingInfo;
 import org.apache.cxf.binding.soap.model.SoapBodyInfo;
 import org.apache.cxf.binding.soap.model.SoapOperationInfo;
+import org.apache.cxf.service.model.BindingFaultInfo;
 import org.apache.cxf.service.model.BindingInfo;
 import org.apache.cxf.service.model.BindingMessageInfo;
 import org.apache.cxf.service.model.BindingOperationInfo;
@@ -153,6 +155,16 @@
         List<MessagePartInfo> parts = bodyInfo.getParts();
         assertNotNull(parts);
         assertEquals(1, parts.size());
+        
+        boi = sbi.getOperation(new QName("http://apache.org/hello_world_soap12_http", "pingMe"));
+        sboi = boi.getExtensor(SoapOperationInfo.class);
+        assertNotNull(sboi);
+        assertEquals("document", sboi.getStyle());
+        Collection<BindingFaultInfo> faults = boi.getFaults();
+        assertEquals(1, faults.size());
+        BindingFaultInfo faultInfo = boi.getFault(new QName("http://apache.org/hello_world_soap12_http", 
+                                                            "pingMeFault"));
+        assertNotNull(faultInfo);
     }
     
 

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/binding/AbstractBindingFactory.java Thu Oct 19 04:56:29 2006
@@ -109,8 +109,8 @@
                     copyExtensors(bop2.getOutput(), bop.getBindingOutput().getExtensibilityElements());
                 }
                 for (BindingFault f : cast(bop.getBindingFaults().values(), BindingFault.class)) {
-                    copyExtensors(bop2.getFault(f.getName()), bop.getBindingFault(f.getName())
-                        .getExtensibilityElements());
+                    copyExtensors(bop2.getFault(new QName(service.getTargetNamespace(), f.getName())),
+                                  bop.getBindingFault(f.getName()).getExtensibilityElements());
                 }
             }
         }

Modified: incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java (original)
+++ incubator/cxf/trunk/rt/core/src/main/java/org/apache/cxf/wsdl11/WSDLServiceBuilder.java Thu Oct 19 04:56:29 2006
@@ -269,8 +269,9 @@
                         handleHeader(bop2.getOutput());
                     }
                     for (BindingFault f : cast(bop.getBindingFaults().values(), BindingFault.class)) {
-                        copyExtensors(bop2.getFault(f.getName()), bop.getBindingFault(f.getName())
-                            .getExtensibilityElements());
+                        copyExtensors(bop2.getFault(new QName(service.getTargetNamespace(),
+                                                              f.getName())), 
+                                      bop.getBindingFault(f.getName()).getExtensibilityElements());
                     }
                 }
 

Modified: incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java (original)
+++ incubator/cxf/trunk/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/JaxWsClientTest.java Thu Oct 19 04:56:29 2006
@@ -109,7 +109,8 @@
             client.invoke(bop, new Object[] {"BadRecordLitFault"}, null);
             fail("Should have returned a fault!");
         } catch (BadRecordLitFault fault) {
-            // this is supposed to happen
+            assertEquals("foo", fault.getFaultInfo().trim());
+            assertEquals("Hadrian did it.", fault.getMessage());
         }
         
         try {
@@ -117,7 +118,8 @@
             client.invoke(bop, new Object[] {"BadRecordLitFault"}, null);
             fail("Should have returned a fault!");
         } catch (Fault fault) {
-            // this is supposed to happen
+            assertEquals("Foo", fault.getCode());
+            assertEquals("Foo", fault.getMessage());
         } 
     }
 

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/jaxws/ClientServerTest.java Thu Oct 19 04:56:29 2006
@@ -57,11 +57,11 @@
                                              "SoapPort");
     
     private final QName fakePortName = new QName("http://apache.org/hello_world_soap_http",
-                                             "FackPort");
+                                                 "FackPort");
     
     
     private final QName portName1  = new QName("http://apache.org/hello_world_soap_http",
-                "SoapPort2");
+                                               "SoapPort2");
 
     public static class Server extends TestServerBase {
         
@@ -92,10 +92,10 @@
     public static Test suite() throws Exception {
         TestSuite suite = new TestSuite(ClientServerTest.class);
         return new ClientServerSetupBase(suite) {
-            public void startServers() throws Exception {
-                assertTrue("server did not launch correctly", launchServer(Server.class));
-            }
-        };
+                public void startServers() throws Exception {
+                    assertTrue("server did not launch correctly", launchServer(Server.class));
+                }
+            };
         
 
          

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/GreeterImpl.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/GreeterImpl.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/GreeterImpl.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/GreeterImpl.java Thu Oct 19 04:56:29 2006
@@ -21,6 +21,8 @@
 
 import java.util.logging.Logger;
 import org.apache.hello_world_soap12_http.Greeter;
+import org.apache.hello_world_soap12_http.PingMeFault;
+import org.apache.hello_world_soap12_http.types.FaultDetail;
 
 @javax.jws.WebService(portName = "SoapPort", serviceName = "SOAPService", 
                       targetNamespace = "http://apache.org/hello_world_soap12_http", 
@@ -38,5 +40,14 @@
         LOG.info("Executing operation sayHi");
         System.out.println("Executing operation sayHi\n");
         return "Bonjour";
-    }    
+    }
+    
+    public void pingMe() throws PingMeFault {
+        FaultDetail faultDetail = new FaultDetail();
+        faultDetail.setMajor((short)2);
+        faultDetail.setMinor((short)1);
+        LOG.info("Executing operation pingMe, throwing PingMeFault exception");
+        System.out.println("Executing operation pingMe, throwing PingMeFault exception\n");
+        throw new PingMeFault("PingMeFault raised by server", faultDetail);        
+    }
 }

Modified: incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java (original)
+++ incubator/cxf/trunk/systests/src/test/java/org/apache/cxf/systest/soap12/Soap12ClientServerTest.java Thu Oct 19 04:56:29 2006
@@ -30,7 +30,9 @@
 import org.apache.cxf.systest.common.ClientServerSetupBase;
 import org.apache.cxf.systest.common.ClientServerTestBase;
 import org.apache.hello_world_soap12_http.Greeter;
+import org.apache.hello_world_soap12_http.PingMeFault;
 import org.apache.hello_world_soap12_http.SOAPService;
+import org.apache.hello_world_soap12_http.types.FaultDetail;
 
 public class Soap12ClientServerTest extends ClientServerTestBase {    
 
@@ -49,20 +51,36 @@
     }
 
     public void testBasicConnection() throws Exception {
+        Greeter greeter = getGreeter();
+        for (int i = 0; i < 5; i++) {
+            String echo = greeter.sayHi();
+            assertEquals("Bonjour", echo);
+        }
+
+    }
+
+    public void testPingMeFault() throws Exception {
+        Greeter greeter = getGreeter();
+        try {
+            greeter.pingMe();
+            fail("Should throw Exception!");
+        } catch (PingMeFault ex) {
+            FaultDetail detail = ex.getFaultInfo();
+            assertEquals((short)2, detail.getMajor());
+            assertEquals((short)1, detail.getMinor());
+            assertEquals("PingMeFault raised by server", ex.getMessage());            
+        }
+    }
+
+    private Greeter getGreeter() {
         URL wsdl = getClass().getResource("/wsdl/hello_world_soap12.wsdl");
         assertNotNull("WSDL is null", wsdl);
 
         SOAPService service = new SOAPService(wsdl, serviceName);
         assertNotNull("Service is ull ", service);
 
-        Greeter greeter = service.getPort(portName,
-                                          Greeter.class);
-        
-        for (int i = 0; i < 5; i++) {
-            String echo = greeter.sayHi();
-            assertEquals("Bonjour", echo);
-        }
-
+        return service.getPort(portName,
+                               Greeter.class);
     }
 
     public static void main(String[] args) {

Modified: incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_soap12.wsdl?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_soap12.wsdl (original)
+++ incubator/cxf/trunk/testutils/src/main/resources/wsdl/hello_world_soap12.wsdl Thu Oct 19 04:56:29 2006
@@ -41,6 +41,20 @@
 		    </sequence>
 		</complexType>
 	    </element>
+	    <element name="pingMe">
+		<complexType/>
+	    </element>
+	    <element name="pingMeResponse">
+		<complexType/>
+	    </element>
+	    <element name="faultDetail">
+		<complexType>
+		    <sequence>
+			<element name="minor" type="short"/>
+			<element name="major" type="short"/>
+		    </sequence>
+                </complexType>
+	    </element>
         </schema>
     </wsdl:types>
 
@@ -51,11 +65,26 @@
         <wsdl:part name="out" element="x1:sayHiResponse"/>
     </wsdl:message>
 
+    <wsdl:message name="pingMeRequest">
+	<wsdl:part name="in" element="x1:pingMe"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeResponse">
+        <wsdl:part name="out" element="x1:pingMeResponse"/>
+    </wsdl:message>		
+    <wsdl:message name="pingMeFault">
+	<wsdl:part name="faultDetail" element="x1:faultDetail"/>
+    </wsdl:message>
+
     <wsdl:portType name="Greeter">
         <wsdl:operation name="sayHi">
             <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/>
             <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/>
         </wsdl:operation>
+	<wsdl:operation name="pingMe">
+	    <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+	    <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+	    <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+        </wsdl:operation> 
     </wsdl:portType>
 
     <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
@@ -69,6 +98,18 @@
 		<soap12:body use="literal" />
 	    </output>
 	</operation>
+	<operation name="pingMe">
+	    <soap12:operation style="document"/>
+	    <input>
+                <soap12:body use="literal"/>
+            </input>
+            <output>
+                <soap12:body use="literal"/>
+            </output>
+            <fault name="pingMeFault">
+                <soap12:fault name="pingMeFault" use="literal"/>
+            </fault>
+        </operation>
     </wsdl:binding>
 
     <wsdl:service name="SOAPService">

Modified: incubator/cxf/trunk/tools/java2wsdl/src/test/resources/java2wsdl_wsdl/hello_world_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/java2wsdl/src/test/resources/java2wsdl_wsdl/hello_world_soap12.wsdl?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/tools/java2wsdl/src/test/resources/java2wsdl_wsdl/hello_world_soap12.wsdl (original)
+++ incubator/cxf/trunk/tools/java2wsdl/src/test/resources/java2wsdl_wsdl/hello_world_soap12.wsdl Thu Oct 19 04:56:29 2006
@@ -41,6 +41,20 @@
 		    </sequence>
 		</complexType>
 	    </element>
+	    <element name="pingMe">
+		<complexType/>
+	    </element>
+	    <element name="pingMeResponse">
+		<complexType/>
+	    </element>
+	    <element name="faultDetail">
+		<complexType>
+		    <sequence>
+			<element name="minor" type="short"/>
+			<element name="major" type="short"/>
+		    </sequence>
+                </complexType>
+	    </element>
         </schema>
     </wsdl:types>
 
@@ -51,11 +65,26 @@
         <wsdl:part name="out" element="x1:sayHiResponse"/>
     </wsdl:message>
 
+    <wsdl:message name="pingMeRequest">
+	<wsdl:part name="in" element="x1:pingMe"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeResponse">
+        <wsdl:part name="out" element="x1:pingMeResponse"/>
+    </wsdl:message>		
+    <wsdl:message name="pingMeFault">
+	<wsdl:part name="faultDetail" element="x1:faultDetail"/>
+    </wsdl:message>
+
     <wsdl:portType name="Greeter">
         <wsdl:operation name="sayHi">
             <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/>
             <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/>
         </wsdl:operation>
+	<wsdl:operation name="pingMe">
+	    <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+	    <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+	    <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+        </wsdl:operation> 
     </wsdl:portType>
 
     <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
@@ -69,6 +98,18 @@
 		<soap12:body use="literal" />
 	    </output>
 	</operation>
+	<operation name="pingMe">
+	    <soap12:operation style="document"/>
+	    <input>
+                <soap12:body use="literal"/>
+            </input>
+            <output>
+                <soap12:body use="literal"/>
+            </output>
+            <fault name="pingMeFault">
+                <soap12:fault name="pingMeFault" use="literal"/>
+            </fault>
+        </operation>
     </wsdl:binding>
 
 

Modified: incubator/cxf/trunk/tools/misctools/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/misctools/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/tools/misctools/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java (original)
+++ incubator/cxf/trunk/tools/misctools/src/test/java/org/apache/cxf/tools/misc/processor/WSDLToSoapProcessorTest.java Thu Oct 19 04:56:29 2006
@@ -20,7 +20,7 @@
 package org.apache.cxf.tools.misc.processor;
 
 import java.io.File;
-import java.util.Iterator;
+import java.util.*;
 
 import javax.wsdl.Binding;
 import javax.wsdl.BindingFault;
@@ -323,6 +323,26 @@
                 assertNotNull(soapBody);
                 assertTrue("literal".equalsIgnoreCase(soapBody.getUse()));
             }
+            bo = binding.getBindingOperation("pingMe", null, null);
+            assertNotNull(bo);
+            it = bo.getExtensibilityElements().iterator();
+            assertTrue(it != null && it.hasNext());
+            assertTrue(it.next() instanceof SOAP12Operation);
+
+            it = bo.getBindingInput().getExtensibilityElements().iterator();
+            assertTrue(it != null && it.hasNext());
+            assertTrue(it.next() instanceof SOAP12Body);
+
+            it = bo.getBindingOutput().getExtensibilityElements().iterator();
+            assertTrue(it != null && it.hasNext());
+            assertTrue(it.next() instanceof SOAP12Body);
+
+            Map faults = bo.getBindingFaults();
+            assertTrue(faults != null && faults.size() == 1);
+            Object bf = faults.get("pingMeFault");
+            assertNotNull(bf);
+            assertTrue(bf instanceof BindingFault);
+            assertEquals("pingMeFault", ((BindingFault)bf).getName());
         } catch (ToolException e) {
             fail("Exception Encountered when parsing wsdl, error: " + e.getMessage());
         }

Modified: incubator/cxf/trunk/tools/misctools/src/test/resources/misctools_wsdl/hello_world_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/misctools/src/test/resources/misctools_wsdl/hello_world_soap12.wsdl?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/tools/misctools/src/test/resources/misctools_wsdl/hello_world_soap12.wsdl (original)
+++ incubator/cxf/trunk/tools/misctools/src/test/resources/misctools_wsdl/hello_world_soap12.wsdl Thu Oct 19 04:56:29 2006
@@ -41,6 +41,20 @@
 		    </sequence>
 		</complexType>
 	    </element>
+	    <element name="pingMe">
+		<complexType/>
+	    </element>
+	    <element name="pingMeResponse">
+		<complexType/>
+	    </element>
+	    <element name="faultDetail">
+		<complexType>
+		    <sequence>
+			<element name="minor" type="short"/>
+			<element name="major" type="short"/>
+		    </sequence>
+                </complexType>
+	    </element>
         </schema>
     </wsdl:types>
 
@@ -50,12 +64,26 @@
     <wsdl:message name="sayHiResponse">
         <wsdl:part name="out" element="x1:sayHiResponse"/>
     </wsdl:message>
+    <wsdl:message name="pingMeRequest">
+	<wsdl:part name="in" element="x1:pingMe"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeResponse">
+        <wsdl:part name="out" element="x1:pingMeResponse"/>
+    </wsdl:message>		
+    <wsdl:message name="pingMeFault">
+	<wsdl:part name="faultDetail" element="x1:faultDetail"/>
+    </wsdl:message>
 
     <wsdl:portType name="Greeter">
         <wsdl:operation name="sayHi">
             <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/>
             <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/>
         </wsdl:operation>
+	<wsdl:operation name="pingMe">
+	    <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+	    <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+	    <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+        </wsdl:operation> 
     </wsdl:portType>
 
     <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
@@ -69,6 +97,18 @@
 		<soap12:body use="literal" />
 	    </output>
 	</operation>
+	<operation name="pingMe">
+	    <soap12:operation style="document"/>
+	    <input>
+                <soap12:body use="literal"/>
+            </input>
+            <output>
+                <soap12:body use="literal"/>
+            </output>
+            <fault name="pingMeFault">
+                <soap12:fault name="pingMeFault" use="literal"/>
+            </fault>
+        </operation>
     </wsdl:binding>
 
 

Modified: incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java (original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/test/java/org/apache/cxf/tools/wsdl2java/processor/WSDLToJavaProcessorTest.java Thu Oct 19 04:56:29 2006
@@ -152,9 +152,9 @@
         File types = new File(helloworldsoaphttp, "types");
         assertTrue(types.exists());
         File[] files = helloworldsoaphttp.listFiles();
-        assertEquals(3, files.length);
-        files = types.listFiles();
         assertEquals(4, files.length);
+        files = types.listFiles();
+        assertEquals(7, files.length);
 
         Class clz = classLoader.loadClass("org.apache.hello_world_soap12_http.Greeter");
         assertTrue("class " + clz.getName() + " modifier is not public", Modifier
@@ -184,6 +184,14 @@
         WebResult webResultAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebResult.class);
 
         assertEquals("responseType", webResultAnno.name());
+
+        method = clz.getMethod("pingMe", new Class[] {});
+        webMethodAnno = AnnotationUtil.getPrivMethodAnnotation(method, WebMethod.class);
+        assertEquals(method.getName() + "()" + " Annotation : WebMethod.operationName ", "pingMe",
+                     webMethodAnno.operationName());
+        Class[] exceptionCls = method.getExceptionTypes();
+        assertEquals(1, exceptionCls.length);
+        assertEquals("org.apache.hello_world_soap12_http.PingMeFault", exceptionCls[0].getName());
     }
     
     public void testHelloWorld() throws Exception {

Modified: incubator/cxf/trunk/tools/wsdl2java/src/test/resources/wsdl2java_wsdl/hello_world_soap12.wsdl
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/tools/wsdl2java/src/test/resources/wsdl2java_wsdl/hello_world_soap12.wsdl?view=diff&rev=465588&r1=465587&r2=465588
==============================================================================
--- incubator/cxf/trunk/tools/wsdl2java/src/test/resources/wsdl2java_wsdl/hello_world_soap12.wsdl (original)
+++ incubator/cxf/trunk/tools/wsdl2java/src/test/resources/wsdl2java_wsdl/hello_world_soap12.wsdl Thu Oct 19 04:56:29 2006
@@ -41,6 +41,20 @@
 		    </sequence>
 		</complexType>
 	    </element>
+	    <element name="pingMe">
+		<complexType/>
+	    </element>
+	    <element name="pingMeResponse">
+		<complexType/>
+	    </element>
+	    <element name="faultDetail">
+		<complexType>
+		    <sequence>
+			<element name="minor" type="short"/>
+			<element name="major" type="short"/>
+		    </sequence>
+                </complexType>
+	    </element>
         </schema>
     </wsdl:types>
 
@@ -50,12 +64,26 @@
     <wsdl:message name="sayHiResponse">
         <wsdl:part name="out" element="x1:sayHiResponse"/>
     </wsdl:message>
+    <wsdl:message name="pingMeRequest">
+	<wsdl:part name="in" element="x1:pingMe"/>
+    </wsdl:message>
+    <wsdl:message name="pingMeResponse">
+        <wsdl:part name="out" element="x1:pingMeResponse"/>
+    </wsdl:message>		
+    <wsdl:message name="pingMeFault">
+	<wsdl:part name="faultDetail" element="x1:faultDetail"/>
+    </wsdl:message>
 
     <wsdl:portType name="Greeter">
         <wsdl:operation name="sayHi">
             <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/>
             <wsdl:output name="sayHiResponse" message="tns:sayHiResponse"/>
         </wsdl:operation>
+	<wsdl:operation name="pingMe">
+	    <wsdl:input name="pingMeRequest" message="tns:pingMeRequest"/>
+	    <wsdl:output name="pingMeResponse" message="tns:pingMeResponse"/>
+	    <wsdl:fault name="pingMeFault" message="tns:pingMeFault"/>
+        </wsdl:operation> 
     </wsdl:portType>
 
     <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
@@ -69,6 +97,18 @@
 		<soap12:body use="literal" />
 	    </output>
 	</operation>
+	<operation name="pingMe">
+	    <soap12:operation style="document"/>
+	    <input>
+                <soap12:body use="literal"/>
+            </input>
+            <output>
+                <soap12:body use="literal"/>
+            </output>
+            <fault name="pingMeFault">
+                <soap12:fault name="pingMeFault" use="literal"/>
+            </fault>
+        </operation>
     </wsdl:binding>
 
     <wsdl:service name="SOAPService">