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 <[email protected]> Authored: Fri Dec 12 12:56:55 2014 -0500 Committer: Daniel Kulp <[email protected]> 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(); - } - } -}
