You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2014/12/12 20:37:20 UTC

[1/5] cxf git commit: Remove the "GET" stuff from the JAX-WS based samples that no-longer support it.

Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 00ba1fd85 -> b646446a5


Remove the "GET" stuff from the JAX-WS based samples that no-longer support it.


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/3c5f5a96
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/3c5f5a96
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/3c5f5a96

Branch: refs/heads/3.0.x-fixes
Commit: 3c5f5a96a8fed38cbeda5866b18c29835100267d
Parents: 00ba1fd
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Dec 12 12:56:55 2014 -0500
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Dec 12 14:36:48 2014 -0500

----------------------------------------------------------------------
 .../src/main/java/demo/hw/client/Get.java       | 101 ----------------
 .../src/main/java/demo/hwRPCLit/client/Get.java | 101 ----------------
 .../samples/wsdl_first_xml_wrapped/README.txt   |   2 -
 .../samples/wsdl_first_xml_wrapped/pom.xml      |  26 -----
 .../src/main/java/demo/hw/client/Get.java       | 117 -------------------
 .../src/main/java/demo/hw/client/Get.java       | 117 -------------------
 6 files changed, 464 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/3c5f5a96/distribution/src/main/release/samples/wsdl_first_pure_xml/src/main/java/demo/hw/client/Get.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/wsdl_first_pure_xml/src/main/java/demo/hw/client/Get.java b/distribution/src/main/release/samples/wsdl_first_pure_xml/src/main/java/demo/hw/client/Get.java
deleted file mode 100644
index caae05e..0000000
--- a/distribution/src/main/release/samples/wsdl_first_pure_xml/src/main/java/demo/hw/client/Get.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Properties;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-public final class Get {
-
-    private Get() {
-    } 
-
-    public static void main(String args[]) throws Exception {
-        // Sent HTTP GET request to invoke sayHi
-        String target = "http://localhost:9000/XMLService/XMLPort/sayHi";
-        URL url = new URL(target);
-        HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke sayHi");
-
-        InputStream in = httpConnection.getInputStream();
-        StreamSource source = new StreamSource(in);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke greetMe FAULT
-        target = "http://localhost:9000/XMLService/XMLPort/greetMe/me/CXF";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
-        try {
-            in = httpConnection.getInputStream();
-            source = new StreamSource(in);
-            printSource(source);
-        } catch (Exception e) {
-            System.err.println("GreetMe Fault: " + e.getMessage());
-        }
-        InputStream err = httpConnection.getErrorStream();
-        source = new StreamSource(err);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke greetMe
-        target = "http://localhost:9000/XMLService/XMLPort/greetMe/requestType/CXF";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
-        in = httpConnection.getInputStream();
-        source = new StreamSource(in);
-        printSource(source);
-    }
-
-    private static void printSource(Source source) {
-        try {
-            ByteArrayOutputStream bos = new ByteArrayOutputStream();
-            StreamResult sr = new StreamResult(bos);
-            Transformer trans = TransformerFactory.newInstance().newTransformer();
-            Properties oprops = new Properties();
-            oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
-            trans.setOutputProperties(oprops);
-            trans.transform(source, sr);
-            System.out.println();
-            System.out.println("**** Response ******");
-            System.out.println();
-            System.out.println(bos.toString());
-            bos.close();
-            System.out.println();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/3c5f5a96/distribution/src/main/release/samples/wsdl_first_rpclit/src/main/java/demo/hwRPCLit/client/Get.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/wsdl_first_rpclit/src/main/java/demo/hwRPCLit/client/Get.java b/distribution/src/main/release/samples/wsdl_first_rpclit/src/main/java/demo/hwRPCLit/client/Get.java
deleted file mode 100644
index 26d3cb9..0000000
--- a/distribution/src/main/release/samples/wsdl_first_rpclit/src/main/java/demo/hwRPCLit/client/Get.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- * 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.hwRPCLit.client;
-
-import java.io.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Properties;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-public final class Get {
-
-    private Get() {
-    } 
-
-    public static void main(String args[]) throws Exception {
-        // Sent HTTP GET request to invoke sayHi
-        String target = "http://localhost:9000/SoapContext/SoapPort/sayHi";
-        URL url = new URL(target);
-        HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke sayHi");
-
-        InputStream in = httpConnection.getInputStream();
-        StreamSource source = new StreamSource(in);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke greetMe FAULT
-        target = "http://localhost:9000/SoapContext/SoapPort/greetMe/me/CXF";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
-        try {
-            in = httpConnection.getInputStream();
-            source = new StreamSource(in);
-            printSource(source);
-        } catch (Exception e) {
-            System.err.println("GreetMe Fault: " + e.getMessage());
-        }
-        InputStream err = httpConnection.getErrorStream();
-        source = new StreamSource(err);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke greetMe
-        target = "http://localhost:9000/SoapContext/SoapPort/greetMe/in/CXF";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
-        in = httpConnection.getInputStream();
-        source = new StreamSource(in);
-        printSource(source);
-    }
-
-    private static void printSource(Source source) {
-        try {
-            ByteArrayOutputStream bos = new ByteArrayOutputStream();
-            StreamResult sr = new StreamResult(bos);
-            Transformer trans = TransformerFactory.newInstance().newTransformer();
-            Properties oprops = new Properties();
-            oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
-            trans.setOutputProperties(oprops);
-            trans.transform(source, sr);
-            System.out.println();
-            System.out.println("**** Response ******");
-            System.out.println();
-            System.out.println(bos.toString());
-            bos.close();
-            System.out.println();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/3c5f5a96/distribution/src/main/release/samples/wsdl_first_xml_wrapped/README.txt
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/wsdl_first_xml_wrapped/README.txt b/distribution/src/main/release/samples/wsdl_first_xml_wrapped/README.txt
index acdad6e..ed741fa 100644
--- a/distribution/src/main/release/samples/wsdl_first_xml_wrapped/README.txt
+++ b/distribution/src/main/release/samples/wsdl_first_xml_wrapped/README.txt
@@ -17,8 +17,6 @@ Using either UNIX or Windows:
   mvn install   (builds the demo)
   mvn -Pserver  (from one command line window)
   mvn -Pclient  (from a second command line window)
-  mvn -Pclient.get (client uses http GET)
-
 
 To remove the code generated from the WSDL file and the .class
 files, run "mvn clean".

http://git-wip-us.apache.org/repos/asf/cxf/blob/3c5f5a96/distribution/src/main/release/samples/wsdl_first_xml_wrapped/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/wsdl_first_xml_wrapped/pom.xml b/distribution/src/main/release/samples/wsdl_first_xml_wrapped/pom.xml
index d73082f..db088d3 100644
--- a/distribution/src/main/release/samples/wsdl_first_xml_wrapped/pom.xml
+++ b/distribution/src/main/release/samples/wsdl_first_xml_wrapped/pom.xml
@@ -117,32 +117,6 @@
                 </plugins>
             </build>
         </profile>
-        <profile>
-            <id>client.get</id>
-            <build>
-                <defaultGoal>test</defaultGoal>
-                <plugins>
-                    <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>exec-maven-plugin</artifactId>
-                        <executions>
-                            <execution>
-                                <phase>test</phase>
-                                <goals>
-                                    <goal>java</goal>
-                                </goals>
-                                <configuration>
-                                    <mainClass>demo.hw.client.Get</mainClass>
-                                    <arguments>
-                                        <argument>${basedir}/wsdl/hello_world.wsdl</argument>
-                                    </arguments>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
     </profiles>
     <dependencies>
         <dependency>

http://git-wip-us.apache.org/repos/asf/cxf/blob/3c5f5a96/distribution/src/main/release/samples/wsdl_first_xml_wrapped/src/main/java/demo/hw/client/Get.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/wsdl_first_xml_wrapped/src/main/java/demo/hw/client/Get.java b/distribution/src/main/release/samples/wsdl_first_xml_wrapped/src/main/java/demo/hw/client/Get.java
deleted file mode 100644
index 4464a61..0000000
--- a/distribution/src/main/release/samples/wsdl_first_xml_wrapped/src/main/java/demo/hw/client/Get.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Properties;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-public final class Get {
-
-    private Get() {
-    } 
-
-    public static void main(String args[]) throws Exception {
-        // Sent HTTP GET request to invoke sayHi
-        String target = "http://localhost:9000/XMLService/XMLPort/sayHi";
-        URL url = new URL(target);
-        HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke sayHi");
-
-        InputStream in = httpConnection.getInputStream();
-        StreamSource source = new StreamSource(in);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke greetMe FAULT
-        target = "http://localhost:9000/XMLService/XMLPort/greetMe/me/CXF";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
-        try {
-            in = httpConnection.getInputStream();
-            source = new StreamSource(in);
-            printSource(source);
-        } catch (Exception e) {
-            System.err.println("GreetMe Fault: " + e.getMessage());
-        }
-        InputStream err = httpConnection.getErrorStream();
-        source = new StreamSource(err);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke greetMe
-        target = "http://localhost:9000/XMLService/XMLPort/greetMe/requestType/CXF";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
-        in = httpConnection.getInputStream();
-        source = new StreamSource(in);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke pingMe
-        target = "http://localhost:9000/XMLService/XMLPort/pingMe";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke pingMe");
-
-        try {
-            in = httpConnection.getInputStream();
-        } catch (Exception e) {
-            System.out.println("PingMe fault raised");
-        }
-        err = httpConnection.getErrorStream();
-        source = new StreamSource(err);
-        printSource(source);
-    }
-
-    private static void printSource(Source source) {
-        try {
-            ByteArrayOutputStream bos = new ByteArrayOutputStream();
-            StreamResult sr = new StreamResult(bos);
-            Transformer trans = TransformerFactory.newInstance().newTransformer();
-            Properties oprops = new Properties();
-            oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
-            trans.setOutputProperties(oprops);
-            trans.transform(source, sr);
-            System.out.println();
-            System.out.println("**** Response ******");
-            System.out.println();
-            System.out.println(bos.toString());
-            bos.close();
-            System.out.println();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }    
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/3c5f5a96/distribution/src/main/release/samples/wsdl_first_xmlbeans/src/main/java/demo/hw/client/Get.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/wsdl_first_xmlbeans/src/main/java/demo/hw/client/Get.java b/distribution/src/main/release/samples/wsdl_first_xmlbeans/src/main/java/demo/hw/client/Get.java
deleted file mode 100644
index 85b83d0..0000000
--- a/distribution/src/main/release/samples/wsdl_first_xmlbeans/src/main/java/demo/hw/client/Get.java
+++ /dev/null
@@ -1,117 +0,0 @@
-/**
- * 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.ByteArrayOutputStream;
-import java.io.InputStream;
-import java.net.HttpURLConnection;
-import java.net.URL;
-import java.util.Properties;
-
-import javax.xml.transform.OutputKeys;
-import javax.xml.transform.Source;
-import javax.xml.transform.Transformer;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.transform.stream.StreamResult;
-import javax.xml.transform.stream.StreamSource;
-
-public final class Get {
-
-    private Get() {
-    } 
-
-    public static void main(String args[]) throws Exception {
-        // Sent HTTP GET request to invoke sayHi
-        String target = "http://localhost:9000/SoapContext/SoapPort/sayHi";
-        URL url = new URL(target);
-        HttpURLConnection httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke sayHi");
-
-        InputStream in = httpConnection.getInputStream();
-        StreamSource source = new StreamSource(in);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke greetMe FAULT
-        target = "http://localhost:9000/SoapContext/SoapPort/greetMe/me/CXF";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
-        try {
-            in = httpConnection.getInputStream();
-            source = new StreamSource(in);
-            printSource(source);
-        } catch (Exception e) {
-            System.err.println("GreetMe Fault: " + e.getMessage());
-        }
-        InputStream err = httpConnection.getErrorStream();
-        source = new StreamSource(err);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke greetMe
-        target = "http://localhost:9000/SoapContext/SoapPort/greetMe/requestType/CXF";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke greetMe");
-
-        in = httpConnection.getInputStream();
-        source = new StreamSource(in);
-        printSource(source);
-
-        // Sent HTTP GET request to invoke pingMe
-        target = "http://localhost:9000/SoapContext/SoapPort/pingMe";
-        url = new URL(target);
-        httpConnection = (HttpURLConnection) url.openConnection();
-        httpConnection.connect();
-        System.out.println("Invoking server through HTTP GET to invoke pingMe");
-
-        try {
-            in = httpConnection.getInputStream();
-        } catch (Exception e) {
-            System.out.println("PingMe fault raised");
-        }
-        err = httpConnection.getErrorStream();
-        source = new StreamSource(err);
-        printSource(source);
-    }
-
-    private static void printSource(Source source) {
-        try {
-            ByteArrayOutputStream bos = new ByteArrayOutputStream();
-            StreamResult sr = new StreamResult(bos);
-            Transformer trans = TransformerFactory.newInstance().newTransformer();
-            Properties oprops = new Properties();
-            oprops.put(OutputKeys.OMIT_XML_DECLARATION, "yes");
-            trans.setOutputProperties(oprops);
-            trans.transform(source, sr);
-            System.out.println();
-            System.out.println("**** Response ******");
-            System.out.println();
-            System.out.println(bos.toString());
-            bos.close();
-            System.out.println();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }    
-}


[5/5] cxf git commit: Recording .gitmergeinfo Changes

Posted by dk...@apache.org.
Recording .gitmergeinfo Changes


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/b646446a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b646446a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b646446a

Branch: refs/heads/3.0.x-fixes
Commit: b646446a55daeece522363bd3afadcaad1a20bb1
Parents: d8f5b21
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Dec 12 14:37:10 2014 -0500
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Dec 12 14:37:10 2014 -0500

----------------------------------------------------------------------
 .gitmergeinfo | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b646446a/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 7470a0c..7c11ad0 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -1,13 +1,18 @@
 origin/master
 
 B 035154fb466fb9c833804d1bc747804df9e9992b
+B 03bd1b4f0beaddf4df112f7c08d5749862805dfa
 B 04f0ef2e32f55d51f14cfc6d7a14616b62a6cce5
 B 08d98fbb13440de2da3b19915d8dfe21531cb284
 B 0aaa2b5742a53bf31704939e4bc21906100bbc54
+B 0ba19453f17be19aa2e46848b1908f776a6abb64
 B 0c0555f4ac850ec8e38302d73207170affe4376a
+B 0de0309f28e1543660c763c158f4353d6d2189be
 B 11243052a6e1656657776bc3a0c586cba962c49f
 B 131c3fdba9c4825b739adc3d149d0297175b8a86
+B 13b9b012a31fdf1a7e35757a336fecc3c688848e
 B 13dfe0f9fcaa0aee4c603072436d85861a0ab734
+B 13e01e23ea87ea5b06953f18bef4b173fca55b4d
 B 161e10bb2d87573974b8a1748f023c47ebbe5d49
 B 162bbb5ea63cfeb6c258d750627c77c9e694f928
 B 1674e7fb3353fc9e5d2b81deb2d02617cc09a373
@@ -20,11 +25,14 @@ B 1e927cdfaafb2efc8d29184cb5b7b05ce3c3ad7f
 B 1f02b3d4f2c9d341046ce35222c8f4d7674b10b2
 B 2004b1021ce0d0975eb49cae36416863bd8c59bb
 B 222137cb2ee577e6582a644b7ae73bbc0a75d4d1
+B 29f0620a9a025afcd2057cdf97c7d93caf6c179f
 B 2afb9d3cacb299bea854d1ff4824e4c981a41d6a
 B 2ba77327488a8446e6a92af137f644eaf3b06e2e
 B 2f0b3e38212674883d610cfcfbd76b901bd3d997
+B 30853113b4c4d47200bcf5305e5e88735f32cc8f
 B 350b51632f4c5dbd4891636261909c73136981c6
 B 36fcf426a4946f57b051ce7a388c7190fc97aebd
+B 3834ba2ea50a164cf2b5ffe15229dcf512e110c6
 B 384ad75433037358ea1607c4ddcb0cd978fae10c
 B 388d6eaf045c0215c7cffc891526a402c70625ec
 B 38bb9fea460262ff2781cbfdf85032d3f4fb9fe1
@@ -44,10 +52,12 @@ B 4f61ca801deed173c648b2d424ac231663acd704
 B 4f70bdf4199a666829cf9c6c62c508d12afbe251
 B 4fe7844935f9b4ad797760613d143949f9448905
 B 51f433d54a1d11eac25c32b0dd69f12fef62c060
+B 55bda33699ea1c2e84a125253edd594cc2a32ea3
 B 5e06ba0c4970700477484bd2409a226aa9ec7f0a
 B 5fbd407bac5af5e55bb280125405d75b7add872b
 B 6256b7c7c42bb01d2cc0d16d659ba1aa3042e7ae
 B 64f232307444269286b7f14fc3838b07187d4c03
+B 652d821683f12031258f7727d33157f3ab6ccbe6
 B 665eb259fced741f65de061bb026c3ab65a8d99c
 B 66cc4a4e3c0e92d9e6931a5d416f11c2f07f268c
 B 67432aef1adb8e330c054431de9d0955e3993472
@@ -57,6 +67,7 @@ B 6e4f0f60785de1f5774644323edafb4741b9e4a4
 B 6efe475ad57f042ffc9547f1bb258ab4e16a3f3e
 B 702f27bc4a334b2d117262252632bf580f20f711
 B 71488c6fa7635c88285214a0479379aafef9ed3c
+B 71ced4709dedf62264a4bb630aaf4780cb94ce48
 B 74a2e6f2b1d9787cc9b5cff4cc84e43cfccbfe94
 B 75c69b27a7688dfac281d4acdcff3b0acc4c8bee
 B 7d1f30f76d95f9eddf0bed995120c71bf1a393b3
@@ -78,6 +89,8 @@ B 92502a5e2af6e5d3c544f89396de2d05d539fd41
 B 92c4738f9e6b96fe0ce8586bb36b9c6444d6e225
 B 9344b093b8081a68c9f83f0c740d60508e99fd5e
 B 944eb0ba1043bd4daf9cf087b66bc9cab10b8ff2
+B 94cfe7e48a50104b22457aa47b39d06329d16d32
+B 970feeed0db20bfe9df5095b6b335146344c222c
 B 9896b920035a1d1be1aef28a1d1a5eb876445c82
 B 99963f9a08c9782b7c661f2b5ff8e9ce95ab3dbe
 B 9dfb278c7739b9f4621f43b8146d057e21fafb64
@@ -93,6 +106,7 @@ B a7c6e78b491c4feb6797a6dddd32a6249189a552
 B ab4eaac0be87291b7f053d144dc8fbf9d98634c3
 B b18a2bad64c343520795175cf377cdf1b981da2a
 B b4536602d376a36bcbd02d21d5ab42f19d4e5b22
+B b4872363fda49f205001d4385ecbc35133c2c755
 B b54fe0dfdf3c3d76df1e07fb3686d5d8a1061d48
 B b5fc90f09c6b039a54564e0825a264310453c550
 B b67537dbace0896073b55b375b8ccdc4cce83365
@@ -108,7 +122,9 @@ B cd809b8526fc5620c481d4ee5a8534ccf6babae4
 B d0c5c3defab6dbb9619f8fd291f2e06b685cb03c
 B d391d9371d8505c7774308c4fbbb9bc57ffd34a6
 B d3e9295d3acfe3c970a325bbbafdba83a0d6e83c
+B d50ffd09c30e606524fb6ed92119d85ccfa13491
 B d54a21628143bc15f51cbe5d63fa42c09d0ab8ac
+B d8a6bdbd2c84b3fa0187de935e294d5f66974e46
 B d9f624e2eca8affa20243583ace087a8cbba3ac8
 B df947cb1ca2b9e375f99e199ec65b1afece1c963
 B e242307ad8bbe53788f3e03e9e2f0ca977d01340


[3/5] cxf git commit: Fix checkstyle This closes #37

Posted by dk...@apache.org.
Fix checkstyle
This closes #37


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6463da84
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6463da84
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6463da84

Branch: refs/heads/3.0.x-fixes
Commit: 6463da84d21e77d4fb0f7814902c1f70ea1c2940
Parents: 5122b2d
Author: Daniel Kulp <dk...@apache.org>
Authored: Fri Dec 12 14:04:38 2014 -0500
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Dec 12 14:37:04 2014 -0500

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/javascript/ParticleInfo.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/6463da84/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java
----------------------------------------------------------------------
diff --git a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java
index 445cf96..6fee422 100644
--- a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java
+++ b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java
@@ -19,8 +19,8 @@
 
 package org.apache.cxf.javascript;
 
-import java.util.List;
 import java.util.LinkedList;
+import java.util.List;
 import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
@@ -30,9 +30,9 @@ import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.cxf.common.xmlschema.XmlSchemaUtils;
 import org.apache.ws.commons.schema.XmlSchema;
-import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaChoice;
 import org.apache.ws.commons.schema.XmlSchemaChoiceMember;
+import org.apache.ws.commons.schema.XmlSchemaElement;
 import org.apache.ws.commons.schema.XmlSchemaObject;
 import org.apache.ws.commons.schema.XmlSchemaParticle;
 import org.apache.ws.commons.schema.XmlSchemaType;


[2/5] cxf git commit: (CXF-6148) Added support for basic xsd:choice elements for JS generator. Covered with tests and improved tests. Added log message when not supported exception is raisen.

Posted by dk...@apache.org.
(CXF-6148) Added support for basic xsd:choice elements for JS generator. Covered with tests and improved tests. Added log message when not supported exception is raisen.


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5122b2d0
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5122b2d0
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5122b2d0

Branch: refs/heads/3.0.x-fixes
Commit: 5122b2d0111216d8fcc64dbdbcafd769413d2b5a
Parents: 3c5f5a9
Author: Andrii Nikitiuk <de...@gmail.com>
Authored: Tue Dec 9 20:38:32 2014 +0200
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Dec 12 14:37:01 2014 -0500

----------------------------------------------------------------------
 .../apache/cxf/javascript/JavascriptUtils.java  | 12 ++++-
 .../apache/cxf/javascript/Messages.properties   |  3 ++
 .../org/apache/cxf/javascript/ParticleInfo.java | 48 +++++++++++++++++++-
 .../types/SchemaJavascriptBuilder.java          | 28 ++++++++++--
 .../wsdlto/javascript/WSDLToJavaScriptTest.java | 18 +++++++-
 .../tools/wsdlto/javascript/hello_world.wsdl    | 44 ++++++++++++++++++
 6 files changed, 144 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5122b2d0/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
----------------------------------------------------------------------
diff --git a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
index a1c4ad9..253e586 100755
--- a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
+++ b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/JavascriptUtils.java
@@ -338,6 +338,13 @@ public class JavascriptUtils {
     public void generateCodeToSerializeElement(ParticleInfo elementInfo,
                                                String referencePrefix,
                                                SchemaCollection schemaCollection) {
+        if (elementInfo.isGroup()) {
+            for (ParticleInfo childElement : elementInfo.getChildren()) {
+                generateCodeToSerializeElement(childElement, referencePrefix, schemaCollection);
+            }
+            return;
+        }
+
         XmlSchemaType type = elementInfo.getType();
         boolean nillable = elementInfo.isNillable();
         boolean optional = elementInfo.isOptional();
@@ -563,9 +570,10 @@ public class JavascriptUtils {
                                                 contextName, object);
         }
         if (!(object instanceof XmlSchemaElement)
-            && !(object instanceof XmlSchemaAny)) {
+            && !(object instanceof XmlSchemaAny)
+            && !(object instanceof XmlSchemaChoice)) {
             unsupportedConstruct("GROUP_CHILD",
-                                                object.getClass().getSimpleName(), contextName,
+                    object.getClass().getSimpleName(), contextName,
                                                 object);
         }
 

http://git-wip-us.apache.org/repos/asf/cxf/blob/5122b2d0/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/Messages.properties
----------------------------------------------------------------------
diff --git a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/Messages.properties b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/Messages.properties
index 1c08adc..120335f 100644
--- a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/Messages.properties
+++ b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/Messages.properties
@@ -25,3 +25,6 @@ IMPOSSIBLE_GLOBAL_ITEM= JavaScript limitation: Element or xs:any at {0} used in
 MISSING_TYPE=Type {0} is missing from the WSDL schema for element {1}. {2}
 ELEMENT_DANGLING_REFERENCE= Element {0} refers to undefined element {1}.
 UNSUPPORTED_ATTRIBUTE_ITEM= Unsupported {0} in {1}.
+GROUP_ELEMENT_MULTI_OCCURS=Limitation: unsupported group element construct {0} with maxOccours > 1 found.
+GROUP_ELEMENT_ANY=Limitation: unsupported any element inside group element construct {0}
+GROUP_CHILD=Limitation: unsupported construct {0} found in {1}. {2}

http://git-wip-us.apache.org/repos/asf/cxf/blob/5122b2d0/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java
----------------------------------------------------------------------
diff --git a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java
index c8631bd..445cf96 100644
--- a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java
+++ b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/ParticleInfo.java
@@ -19,6 +19,8 @@
 
 package org.apache.cxf.javascript;
 
+import java.util.List;
+import java.util.LinkedList;
 import java.util.logging.Logger;
 
 import javax.xml.namespace.QName;
@@ -29,6 +31,8 @@ import org.apache.cxf.common.xmlschema.SchemaCollection;
 import org.apache.cxf.common.xmlschema.XmlSchemaUtils;
 import org.apache.ws.commons.schema.XmlSchema;
 import org.apache.ws.commons.schema.XmlSchemaElement;
+import org.apache.ws.commons.schema.XmlSchemaChoice;
+import org.apache.ws.commons.schema.XmlSchemaChoiceMember;
 import org.apache.ws.commons.schema.XmlSchemaObject;
 import org.apache.ws.commons.schema.XmlSchemaParticle;
 import org.apache.ws.commons.schema.XmlSchemaType;
@@ -47,6 +51,10 @@ public final class ParticleInfo implements ItemInfo {
     // in the RPC case, we can have a type and no element.
     private XmlSchemaType type;
     private boolean empty;
+
+    private boolean isGroup;
+    private List<ParticleInfo> children;
+
     // These are exactly the same values as we find in the XmlSchemaElement.
     // there is no rationalization. But the accessors take care of business.
     private long minOccurs;
@@ -149,6 +157,32 @@ public final class ParticleInfo implements ItemInfo {
                 elementInfo.global = true;
             }
             elementInfo.nillable = ((XmlSchemaElement)realParticle).isNillable();
+        } else if (sequenceParticle instanceof XmlSchemaChoice) {
+            XmlSchemaChoice choice = (XmlSchemaChoice)sequenceParticle;
+
+            if (sequenceParticle.getMaxOccurs() > 1) {
+                Message message = new Message("GROUP_ELEMENT_MULTI_OCCURS", LOG, sequenceParticle
+                        .getClass().getSimpleName());
+                throw new UnsupportedConstruct(message.toString());
+            }
+
+            elementInfo.children = new LinkedList<>();
+
+            List<XmlSchemaChoiceMember> items = choice.getItems();
+            for (XmlSchemaChoiceMember item : items) {
+                XmlSchemaObject schemaObject = (XmlSchemaObject)item;
+                ParticleInfo childParticle = ParticleInfo.forLocalItem(schemaObject, currentSchema, schemaCollection,
+                        prefixAccumulator, contextName);
+
+                if (childParticle.isAny()) {
+                    Message message = new Message("GROUP_ELEMENT_ANY", LOG, sequenceParticle.getClass()
+                            .getSimpleName());
+                    throw new UnsupportedConstruct(message.toString());
+                }
+
+                childParticle.minOccurs = 0;
+                elementInfo.children.add(childParticle);
+            }
         }
 
         elementInfo.minOccurs = sequenceParticle.getMinOccurs();
@@ -199,13 +233,17 @@ public final class ParticleInfo implements ItemInfo {
 
             elementInfo.defaultValue = schemaDefaultValue;
             factorySetupType(element, schemaCollection, elementInfo);
+
+            elementInfo.isGroup = false;
+        } else if (particle instanceof XmlSchemaChoice) {
+            elementInfo.isGroup = true;
         } else { // any
             elementInfo.any = true;
             elementInfo.xmlName = null; // unknown until runtime.
             // TODO: multiple 'any'
             elementInfo.javascriptName = "any";
             elementInfo.type = null; // runtime for any.
-
+            elementInfo.isGroup = false;
         }
     }
 
@@ -325,6 +363,14 @@ public final class ParticleInfo implements ItemInfo {
         this.type = type;
     }
 
+    public boolean isGroup() {
+        return isGroup;
+    }
+
+    public List<ParticleInfo> getChildren() {
+        return children;
+    }
+
     public boolean isEmpty() {
         return empty;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/5122b2d0/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java
----------------------------------------------------------------------
diff --git a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java
index 403766a..3292672 100755
--- a/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java
+++ b/rt/javascript/javascript-rt/src/main/java/org/apache/cxf/javascript/types/SchemaJavascriptBuilder.java
@@ -156,6 +156,7 @@ public class SchemaJavascriptBuilder {
                     domDeserializerFunction(element.getQName(), complexType);
                 }
             } catch (UnsupportedConstruct usc) {
+                LOG.warning(usc.getMessage());
                 continue; // it could be empty, but the style checker
                 // would complain.
             }
@@ -189,7 +190,7 @@ public class SchemaJavascriptBuilder {
         for (XmlSchemaObject thing : items) {
             ParticleInfo itemInfo = ParticleInfo.forLocalItem(thing, xmlSchema, xmlSchemaCollection,
                                                               prefixAccumulator, type.getQName());
-            constructOneItem(type, elementPrefix, typeObjectName, itemInfo);
+            constructItem(type, elementPrefix, typeObjectName, itemInfo);
         }
 
         for (XmlSchemaAnnotated thing : attrs) {
@@ -202,6 +203,18 @@ public class SchemaJavascriptBuilder {
         code.append(accessors.toString());
     }
 
+    private void constructItem(XmlSchemaComplexType type, final String elementPrefix,
+                               String typeObjectName, ParticleInfo itemInfo) {
+        if (!itemInfo.isGroup()) {
+            constructOneItem(type, elementPrefix, typeObjectName, itemInfo);
+            return;
+        }
+
+        for (ParticleInfo childInfo : itemInfo.getChildren()) {
+            constructItem(type, elementPrefix, typeObjectName, childInfo);
+        }
+    }
+
     private void constructOneItem(XmlSchemaComplexType type, final String elementPrefix,
                                   String typeObjectName, ItemInfo itemInfo) {
 
@@ -396,7 +409,7 @@ public class SchemaJavascriptBuilder {
                 }
                 deserializeAny(type, itemInfo, nextItem);
             } else {
-                deserializeElement(type, contentElement);
+                deserializeElement(type, itemInfo);
             }
         }
         utils.appendLine("return newobject;");
@@ -528,9 +541,14 @@ public class SchemaJavascriptBuilder {
         utils.appendLine("newobject.setAny(anyHolder);");
     }
 
-    private void deserializeElement(XmlSchemaComplexType type, XmlSchemaObject thing) {
-        ParticleInfo itemInfo = ParticleInfo.forLocalItem(thing, xmlSchema, xmlSchemaCollection,
-                                                          prefixAccumulator, type.getQName());
+    private void deserializeElement(XmlSchemaComplexType type, ParticleInfo itemInfo) {
+        if (itemInfo.isGroup()) {
+            for (ParticleInfo childElement : itemInfo.getChildren()) {
+                deserializeElement(type, childElement);
+            }
+            return;
+        }
+
         XmlSchemaType itemType = itemInfo.getType();
         boolean simple = itemType instanceof XmlSchemaSimpleType
                          || JavascriptUtils.notVeryComplexType(itemType);

http://git-wip-us.apache.org/repos/asf/cxf/blob/5122b2d0/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java b/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java
index 15af869..872661c 100644
--- a/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java
+++ b/tools/wsdlto/frontend/javascript/src/test/java/org/apache/cxf/tools/wsdlto/javascript/WSDLToJavaScriptTest.java
@@ -32,7 +32,17 @@ import org.junit.Test;
  * 
  */
 public class WSDLToJavaScriptTest extends ProcessorTestBase {
-    
+
+    public int countChar(String text, char symbol) {
+        int count = 0;
+        for (int i = 0; i < text.length(); i++) {
+            if (text.charAt(i) == symbol) {
+                count++;
+            }
+        }
+        return count;
+    }
+
     // just run with a minimum of fuss.
     @Test
     public void testGeneration() throws Exception {
@@ -52,6 +62,9 @@ public class WSDLToJavaScriptTest extends ProcessorTestBase {
         FileInputStream fis = new FileInputStream(resultFile);
         String javascript = IOUtils.readStringFromStream(fis);
         assertTrue(javascript.contains("xmlns:murble='http://apache.org/hello_world_soap_http'"));
+        assertEquals("Number of '{' does not match number of '}' in generated JavaScript.",
+                countChar(javascript, '{'),
+                countChar(javascript, '}'));
     }
    
     @Test
@@ -72,6 +85,9 @@ public class WSDLToJavaScriptTest extends ProcessorTestBase {
         FileInputStream fis = new FileInputStream(resultFile);
         String javascript = IOUtils.readStringFromStream(fis);
         assertTrue(javascript.contains("xmlns:murble='http://apache.org/hello_world_soap_http'"));
+        assertEquals("Number of '{' does not match number of '}' in generated JavaScript.",
+                countChar(javascript, '{'),
+                countChar(javascript, '}'));
     }
    
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/5122b2d0/tools/wsdlto/frontend/javascript/src/test/resources/org/apache/cxf/tools/wsdlto/javascript/hello_world.wsdl
----------------------------------------------------------------------
diff --git a/tools/wsdlto/frontend/javascript/src/test/resources/org/apache/cxf/tools/wsdlto/javascript/hello_world.wsdl b/tools/wsdlto/frontend/javascript/src/test/resources/org/apache/cxf/tools/wsdlto/javascript/hello_world.wsdl
index 0378931..35c6baf 100644
--- a/tools/wsdlto/frontend/javascript/src/test/resources/org/apache/cxf/tools/wsdlto/javascript/hello_world.wsdl
+++ b/tools/wsdlto/frontend/javascript/src/test/resources/org/apache/cxf/tools/wsdlto/javascript/hello_world.wsdl
@@ -154,6 +154,30 @@ under the License.
                     <attribute name="id" type="int"/>
                 </complexType>
             </element>
+            <element name="testChoice">
+                <complexType>
+                    <sequence>
+                        <element name="arg0" type="string"/>
+                        <element name="arg1" type="string"/>
+                        <choice>
+                            <element name="arg2" type="string"/>
+                            <element name="arg3" type="string"/>
+                        </choice>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="testChoiceResponse">
+                <complexType>
+                    <sequence>
+                        <element name="arg0" type="string"/>
+                        <element name="arg1" type="string"/>
+                        <choice>
+                            <element name="arg2" type="string"/>
+                            <element name="arg3" type="string"/>
+                        </choice>
+                    </sequence>
+                </complexType>
+            </element>
         </schema>
     </wsdl:types>
     <wsdl:message name="sayHiRequest">
@@ -207,6 +231,13 @@ under the License.
     <wsdl:message name="testDocLitBareResponse">
         <wsdl:part name="out" element="x1:BareDocumentResponse"/>
     </wsdl:message>
+    <wsdl:message name="testChoiceRequest">
+        <wsdl:part name="in" element="x1:testChoice"/>
+    </wsdl:message>
+    <wsdl:message name="testChoiceResponse">
+        <wsdl:part name="out" element="x1:testChoiceResponse"/>
+    </wsdl:message>
+
     <wsdl:portType name="Greeter">
         <wsdl:operation name="sayHi">
             <wsdl:input name="sayHiRequest" message="tns:sayHiRequest"/>
@@ -237,6 +268,10 @@ under the License.
             <wsdl:fault name="NoSuchCodeLitFault" message="tns:NoSuchCodeLitFault"/>
             <wsdl:fault name="BadRecordLitFault" message="tns:BadRecordLitFault"/>
         </wsdl:operation>
+        <wsdl:operation name="testChoice">
+            <wsdl:input name="testChoiceRequest" message="tns:testChoiceRequest"/>
+            <wsdl:output name="testChoiceResponse" message="tns:testChoiceResponse"/>
+        </wsdl:operation>
     </wsdl:portType>
     <wsdl:portType name="DocLitBare">
         <wsdl:operation name="testDocLitBare">
@@ -312,6 +347,15 @@ under the License.
                 <soap:fault name="BadRecordLitFault" use="literal"/>
             </wsdl:fault>
         </wsdl:operation>
+        <wsdl:operation name="testChoice">
+            <soap:operation style="document"/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+            </wsdl:output>
+        </wsdl:operation>
     </wsdl:binding>
     <wsdl:binding name="Doc_Lit_Bare_SOAPBinding" type="tns:DocLitBare">
         <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>


[4/5] cxf git commit: CXF-6138 JAXB unmarshaller Properties get overwriten on a call to initialize()

Posted by dk...@apache.org.
CXF-6138 JAXB unmarshaller Properties get overwriten on a call to initialize()


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d8f5b21a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d8f5b21a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d8f5b21a

Branch: refs/heads/3.0.x-fixes
Commit: d8f5b21ac808cb8a905b0c6a3a0bd4fb2e1c568b
Parents: 6463da8
Author: paul <pk...@gmail.com>
Authored: Sat Dec 6 22:04:08 2014 +0000
Committer: Daniel Kulp <dk...@apache.org>
Committed: Fri Dec 12 14:37:09 2014 -0500

----------------------------------------------------------------------
 .../org/apache/cxf/jaxb/JAXBDataBinding.java    |  8 +++-
 .../DataBindingMarshallerPropertiesTest.java    | 39 ++++++++++++++++++++
 2 files changed, 45 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d8f5b21a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
index bae0752..38f5cdb 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBDataBinding.java
@@ -304,8 +304,12 @@ public class JAXBDataBinding extends AbstractInterceptorProvidingDataBinding
 
 
         contextClasses = new LinkedHashSet<Class<?>>();
-        Map<String, Object> unmarshallerProps = new HashMap<String, Object>();
-        this.setUnmarshallerProperties(unmarshallerProps);
+        
+        if (this.getUnmarshallerProperties() == null || this.getUnmarshallerProperties().isEmpty()) {
+            Map<String, Object> unmarshallerProps = new HashMap<String, Object>();
+            this.setUnmarshallerProperties(unmarshallerProps);
+        }
+        
         for (ServiceInfo serviceInfo : service.getServiceInfos()) {
             
             JAXBContextInitializer initializer

http://git-wip-us.apache.org/repos/asf/cxf/blob/d8f5b21a/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DataBindingMarshallerPropertiesTest.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DataBindingMarshallerPropertiesTest.java b/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DataBindingMarshallerPropertiesTest.java
new file mode 100644
index 0000000..82b594b
--- /dev/null
+++ b/rt/databinding/jaxb/src/test/java/org/apache/cxf/jaxb/DataBindingMarshallerPropertiesTest.java
@@ -0,0 +1,39 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.cxf.jaxb;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.Test;
+
+public class DataBindingMarshallerPropertiesTest extends TestBase {
+    @Test 
+    public void testInitializeUnmarshallerProperties() throws Exception {
+        JAXBDataBinding db = new JAXBDataBinding();
+        Map<String, Object> unmarshallerProperties = new HashMap<String, Object>();
+        unmarshallerProperties.put("someproperty", "somevalue");
+        db.setUnmarshallerProperties(unmarshallerProperties);
+        
+        db.initialize(service);
+        
+        assertTrue("somevalue".equals(db.getUnmarshallerProperties().get("someproperty")));
+    }
+}